aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-02 14:19:13 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-11-02 14:19:13 +0530
commitd110bd0295076517cb635c823073a253b91accb3 (patch)
tree3ee07b39837293ecfe451e4ae5908c2ab1bd0abe /plugins
parent1997f7cd489ebc16e384e9699904a85093fd36fc (diff)
Certify service model in SDC
CLI-57 Change-Id: I2f54fd934d88e0375659dbfcc9f70cdc684a2009 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml26
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml26
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml26
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json56
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml9
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json56
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml9
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json54
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml9
9 files changed, 271 insertions, 0 deletions
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml
new file mode 100644
index 00000000..3402d673
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-complete-schema-1.1.yaml
@@ -0,0 +1,26 @@
+open_cli_schema_version: 1.0
+name: service-model-certify-complete
+description: Completes the certification of Service model in SDC
+version: onap-1.1
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: service-model-id
+ description: Service model ID
+ type: string
+ long_option: service-model-id
+ short_option: b
+ is_optional: true
+
+http:
+ request:
+ uri: /sdc2/rest/v1/catalog/services/${service-model-id}/lifecycleState/certify
+ method: POST
+ body: '{"userRemarks": "Completing certification via CLI"}'
+ success_codes:
+ - 200
+
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml
new file mode 100644
index 00000000..2c437e51
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-request-schema-1.1.yaml
@@ -0,0 +1,26 @@
+open_cli_schema_version: 1.0
+name: service-model-certify-request
+description: Request the certification of Service model in SDC
+version: onap-1.1
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: service-model-id
+ description: Service model ID
+ type: string
+ long_option: service-model-id
+ short_option: b
+ is_optional: true
+
+http:
+ request:
+ uri: /sdc2/rest/v1/catalog/services/${service-model-id}/lifecycleState/certificationRequest
+ method: POST
+ body: '{"userRemarks": "Requesting certification via CLI"}'
+ success_codes:
+ - 200
+
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml
new file mode 100644
index 00000000..05c056d1
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/service-model/service-model-certify-start-schema-1.1.yaml
@@ -0,0 +1,26 @@
+open_cli_schema_version: 1.0
+name: service-model-certify-start
+description: Starts the certification of Service model in SDC
+version: onap-1.1
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: service-model-id
+ description: Service model ID
+ type: string
+ long_option: service-model-id
+ short_option: b
+ is_optional: true
+
+http:
+ request:
+ uri: /sdc2/rest/v1/catalog/services/${service-model-id}/lifecycleState/startCertification
+ method: POST
+ body: '{}'
+ success_codes:
+ - 200
+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json
new file mode 100644
index 00000000..b7ea4ebf
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-moco.json
@@ -0,0 +1,56 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/sdc2/rest/v1/catalog/services/7b427dbf-685b-4ba9-8838-a9b3b3c8e584/lifecycleState/certify",
+ "headers" : {
+ "Authorization" : "Basic am0wMDA3OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "USER_ID" : "jm0007",
+ "X-TransactionId" : "req-ec06b51c-9f76-4440-a6e8-7a14791b169a",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "userRemarks" : "Completing certification via CLI"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "uniqueId" : "ba5a19b1-3219-4f30-bfd3-3b2f700c0157",
+ "name" : "kanag-cli-VLB",
+ "version" : "1.0",
+ "isHighestVersion" : true,
+ "creationDate" : 1509606274213,
+ "lastUpdateDate" : 1509606440988,
+ "description" : "VLB created from CLI",
+ "lifecycleState" : "CERTIFIED",
+ "tags" : [ "CLI", "kanag-cli-VLB" ],
+ "icon" : "defaulticon",
+ "normalizedName" : "kanagclivlb",
+ "systemName" : "KanagCliVlb",
+ "contactId" : "cs0008",
+ "allVersions" : {
+ "1.0" : "ba5a19b1-3219-4f30-bfd3-3b2f700c0157"
+ },
+ "projectCode" : "kanag-123456",
+ "invariantUUID" : "c4425f23-fc9a-4cbf-a3b7-12e69054806b",
+ "componentType" : "SERVICE",
+ "categories" : [ {
+ "name" : "Network L1-3",
+ "normalizedName" : "network l1-3",
+ "uniqueId" : "serviceNewCategory.network l1-3"
+ } ],
+ "creatorUserId" : "jm0007",
+ "creatorFullName" : "Joni Mitchell",
+ "lastUpdaterUserId" : "jm0007",
+ "lastUpdaterFullName" : "Joni Mitchell",
+ "distributionStatus" : "DISTRIBUTION_NOT_APPROVED",
+ "ecompGeneratedNaming" : true,
+ "namingPolicy" : "",
+ "serviceType" : "",
+ "serviceRole" : "",
+ "uuid" : "660c524c-176b-43b1-a85b-1ef18011ca85"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml
new file mode 100644
index 00000000..0802e5d3
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-complete-schema-1.1-sample.yaml
@@ -0,0 +1,9 @@
+onap_cli_sample_version: 1.0
+name: service-model-certify-complete
+version: onap-1.1
+samples:
+ sample1:
+ name: service-model-certify-complete
+ input: --service-model-id 7b427dbf-685b-4ba9-8838-a9b3b3c8e584
+ moco: service-model-certify-complete-schema-1.1-moco.json
+ ouput: \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json
new file mode 100644
index 00000000..0ae0e2da
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-moco.json
@@ -0,0 +1,56 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/sdc2/rest/v1/catalog/services/7b427dbf-685b-4ba9-8838-a9b3b3c8e584/lifecycleState/certificationRequest",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-4ebd2f66-a6a6-4bb7-8cae-3038e2e8080d",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "userRemarks" : "Requesting certification via CLI"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "uniqueId" : "7b427dbf-685b-4ba9-8838-a9b3b3c8e584",
+ "name" : "kanag-cli-VLB",
+ "version" : "0.1",
+ "isHighestVersion" : true,
+ "creationDate" : 1509606274213,
+ "lastUpdateDate" : 1509606425492,
+ "description" : "VLB created from CLI",
+ "lifecycleState" : "READY_FOR_CERTIFICATION",
+ "tags" : [ "CLI", "kanag-cli-VLB" ],
+ "icon" : "defaulticon",
+ "normalizedName" : "kanagclivlb",
+ "systemName" : "KanagCliVlb",
+ "contactId" : "cs0008",
+ "allVersions" : {
+ "0.1" : "7b427dbf-685b-4ba9-8838-a9b3b3c8e584"
+ },
+ "projectCode" : "kanag-123456",
+ "invariantUUID" : "c4425f23-fc9a-4cbf-a3b7-12e69054806b",
+ "componentType" : "SERVICE",
+ "categories" : [ {
+ "name" : "Network L1-3",
+ "normalizedName" : "network l1-3",
+ "uniqueId" : "serviceNewCategory.network l1-3"
+ } ],
+ "creatorUserId" : "cs0008",
+ "creatorFullName" : "Carlos Santana",
+ "lastUpdaterUserId" : "cs0008",
+ "lastUpdaterFullName" : "Carlos Santana",
+ "distributionStatus" : "DISTRIBUTION_NOT_APPROVED",
+ "ecompGeneratedNaming" : true,
+ "namingPolicy" : "",
+ "serviceType" : "",
+ "serviceRole" : "",
+ "uuid" : "660c524c-176b-43b1-a85b-1ef18011ca85"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml
new file mode 100644
index 00000000..e1c7e823
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-request-schema-1.1-sample.yaml
@@ -0,0 +1,9 @@
+onap_cli_sample_version: 1.0
+name: service-model-certify-request
+version: onap-1.1
+samples:
+ sample1:
+ name: service-model-certify-request
+ input: --service-model-id 7b427dbf-685b-4ba9-8838-a9b3b3c8e584
+ moco: service-model-certify-request-schema-1.1-moco.json
+ ouput: \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json
new file mode 100644
index 00000000..1f1330d6
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-moco.json
@@ -0,0 +1,54 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/sdc2/rest/v1/catalog/services/7b427dbf-685b-4ba9-8838-a9b3b3c8e584/lifecycleState/startCertification",
+ "headers" : {
+ "Authorization" : "Basic am0wMDA3OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "USER_ID" : "jm0007",
+ "X-TransactionId" : "req-72f43c29-97b2-4285-bfde-871965ebe869",
+ "Content-Type" : "application/json"
+ },
+ "json" : { }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "uniqueId" : "7b427dbf-685b-4ba9-8838-a9b3b3c8e584",
+ "name" : "kanag-cli-VLB",
+ "version" : "0.1",
+ "isHighestVersion" : true,
+ "creationDate" : 1509606274213,
+ "lastUpdateDate" : 1509606440988,
+ "description" : "VLB created from CLI",
+ "lifecycleState" : "CERTIFICATION_IN_PROGRESS",
+ "tags" : [ "CLI", "kanag-cli-VLB" ],
+ "icon" : "defaulticon",
+ "normalizedName" : "kanagclivlb",
+ "systemName" : "KanagCliVlb",
+ "contactId" : "cs0008",
+ "allVersions" : {
+ "0.1" : "7b427dbf-685b-4ba9-8838-a9b3b3c8e584"
+ },
+ "projectCode" : "kanag-123456",
+ "invariantUUID" : "c4425f23-fc9a-4cbf-a3b7-12e69054806b",
+ "componentType" : "SERVICE",
+ "categories" : [ {
+ "name" : "Network L1-3",
+ "normalizedName" : "network l1-3",
+ "uniqueId" : "serviceNewCategory.network l1-3"
+ } ],
+ "creatorUserId" : "cs0008",
+ "creatorFullName" : "Carlos Santana",
+ "lastUpdaterUserId" : "jm0007",
+ "lastUpdaterFullName" : "Joni Mitchell",
+ "distributionStatus" : "DISTRIBUTION_NOT_APPROVED",
+ "ecompGeneratedNaming" : true,
+ "namingPolicy" : "",
+ "serviceType" : "",
+ "serviceRole" : "",
+ "uuid" : "660c524c-176b-43b1-a85b-1ef18011ca85"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml
new file mode 100644
index 00000000..fb9870a2
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/service-model/service-model-certify-start-schema-1.1-sample.yaml
@@ -0,0 +1,9 @@
+onap_cli_sample_version: 1.0
+name: service-model-certify-start
+version: onap-1.1
+samples:
+ sample1:
+ name: service-model-certify-start
+ input: --service-model-id 7b427dbf-685b-4ba9-8838-a9b3b3c8e584
+ moco: service-model-certify-start-schema-1.1-moco.json
+ ouput: \ No newline at end of file