Add test checking so connection
Added test checking if vid is contacting SO using HTTPS
Change-Id: I75cb829cdc9feb231dfd4d3826d12cab18781d38
Issue-ID: INT-648
Signed-off-by: adam <adam.krysiak@nokia.com>
diff --git a/tests/vid/https-connection/__init__.robot b/tests/vid/https-connection/__init__.robot
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/vid/https-connection/__init__.robot
diff --git a/tests/vid/https-connection/keywords.py b/tests/vid/https-connection/keywords.py
new file mode 100755
index 0000000..85bca10
--- /dev/null
+++ b/tests/vid/https-connection/keywords.py
@@ -0,0 +1,125 @@
+import ast
+
+import requests
+from assertpy import assert_that
+from robot.api import logger
+from robot.api.deco import keyword
+
+JSESSIONID_COOKIE = "JSESSIONID"
+
+_vid_to_so_request_details = {
+ "requestDetails": {
+ "cloudConfiguration": {
+ "lcpCloudRegionId": "RegionOne",
+ "tenantId": "982c540f6e69488eb6be5664255e00c0"
+ },
+ "modelInfo": {
+ "modelInvariantId": "41b3c314-dfab-4501-9c5e-1c9fe5d8e151",
+ "modelName": "SoWs1..base_ws..module-0",
+ "modelType": "vfModule",
+ "modelVersion": "1",
+ "modelVersionId": "7ea96ae9-9eac-4eaa-882e-077478a6c44a"
+ },
+ "relatedInstanceList": [{
+ "relatedInstance": {
+ "instanceId": "0d8a98d8-d7ca-4c26-b7ab-81d3729e3b6c",
+ "modelInfo": {
+ "modelInvariantId": "a4413616-cf96-4615-a94e-0dc5a6a65430",
+ "modelName": "SC_WS_SW_2",
+ "modelType": "service",
+ "modelVersion": "3.0",
+ "modelVersionId": "0fdaaf44-3c6c-4d81-9c57-b2ce7224dbb9"
+ }
+ }
+ },
+ {
+ "relatedInstance": {
+ "instanceId": "61c19619-2714-46f8-90c9-39734e4f545f",
+ "modelInfo": {
+ "modelCustomizationName": "SO_WS_1 0",
+ "modelInvariantId": "3b2c9dcb-6ef8-4c3c-8d5b-43d5776f7110",
+ "modelName": "SO_WS_1",
+ "modelType": "vnf",
+ "modelVersion": "1.0",
+ "modelVersionId": "0fdaaf44-3c6c-4d81-9c57-b2ce7224dbb9"
+ }
+ }
+ }
+ ],
+ "requestInfo": {
+ "source": "VID",
+ "suppressRollback": False,
+ "requestorId": "az2016",
+ "instanceName": "SC_WS_VNF_1_2"
+ },
+ "requestParameters": {
+ "controllerType": "SDNC",
+ "userParams": []
+ }
+
+ }
+}
+
+_expected_so_response = {
+ "status": 202,
+ "entity": {
+ "requestReferences": {
+ "instanceId": "fffcbb6c-1983-42df-9ca8-89ae8b3a46c1",
+ "requestId": "b2197d7e-3a7d-410e-82ba-7b7e8191bc46"
+ }
+ }
+}
+
+
+def _extract_cookie_from_headers(headers):
+ for i in headers["Set-Cookie"].split(";"):
+ if JSESSIONID_COOKIE in i:
+ return i
+ raise RuntimeError("No cookie when logging in to VID")
+
+
+def _log_request(response):
+ logger.console(
+ "\n=========\n"
+ "Performing request to : {} \nBODY: {}\nHEADERS: {}"
+ .format(str(response.request.url), str(response.request.body), str(response.request.headers)))
+ logger.console(
+ "---------\n"
+ "Got response\n BODY: {} \n HEADERS: {}"
+ "\n=========\n".format(str(response.headers), str(response.content)))
+
+
+@keyword('Login To VID')
+def login_to_vid():
+ headers = {'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0',
+ 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
+ 'Accept-Language': 'pl,en-US;q=0.7,en;q=0.3',
+ 'Accept-Encoding': 'gzip, deflate', 'Referer': 'http://localhost:8080/vid/login.htm',
+ 'Content-Type': 'application/x-www-form-urlencoded',
+ 'Content-Length': '36',
+ 'Cookie': 'JSESSIONID=1B4AF817AA4BCB87C07BB5B49EFE8526',
+ 'Connection': 'keep-alive',
+ 'Upgrade-Insecure-Requests': '1'}
+ response = requests.post("https://localhost:8443/vid/login_external", data="loginId=demo&password=Kp8bJ4SXszM0WX",
+ headers=headers, allow_redirects=False, verify=False)
+ logger.console("Performing login")
+ _log_request(response)
+ return _extract_cookie_from_headers(response.headers)
+
+
+@keyword('Send create VF module instance request to VID')
+def send_create_vfmodule_instance_request_to_vid(jsession_cookie):
+ response = requests.post(
+ "https://localhost:8443/vid/mso/mso_create_vfmodule_instance/0d8a98d8-d7ca-4c26-b7ab-81d3729e3b6c/vnfs/61c19619-2714-46f8-90c9-39734e4f545f ",
+ headers={"Cookie": jsession_cookie}, json=_vid_to_so_request_details, verify=False)
+ content = ast.literal_eval(response.content)
+ logger.console("Triggering VF module instance creation")
+ _log_request(response)
+ return content
+
+
+@keyword('Response should contain valid entity')
+def expect_response_from_so_was_correctly_propageted(content):
+ logger.console("\nActual entity" + str(content['entity']))
+ logger.console("Expected entity" + str(_expected_so_response))
+ assert_that(content['entity']).is_equal_to(_expected_so_response)
diff --git a/tests/vid/https-connection/test1.robot b/tests/vid/https-connection/test1.robot
new file mode 100644
index 0000000..2173757
--- /dev/null
+++ b/tests/vid/https-connection/test1.robot
@@ -0,0 +1,16 @@
+*** Settings ***
+Library keywords.py
+Library Collections
+
+*** Variables ***
+
+
+*** Test Cases ***
+Connection to SO is performed using HTTPS
+ ${cookies}= Login To VID
+ ${response}= Send create VF module instance request to VID ${cookies}
+ Dictionary Should Contain Item ${response} status 200
+ Response should contain valid entity ${response}
+
+
+*** Keywords ***
diff --git a/tests/vid/resources/docker-compose.yml b/tests/vid/resources/docker-compose.yml
index 879c23d..4aecb6a 100644
--- a/tests/vid/resources/docker-compose.yml
+++ b/tests/vid/resources/docker-compose.yml
@@ -3,32 +3,32 @@
vid-server:
image: nexus3.onap.org:10001/onap/vid:3.0-STAGING-latest
environment:
- - VID_MYSQL_DBNAME=vid_openecomp_epsdk
- - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- - ASDC_CLIENT_REST_HOST=localhost
- - ASDC_CLIENT_REST_PORT=8443
+ - VID_MYSQL_DBNAME=vid_openecomp_epsdk
+ - VID_MYSQL_PASS=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - VID_MSO_SERVER_URL=https://so-simulator:8443
ports:
- - "8080:8080"
+ - "8080:8080"
+ - "8443:8443"
container_name: vid-server
links:
- - vid-mariadb:vid-mariadb-docker-instance
+ - vid-mariadb:vid-mariadb-docker-instance
vid-mariadb:
image: mariadb:10
environment:
- - MYSQL_DATABASE=vid_openecomp_epsdk
- - MYSQL_USER=vidadmin
- - MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
- - MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY
+ - MYSQL_DATABASE=vid_openecomp_epsdk
+ - MYSQL_USER=vidadmin
+ - MYSQL_PASSWORD=Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ - MYSQL_ROOT_PASSWORD=LF+tp_1WqgSY
container_name: vid-mariadb
volumes:
- - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf
- - /var/lib/mysql
+ - ${WORKSPACE}/data/clone/vid/lf_config/vid-my.cnf:/etc/mysql/my.cnf
+ - /var/lib/mysql
- sdc_simulator:
+ so-simulator:
build:
context: simulators
- dockerfile: SDC_simulator
+ dockerfile: SO-simulator
ports:
- - "8443:8443"
- container_name: sdc_simulator
\ No newline at end of file
+ - "8444:8443"
+ container_name: so-simulator
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/SDC.py b/tests/vid/resources/simulators/SDC.py
deleted file mode 100644
index e99a0bd..0000000
--- a/tests/vid/resources/simulators/SDC.py
+++ /dev/null
@@ -1,37 +0,0 @@
-import ssl
-from http.server import BaseHTTPRequestHandler, HTTPServer
-
-from sys import argv
-
-DEFAULT_PORT = 8443
-
-
-class SDCHandler(BaseHTTPRequestHandler):
-
- def __init__(self, request, client_address, server):
- self.response_on_get = self._read_on_get_response()
- super().__init__(request, client_address, server)
-
- def do_GET(self):
- self.send_response(200)
- self._set_headers()
-
- self.wfile.write(self.response_on_get.encode("utf-8"))
- return
-
- def _set_headers(self):
- self.send_header('Content-Type', 'application/json')
- self.end_headers()
-
- @staticmethod
- def _read_on_get_response():
- with open('sdc_get_response.json', 'r') as file:
- return file.read()
-
-
-if __name__ == '__main__':
- SDCHandler.protocol_version = "HTTP/1.1"
-
- httpd = HTTPServer(('', DEFAULT_PORT), SDCHandler)
- httpd.socket = ssl.wrap_socket(httpd.socket, server_side=True, certfile='cert.pem', keyfile='key.pem')
- httpd.serve_forever()
diff --git a/tests/vid/resources/simulators/SDC_simulator b/tests/vid/resources/simulators/SDC_simulator
deleted file mode 100644
index c099787..0000000
--- a/tests/vid/resources/simulators/SDC_simulator
+++ /dev/null
@@ -1,15 +0,0 @@
-FROM alpine:latest
-
-RUN apk add --no-cache python3 && \
- python3 -m ensurepip && \
- rm -r /usr/lib/python*/ensurepip && \
- pip3 install --upgrade pip setuptools && \
- if [ ! -e /usr/bin/pip ]; then ln -s pip3 /usr/bin/pip ; fi && \
- if [[ ! -e /usr/bin/python ]]; then ln -sf /usr/bin/python3 /usr/bin/python; fi && \
- rm -r /root/.cache
-
-ADD SDC.py /
-
-EXPOSE 8443
-
-CMD [ "python", "./SDC.py" ]
diff --git a/tests/vid/resources/simulators/SO-simulator b/tests/vid/resources/simulators/SO-simulator
new file mode 100644
index 0000000..5458766
--- /dev/null
+++ b/tests/vid/resources/simulators/SO-simulator
@@ -0,0 +1,8 @@
+FROM frolvlad/alpine-python3
+
+ADD SO.py /
+ADD so_post_response.json /
+
+EXPOSE 8443
+
+CMD [ "python", "./SO.py" ]
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/SO.py b/tests/vid/resources/simulators/SO.py
new file mode 100644
index 0000000..edc15f6
--- /dev/null
+++ b/tests/vid/resources/simulators/SO.py
@@ -0,0 +1,45 @@
+import logging
+from http.server import BaseHTTPRequestHandler, HTTPServer
+
+DEFAULT_PORT = 8443
+
+
+class SOHandler(BaseHTTPRequestHandler):
+
+ def __init__(self, request, client_address, server):
+ self.response_on_get = self._read_on_get_response()
+ super().__init__(request, client_address, server)
+
+ def do_POST(self):
+ logging.info('POST called')
+ self.send_response(200)
+ self._set_headers()
+
+ self.wfile.write(self.response_on_get.encode("utf-8"))
+ return
+
+ def do_GET(self):
+ logging.info('GET called')
+ self.send_response(200)
+ self._set_headers()
+
+ self.wfile.write(self.response_on_get.encode("utf-8"))
+ return
+
+ def _set_headers(self):
+ self.send_header('Content-Type', 'application/json')
+ self.end_headers()
+
+ @staticmethod
+ def _read_on_get_response():
+ with open('so_post_response.json', 'r') as file:
+ return file.read()
+
+
+if __name__ == '__main__':
+ logging.basicConfig(filename='output.log', level=logging.INFO)
+ SOHandler.protocol_version = "HTTP/1.0"
+
+ httpd = HTTPServer(('', DEFAULT_PORT), SOHandler)
+ logging.info("serving on: " + str(httpd.socket.getsockname()))
+ httpd.serve_forever()
diff --git a/tests/vid/resources/simulators/cert.pem b/tests/vid/resources/simulators/cert.pem
deleted file mode 100644
index cea1e37..0000000
--- a/tests/vid/resources/simulators/cert.pem
+++ /dev/null
@@ -1,74 +0,0 @@
-Bag Attributes
- friendlyName: 1
- localKeyID: 54 69 6D 65 20 31 35 33 35 36 31 39 34 30 35 39 30 38
-subject=/C=US/ST=Michigan/L=Southfield/O=ATT Services, Inc./OU=ASDC/CN=mtanjv9sdcf51.aic.cip.att.com
-issuer=/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
------BEGIN CERTIFICATE-----
-MIIGDzCCBPegAwIBAgIQfZLBdhhGhkOBcXuI5oF0gTANBgkqhkiG9w0BAQsFADB+
-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd
-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj
-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE1MTIwOTAwMDAwMFoX
-DTE2MTIwODIzN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KGGmh0dHA6Ly9zcy5zeW1jYi5jb20v
-c3MuY3J0MIIBBQYKKwYBBAHWeQIEAgSB9gSB8wDxAHYA3esdK3oNT6Ygi4GtgWhw
-fi6OnQHVXIiNPRHEzbbsvswAAAFRh4XRnAAABAMARzBFAiBXZqph5qeHUUnY8OkH
-jJLo454/8c9IBB7asjEYWYoBPQIhAKAwvP8KfqilgawBkuRV7r41P8Xd3Yi72RQO
-1Dvpi8rkAHcApLkJkLQYWBSHuxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFRh4XR
-3AAABAMASDBGAiEAon+cZcRpSsuo1aiCtaN3aAG0EqJb/1jJ4m4Q/qo1nEoCIQCr
-KrBNyywa4OTmSVSAsyazbnMr5ldimxNORhhtyGeFLDANBgkqhkiG9w0BAQsFAAOC
-AQEAG3/Mq8F0wbCpOOMCq4dZwgLENBjor9b9UljQZ+sgt7Nn00bfGdxY4MKtOTiK
-9ks/nV9sW0KyvhsZvLPPgdSCnu0MZogWQsKqQDkIkJoHtFRSaYTT1vLAIoKz/dN+
-SBS71EzFH92lMfiFtAjfTrFady0/6z7lp4VZwbXLWjHw6LQESENc29Xw1jpCVkg8
-iB2n/qCFfyw3HuvP+eW2TLmnHOl0tda1vrYKCXT2n7HepiJM3g9yLjb/w3MuxEmw
-dj1DqRemXtOUJW0mQXn1mRBjXEunzHoCr3GaeSU6G3RbIzXr34Hsv4IbggkhRula
-gQIYidtDmw0PS1kyaFvlhZkd1g==
------END CERTIFICATE-----
-Bag Attributes
- friendlyName: CN=Symantec Class 3 Secure Server CA - G4,OU=Symantec Trust Network,O=Symantec Corporation,C=US
-subject=/C=US/O=Symantec Corporation/OU=Symantec Trust Network/CN=Symantec Class 3 Secure Server CA - G4
-issuer=/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
------BEGIN CERTIFICATE-----
-MIIFODCCBCCgAwIBAgIQUT+5dDh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B/wQEAwIBBjAvBggrBgEFBQcBAQQjMCEw
-HwYIKwYBBQUHMAGGE2h0dHA6Ly9zMi5zeW1jYi5jb20wawYDVR0gBGQwYjBgBgpg
-hkgBhvhFAQc2MFIwJgYIKwYBBQUHAgEWGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20v
-Y3BzMCgGCCsGAQUFBwICMBwaGmh0dHA6Ly93d3cuc3ltYXV0aC5jb20vcnBhMCkG
-A1UdEQQiMCCkHjAcMRowGAYDVQQDExFTeW1hbnRlY1BLSS0xLTUzNDAdBgNVHQ4E
-FgQUX2DPYZBV34RDFIpgKrL1evRDGO8wHwYDVR0jBBgwFoAUf9Nlp8Ld7LvwMAnz
-Qzn6Aq8zMTMwDQYJKoZIhvcNAQELBQADggEBAF6UVkndji1l9cE2UbYD49qecxny
-H1mrWH5sJgUs+oHXXCMXIiw3k/eG7IXmsKP9H+IyqEVv4dn7ua/ScKAyQmW/hP4W
-Ko8/xabWo5N9Q+l0IZE1KPRj6S7t9/Vcf0uatSDpCr3gRRAMFJSaXaXjS5HoJJtG
-QGX0InLNmfiIEfXzf+YzguaoxX7+0AjiJVgIcWjmzaLmFN5OUiQt/eV5E1PnXi8t
-TRttQBVSK/eHiXgSgW7ZTaoteNTCLD0IX4eRnh8OsN4wUmSGiaqdZpwOdgyA8nTY
-Kvi4Os7X1g8RvmurFPW9QaAiY4nxug9vKWNmLT+sjHLF+8fk1A/yO0+MKcc=
------END CERTIFICATE-----
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/key.pem b/tests/vid/resources/simulators/key.pem
deleted file mode 100644
index 641d13f..0000000
--- a/tests/vid/resources/simulators/key.pem
+++ /dev/null
@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDrqffRX4JNNpcF
-7+d+WNRQghPLy+OwSo/eoeraPK18MDfvVvsYlRCIA1yjlgQu1vIhD9rTnUps4t8L
-GSIr2h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LgnTeyYjdnHSa6mghEMVecF9L/iXzIjopaM5DUcFRkG
-8sRD7QxLLR6i4/lvFeAT3B3jKvtO0q4AAnD6NwUdoe5cJNW6l/REalNYsK8CgYBw
-n7lF2CiwW9YevE7RXIc8rB7jl943/LqLHFzc+mjh7QLIh9jzXSm+E6IIY8KXX9dP
-C2WGzDSf8ue0xmnI8PWXPGAfVhoDSboPYI0A/YFIKUJgAyC6ByiKvSQstCdRnA3Q
-/giY1Fgj4AAWh4ZNjxua6g4Y3bem5m5nBlT3a3Q76wKBgQDSMFNfVNWautPQvcYB
-iu9oQhbXVkjh+ToFWq6pW4VaWhEf/6hqvihc6PcB7FXJ1v1/ybko6cIgVmFUt43s
-it1q5aLy3v6GTS/UnDZI3r5oECEuLeUqnHm3qilbatUtwvxghgdwGK+YG0yTfS3y
-GqdNDH5YdJJMyiLdQlLIzJb/XQ==
------END PRIVATE KEY-----
diff --git a/tests/vid/resources/simulators/sdc_get_response.json b/tests/vid/resources/simulators/sdc_get_response.json
deleted file mode 100644
index 9f7e118..0000000
--- a/tests/vid/resources/simulators/sdc_get_response.json
+++ /dev/null
@@ -1,301 +0,0 @@
-{
- "service": {
- "uuid": "2763bc78-8523-482f-895b-0c0db7364224",
- "invariantUuid": "abb2dc66-b211-49d2-ab2f-8774694136fa",
- "name": "Bare2",
- "version": "1.0",
- "toscaModelURL": null,
- "category": "Network L1-3",
- "serviceType": "",
- "serviceRole": "",
- "description": "Bare2",
- "serviceEcompNaming": "true",
- "instantiationType": "ClientConfig",
- "inputs": {}
- },
- "vnfs": {
- "95e654c0-676b-4386-8a69 0": {
- "uuid": "d6395498-7ecb-4eba-bf84-4380f6e9cdcf",
- "invariantUuid": "16262b97-bcb1-4033-8f9f-a3016eaf1ec3",
- "description": "vendor software product",
- "name": "95e654c0-676b-4386-8a69",
- "version": "1.0",
- "customizationUuid": "34a3b91d-8d73-4412-bf4e-c6456741007f",
- "inputs": {},
- "commands": {},
- "properties": {
- "vf_module_id": "vTrafficPNG",
- "repo_url_blob": "https://nexus.onap.org/content/sites/raw",
- "unprotected_private_subnet_id": "zdfw1fwl01_unprotected_sub",
- "public_net_id": "PUT THE PUBLIC NETWORK ID HERE",
- "vfw_private_ip_0": "192.168.10.100",
- "onap_private_subnet_id": "PUT THE ONAP PRIVATE NETWORK NAME HERE",
- "onap_private_net_cidr": "10.0.0.0/16",
- "image_name": "PUT THE VM IMAGE NAME HERE (UBUNTU 1404)",
- "flavor_name": "PUT THE VM FLAVOR NAME HERE (m1.medium suggested)",
- "vnf_id": "vPNG_Firewall_demo_app",
- "vpg_name_0": "zdfw1fwl01pgn01",
- "vpg_private_ip_1": "10.0.100.2",
- "vsn_private_ip_0": "192.168.20.250",
- "vpg_private_ip_0": "192.168.10.200",
- "protected_private_net_cidr": "192.168.20.0/24",
- "unprotected_private_net_cidr": "192.168.10.0/24",
- "nf_naming": "{ecomp_generated_naming=true}",
- "multi_stage_design": "false",
- "onap_private_net_id": "PUT THE ONAP PRIVATE NETWORK NAME HERE",
- "unprotected_private_net_id": "zdfw1fwl01_unprotected",
- "availability_zone_max_count": "1",
- "demo_artifacts_version": "1.2.1",
- "pub_key": "PUT YOUR PUBLIC KEY HERE",
- "key_name": "vfw_key",
- "repo_url_artifacts": "https://nexus.onap.org/content/repositories/releases",
- "install_script_version": "1.2.1",
- "cloud_env": "PUT openstack OR rackspace HERE"
- },
- "type": "VF",
- "modelCustomizationName": "95e654c0-676b-4386-8a69 0",
- "vfModules": {
- "95e654c0676b43868a690..95e654c0676b43868a69..base_vpkg..module-0": {
- "uuid": "12082e9d-a854-48cc-8243-e24b26199856",
- "invariantUuid": "239419df-3375-49fe-9dd4-73b3393858ba",
- "customizationUuid": "32c824f7-5910-4d7a-88ad-188d4905675d",
- "description": null,
- "name": "95e654c0676b43868a69..base_vpkg..module-0",
- "version": "1",
- "volumeGroupAllowed": false,
- "commands": {},
- "modelCustomizationName": "95e654c0676b43868a69..base_vpkg..module-0",
- "properties": {
- "min_vf_module_instances": {
- "name": "min_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "The minimum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vf_module_label": {
- "name": "vf_module_label",
- "value": "base_vpkg",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Alternate textual key used to reference this VF-Module model. Must be unique within the VNF model\n",
- "default": null,
- "type": "string"
- },
- "max_vf_module_instances": {
- "name": "max_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The maximum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vfc_list": {
- "name": "vfc_list",
- "value": null,
- "entrySchema": {
- "description": "<vfc_id>:<count>",
- "type": "string"
- },
- "required": false,
- "constraints": [],
- "description": "Identifies the set of VM types and their count included in the VF-Module\n",
- "default": null,
- "type": "map"
- },
- "vf_module_type": {
- "name": "vf_module_type",
- "value": "Base",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "",
- "default": null,
- "type": "string"
- },
- "vf_module_description": {
- "name": "vf_module_description",
- "value": null,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Description of the VF-modules contents and purpose (e.g. \"Front-End\" or \"Database Cluster\")\n",
- "default": null,
- "type": "string"
- },
- "initial_count": {
- "name": "initial_count",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The initial count of instances of the VF-Module. The value must be in the range between min_vfmodule_instances and max_vfmodule_instances. If no value provided the initial count is the min_vfmodule_instances.\n",
- "default": null,
- "type": "integer"
- },
- "volume_group": {
- "name": "volume_group",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "\"true\" indicates that this VF Module model requires attachment to a Volume Group. VID operator must select the Volume Group instance to attach to a VF-Module at deployment time.\n",
- "default": false,
- "type": "boolean"
- },
- "availability_zone_count": {
- "name": "availability_zone_count",
- "value": null,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "Quantity of Availability Zones needed for this VF-Module (source: Extracted from VF-Module HEAT template)\n",
- "default": null,
- "type": "integer"
- },
- "isBase": {
- "name": "isBase",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Whether this module should be deployed before other modules",
- "default": false,
- "type": "boolean"
- }
- }
- }
- },
- "volumeGroups": {}
- }
- },
- "networks": {},
- "configurations": {},
- "serviceProxies": {},
- "vfModules": {
- "95e654c0676b43868a690..95e654c0676b43868a69..base_vpkg..module-0": {
- "uuid": "12082e9d-a854-48cc-8243-e24b26199856",
- "invariantUuid": "239419df-3375-49fe-9dd4-73b3393858ba",
- "customizationUuid": "32c824f7-5910-4d7a-88ad-188d4905675d",
- "description": null,
- "name": "95e654c0676b43868a69..base_vpkg..module-0",
- "version": "1",
- "volumeGroupAllowed": false,
- "commands": {},
- "modelCustomizationName": "95e654c0676b43868a69..base_vpkg..module-0",
- "properties": {
- "min_vf_module_instances": {
- "name": "min_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "The minimum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vf_module_label": {
- "name": "vf_module_label",
- "value": "base_vpkg",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Alternate textual key used to reference this VF-Module model. Must be unique within the VNF model\n",
- "default": null,
- "type": "string"
- },
- "max_vf_module_instances": {
- "name": "max_vf_module_instances",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The maximum instances of this VF-Module",
- "default": null,
- "type": "integer"
- },
- "vfc_list": {
- "name": "vfc_list",
- "value": null,
- "entrySchema": {
- "description": "<vfc_id>:<count>",
- "type": "string"
- },
- "required": false,
- "constraints": [],
- "description": "Identifies the set of VM types and their count included in the VF-Module\n",
- "default": null,
- "type": "map"
- },
- "vf_module_type": {
- "name": "vf_module_type",
- "value": "Base",
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "",
- "default": null,
- "type": "string"
- },
- "vf_module_description": {
- "name": "vf_module_description",
- "value": null,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Description of the VF-modules contents and purpose (e.g. \"Front-End\" or \"Database Cluster\")\n",
- "default": null,
- "type": "string"
- },
- "initial_count": {
- "name": "initial_count",
- "value": 1,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "The initial count of instances of the VF-Module. The value must be in the range between min_vfmodule_instances and max_vfmodule_instances. If no value provided the initial count is the min_vfmodule_instances.\n",
- "default": null,
- "type": "integer"
- },
- "volume_group": {
- "name": "volume_group",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "\"true\" indicates that this VF Module model requires attachment to a Volume Group. VID operator must select the Volume Group instance to attach to a VF-Module at deployment time.\n",
- "default": false,
- "type": "boolean"
- },
- "availability_zone_count": {
- "name": "availability_zone_count",
- "value": null,
- "entrySchema": null,
- "required": false,
- "constraints": [],
- "description": "Quantity of Availability Zones needed for this VF-Module (source: Extracted from VF-Module HEAT template)\n",
- "default": null,
- "type": "integer"
- },
- "isBase": {
- "name": "isBase",
- "value": false,
- "entrySchema": null,
- "required": true,
- "constraints": [],
- "description": "Whether this module should be deployed before other modules",
- "default": false,
- "type": "boolean"
- }
- }
- }
- },
- "volumeGroups": {},
- "pnfs": {}
-}
\ No newline at end of file
diff --git a/tests/vid/resources/simulators/so_post_response.json b/tests/vid/resources/simulators/so_post_response.json
new file mode 100644
index 0000000..391231d
--- /dev/null
+++ b/tests/vid/resources/simulators/so_post_response.json
@@ -0,0 +1,9 @@
+{
+ "status": 202,
+ "entity": {
+ "requestReferences": {
+ "instanceId": "fffcbb6c-1983-42df-9ca8-89ae8b3a46c1",
+ "requestId": "b2197d7e-3a7d-410e-82ba-7b7e8191bc46"
+ }
+ }
+}
\ No newline at end of file