Adding CSIT test case for VF 91/15891/1
authorSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Wed, 27 Sep 2017 09:53:42 +0000 (15:23 +0530)
committerSeshu-Kumar-M <seshu.kumar.m@huawei.com>
Wed, 27 Sep 2017 09:53:42 +0000 (15:23 +0530)
Adding CSIT test case for replace and update VF

IssueId: SO-162

Change-Id: I9cbcae87c0412441377f21589bd76cc3dc116a92
Signed-off-by: Seshu-Kumar-M <seshu.kumar.m@huawei.com>
test/csit/tests/so/sanity-check/data/replaceVF.json [new file with mode: 0644]
test/csit/tests/so/sanity-check/data/updateVF.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/replaceVF.json b/test/csit/tests/so/sanity-check/data/replaceVF.json
new file mode 100644 (file)
index 0000000..2311699
--- /dev/null
@@ -0,0 +1,60 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelType": "vfModule",
+      "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+      "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+      "modelName": "vSAMP12..base..module-0",
+      "modelVersion": "2"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "mdt1",
+      "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+    },
+    "requestInfo": {
+      "source": "VID",
+      "suppressRollback": true,
+         "requestorId": "az2016"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+          "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+          "modelInfo": {
+            "modelType": "volumeGroup"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": " {serviceInstanceId} ",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+            "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+            "modelName": "{parent\tservice\tmodel\tname}",
+            "modelVersion": "2.0"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": " {vnfInstanceId} ",
+          "modelInfo": {
+            "modelType": "vnf",
+            "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+            "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+            "modelName": " vSAMP12 ",
+            "modelVersion": "2.0",
+            "modelCustomizationName": "vSAMP12 1",
+                       "modelCustomizationId": "c539433a-84a6-4082-a12e-5c9b00c3b960"
+          }
+        }
+      }
+    ],
+    "requestParameters": {
+      "userParams": []
+    }
+  }
+}
diff --git a/test/csit/tests/so/sanity-check/data/updateVF.json b/test/csit/tests/so/sanity-check/data/updateVF.json
new file mode 100644 (file)
index 0000000..671cc79
--- /dev/null
@@ -0,0 +1,61 @@
+{
+  "requestDetails": {
+    "modelInfo": {
+      "modelType": "vfModule",
+      "modelInvariantId": "ff5256d2-5a33-55df-13ab-12abad84e7ff",
+      "modelNameVersionId": "fe6478e5-ea33-3346-ac12-ab121484a3fe",
+      "modelName": "vSAMP12..base..module-0",
+      "modelVersion": "1"
+    },
+    "cloudConfiguration": {
+      "lcpCloudRegionId": "mdt1",
+      "tenantId": "88a6ca3ee0394ade9403f075db23167e"
+    },
+    "requestInfo": {
+      "source": "VID",
+      "suppressRollback": true,
+         "requestorId": "az2016"
+    },
+    "relatedInstanceList": [
+      {
+        "relatedInstance": {
+          "instanceId": "17ef4658-bd1f-4ef0-9ca0-ea76e2bf122c",
+          "instanceName": "MSOTESTVOL103a-vSAMP12_base_module-0_vol",
+          "modelInfo": {
+            "modelType": "volumeGroup"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": " {serviceInstanceId} ",
+          "modelInfo": {
+            "modelType": "service",
+            "modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff",
+            "modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe",
+            "modelName": "{parent\tservice\tmodel\tname}",
+            "modelVersion": "2.0"
+          }
+        }
+      },
+      {
+        "relatedInstance": {
+          "instanceId": " {vnfInstanceId} ",
+          "modelInfo": {
+            "modelType": "vnf",
+            "modelInvariantId": "ff5256d1-5a33-55df-13ab-12abad84e7ff",
+            "modelNameVersionId": "fe6478e4-ea33-3346-ac12-ab121484a3fe",
+            "modelName": " vSAMP12 ",
+            "modelVersion": "2.0",
+            "modelCustomizationName": "vSAMP12 1",
+                       "modelCustomizationId": "c539433a-84a6-4082-a12e-5c9b00c3b960"
+          }
+        }
+      }
+    ],
+    "requestParameters": {
+         "usePreload": true,
+      "userParams": []
+    }
+  }
+}
index f6808b4..0654145 100644 (file)
@@ -72,6 +72,13 @@ Create VF Module instance
     ${resp}=    Post Request    refrepo    /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules    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
 
+Update VF Module instance
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}updateVF.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    refrepo    /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff    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 VF Module instance
     Create Session   refrepo  http://${REPO_IP}:8080
     ${data}=    Get Binary File     ${CURDIR}${/}data${/}deleteVF.json
@@ -79,6 +86,13 @@ Delete VF Module instance
     ${resp}=    Delete Request    refrepo    /ecomp/mso/infra/serviceInstances/v3/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff    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
 
+Replace VF Module instance
+    Create Session   refrepo  http://${REPO_IP}:8080
+    ${data}=    Get Binary File     ${CURDIR}${/}data${/}replaceVF.json
+    &{headers}=  Create Dictionary    Authorization=Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==    Content-Type=application/json    Accept=application/json
+    ${resp}=    Post Request    refrepo    /ecomp/mso/infra/serviceInstances/v5/ff305d54-75b4-431b-adb2-eb6b9e5ff000/vnfs/aca51b0a-710d-4155-bc7c-7cef19d9a94e/vfModules/ff305d54-75b4-ff1b-bdb2-eb6b9e5460ff/replace    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 Network instance
     Create Session   refrepo  http://${REPO_IP}:8080
     ${data}=    Get Binary File     ${CURDIR}${/}data${/}createNetwork.json