Check in VF model into SDC 09/21809/1
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Thu, 2 Nov 2017 08:46:49 +0000 (14:16 +0530)
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Thu, 2 Nov 2017 08:46:49 +0000 (14:16 +0530)
CLI-57

Change-Id: Iaa33bd6ed397e14209851b7d51665ef06d674cb9
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
plugins/sdc/src/main/resources/onap-cli-schema/vf/vf-model-checkin-schema-1.1.yaml [new file with mode: 0644]
plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json [new file with mode: 0644]
plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml [new file with mode: 0644]

diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/vf/vf-model-checkin-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/vf/vf-model-checkin-schema-1.1.yaml
new file mode 100644 (file)
index 0000000..4ee74e1
--- /dev/null
@@ -0,0 +1,26 @@
+open_cli_schema_version: 1.0
+name: vf-model-checkin
+description: Checkin Virtual function
+version: onap-1.1
+service:
+  name: sdc
+  version: v1.0
+  auth: basic
+  mode: direct
+
+parameters:
+  - name: vf-id
+    description: VF ID
+    type: string
+    long_option: vf-id
+    short_option: b
+    is_optional: true
+
+http:
+  request:
+    uri: /sdc2/rest/v1/catalog/resources/${vf-id}/lifecycleState/checkin
+    method: POST
+    body: '{"userRemarks": "Checked in via CLI"}'
+  success_codes:
+    - 200
+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-moco.json
new file mode 100644 (file)
index 0000000..5fd1471
--- /dev/null
@@ -0,0 +1,50 @@
+[ {
+  "request" : {
+    "method" : "post",
+    "uri" : "/sdc2/rest/v1/catalog/resources/66269482-0b27-40e3-9c4d-6a26fb67d9ff/lifecycleState/checkin",
+    "headers" : {
+      "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+      "X-FromAppId" : "onap-cli",
+      "Accept" : "application/json",
+      "USER_ID" : "cs0008",
+      "X-TransactionId" : "req-a683f176-3428-433d-aabe-f5aa6c5a7e01",
+      "Content-Type" : "application/json"
+    },
+    "json" : {
+      "userRemarks" : "Checked in via CLI"
+    }
+  },
+  "response" : {
+    "status" : 200,
+    "json" : {
+      "uniqueId" : "66269482-0b27-40e3-9c4d-6a26fb67d9ff",
+      "name" : "kanag-cli-VLB",
+      "version" : "0.1",
+      "isHighestVersion" : true,
+      "creationDate" : 1509603052084,
+      "lastUpdateDate" : 1509603259759,
+      "description" : "VF created from CLI",
+      "lifecycleState" : "NOT_CERTIFIED_CHECKIN",
+      "tags" : [ "CLI", "kanag-cli-VLB" ],
+      "icon" : "defaulticon",
+      "normalizedName" : "kanagclivlb",
+      "systemName" : "KanagCliVlb",
+      "contactId" : "cs0008",
+      "csarUUID" : "f19cad8343794e93acb9cda2e4126281",
+      "csarVersion" : "2.0",
+      "importedToscaChecksum" : "NDQzNmIwOWE1NjQ2NjU2YTNkMWVmNzcxMTczMjRmNDE=",
+      "invariantUUID" : "2d455337-57eb-4edf-a8b9-9f87fd85bc0e",
+      "componentType" : "RESOURCE",
+      "creatorUserId" : "cs0008",
+      "creatorFullName" : "Carlos Santana",
+      "lastUpdaterUserId" : "cs0008",
+      "lastUpdaterFullName" : "Carlos Santana",
+      "vendorName" : "Kanag-cli",
+      "vendorRelease" : "1.0",
+      "resourceVendorModelNumber" : "",
+      "resourceType" : "VF",
+      "toscaResourceName" : "org.openecomp.resource.vf.KanagCliVlb",
+      "uuid" : "46c89121-b37f-4192-8841-25c93165b843"
+    }
+  }
+} ]
\ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/vf/vf-model-checkin-schema-1.1-sample.yaml
new file mode 100644 (file)
index 0000000..40d55af
--- /dev/null
@@ -0,0 +1,9 @@
+onap_cli_sample_version: 1.0
+name: vf-model-checkin
+version: onap-1.1
+samples:
+  sample1:
+    name: vf-model-checkin
+    input: --vf-id 66269482-0b27-40e3-9c4d-6a26fb67d9ff
+    moco: vf-model-checkin-schema-1.1-moco.json
+    ouput:
\ No newline at end of file