Added CSIT for E2EService 61/14461/1
authorSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Fri, 22 Sep 2017 05:38:15 +0000 (11:08 +0530)
committerSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Fri, 22 Sep 2017 05:38:15 +0000 (11:08 +0530)
Issue-Id: SO-157

Change-Id: Icb522734d87325cda7f3d9b7b2f25836cd9f31c2
Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
test/csit/tests/so/sanity-check/data/createE2eservice.json [new file with mode: 0644]
test/csit/tests/so/sanity-check/data/createE2eserviceInvalid.json [new file with mode: 0644]
test/csit/tests/so/sanity-check/data/deleteE2eservice.json [new file with mode: 0644]
test/csit/tests/so/sanity-check/data/deleteE2eserviceInvalid.json [new file with mode: 0644]
test/csit/tests/so/sanity-check/sanity_test_so.robot

diff --git a/test/csit/tests/so/sanity-check/data/createE2eservice.json b/test/csit/tests/so/sanity-check/data/createE2eservice.json
new file mode 100644 (file)
index 0000000..b24cc9c
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "service": {
+    "name": "service",
+    "description": "so_test1",
+    "serviceDefId": "182834434345",
+    "templateId": "5994888392",
+    "parameters": {
+      "domainHost": "127.0.0.1",
+      "nodeTemplateName": "model:v3",
+      "nodeType": "service",
+      "globalSubscriberId": "49923893499",
+      "subscriberName": "NEED THIS UUI - AAI",
+      "requestParameters": {
+        "subscriptionServiceType": "MOG", 
+         "userParams": [
+          {
+            "name": "someUserParam",
+            "value": "someValue"
+          },
+          {
+            "name": "segments",
+            "value": "[\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"IMS_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n},\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"EPC_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n}\n]"
+          },
+          {
+            "name": "nsParameters",
+            "value": "{\n        \"locationConstraints\": {},\n        \"additionalParamForNs\": {\n          \"E2EServcie.param1\": \"value1\",\n          \"E2EServcie.param2\": \"value2\"\n        }\n      }"
+          }
+        ]
+  }}}
+}
\ No newline at end of file
diff --git a/test/csit/tests/so/sanity-check/data/createE2eserviceInvalid.json b/test/csit/tests/so/sanity-check/data/createE2eserviceInvalid.json
new file mode 100644 (file)
index 0000000..78d303b
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "service": {
+    "serviceName": "service",
+    "description": "so_test1",
+    "serviceDefId": "182834434345",
+    "templateId": "5994888392",
+    "parameters": {
+      "domainHost": "127.0.0.1",
+      "nodeTemplateName": "model:v3",
+      "nodeType": "service",
+      "globalSubscriberId": "49923893499",
+      "subscriberName": "NEED THIS UUI - AAI",
+      "requestParameters": {
+        "subscriptionServiceType": "MOG", 
+         "userParams": [
+          {
+            "name": "someUserParam",
+            "value": "someValue"
+          },
+          {
+            "name": "segments",
+            "value": "[\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"IMS_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n},\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"EPC_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n}\n]"
+          },
+          {
+            "name": "nsParameters",
+            "value": "{\n        \"locationConstraints\": {},\n        \"additionalParamForNs\": {\n          \"E2EServcie.param1\": \"value1\",\n          \"E2EServcie.param2\": \"value2\"\n        }\n      }"
+          }
+        ]
+  }}}
+}
\ No newline at end of file
diff --git a/test/csit/tests/so/sanity-check/data/deleteE2eservice.json b/test/csit/tests/so/sanity-check/data/deleteE2eservice.json
new file mode 100644 (file)
index 0000000..f5a87b1
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "service": {
+    "name": "instanceName",
+    "description": "so_test1",
+    "serviceDefId": "modelInvariantId value from SDC?",
+    "templateId": "modelVersionId value from SDC??",
+    "parameters": {
+      "domainHost": "localhost",
+      "nodeTemplateName": "modelName+:+modelVersion",
+      "nodeType": "modelType?? == service",
+      "globalSubscriberId": "NEED THIS UUI - AAI",
+      "subscriberName": "NEED THIS UUI - AAI",
+      "requestParameters": {
+        "subscriptionServiceType": "MOG", 
+         "userParams": [
+          {
+            "name": "someUserParam",
+            "value": "someValue"
+          },
+          {
+            "name": "segments",
+            "value": "[\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"IMS_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n},\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"EPC_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n}\n]"
+          },
+          {
+            "name": "nsParameters",
+            "value": "{\n        \"locationConstraints\": {},\n        \"additionalParamForNs\": {\n          \"E2EServcie.param1\": \"value1\",\n          \"E2EServcie.param2\": \"value2\"\n        }\n      }"
+          }
+        ]
+  }}}
+}
\ No newline at end of file
diff --git a/test/csit/tests/so/sanity-check/data/deleteE2eserviceInvalid.json b/test/csit/tests/so/sanity-check/data/deleteE2eserviceInvalid.json
new file mode 100644 (file)
index 0000000..62b9726
--- /dev/null
@@ -0,0 +1,30 @@
+{
+  "service": {
+    "serviceName": "instanceName",
+    "description": "so_test1",
+    "serviceDefId": "modelInvariantId value from SDC?",
+    "templateId": "modelVersionId value from SDC??",
+    "parameters": {
+      "domainHost": "localhost",
+      "nodeTemplateName": "modelName+:+modelVersion",
+      "nodeType": "modelType?? == service",
+      "globalSubscriberId": "NEED THIS UUI - AAI",
+      "subscriberName": "NEED THIS UUI - AAI",
+      "requestParameters": {
+        "subscriptionServiceType": "MOG", 
+         "userParams": [
+          {
+            "name": "someUserParam",
+            "value": "someValue"
+          },
+          {
+            "name": "segments",
+            "value": "[\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"IMS_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n},\n{\n\"domainHost\":\"localhost\",\n\"nodeTemplateName\":\"EPC_NS\",\n\"nodeType\":\"tosca.nodes.nfv.NS.IMS\",\n\"segments\":[\n\n],\n\"nsParameters\":{\n\"locationConstraints\":[\n{\n\"vnfProfileId\":\"zte-CSCF-1.0\",\n\"locationConstraints\":{\n\"vimId\":\"4050083f-465f-4838-af1e-47a545222ad0\"\n}\n}\n],\n\"additionalParamForNs\":{\n\"externalDataNetworkName\":\"Flow_out_net\",\n\"m6000_mng_ip\":\"181.18.20.2\",\n\"externalCompanyFtpDataNetworkName\":\"Flow_out_net\",\n\"externalPluginManageNetworkName\":\"plugin_net_2014\",\n\"externalManageNetworkName\":\"mng_net_2017\",\n\"sfc_data_network\":\"sfc_data_net_2016\",\n\"NatIpRange\":\"210.1.1.10-210.1.1.20\",\n\"location\":\"4050083f-465f-4838-af1e-47a545222ad0\",\n\"sdncontroller\":\"9b9f02c0-298b-458a-bc9c-be3692e4f35e\"\n}\n}\n}\n]"
+          },
+          {
+            "name": "nsParameters",
+            "value": "{\n        \"locationConstraints\": {},\n        \"additionalParamForNs\": {\n          \"E2EServcie.param1\": \"value1\",\n          \"E2EServcie.param2\": \"value2\"\n        }\n      }"
+          }
+        ]
+  }}}
+}
\ No newline at end of file
index 73a9f3f..27a16fc 100644 (file)
@@ -68,4 +68,46 @@ Get Orchestration Requests
     Create Session   refrepo  http://${REPO_IP}:8080
     &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
     ${resp}=    Get Request    refrepo    /ecomp/mso/infra/orchestrationRequests/v3    headers=${headers}
-    Should Not Contain     ${resp.content}      null
\ No newline at end of file
+    Should Not Contain     ${resp.content}      null
+       
+Create E2EService
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}createE2eservice.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
+
+Create E2EService with invalid credential
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}createE2eservice.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI=    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
+
+Create E2EService with invalid Input data
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}createE2eserviceInvalid.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI=    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
+
+Delete E2EService
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}deleteE2eservice.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${resp}=    Delete Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
+
+Delete E2EService with invalid credential
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}deleteE2eservice.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQxOnBhc3N3b3JkMTI=    Content-Type=application/json    Accept=application/json
+    ${resp}=    Delete Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
+
+Delete E2EService with invalid input data
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}deleteE2eserviceInvalid.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${resp}=    Delete Request    refrepo    /ecomp/mso/infra/e2eServiceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000    data=${data}    headers=${headers}
+    Run Keyword If  '${resp.status_code}' == '400' or '${resp.status_code}' == '404' or '${resp.status_code}' == '405'  log to console  \nexecuted with expected result
\ No newline at end of file