summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2018-11-15 11:11:23 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-15 11:11:23 +0000
commit1aaa1b8f155267298b8286a569827385c25bd5b8 (patch)
tree946fafa529de23f53e9cf6ac0442f6726c23f4e9
parentfbce30b46559683c26d8cc365d39a602dcfed0a4 (diff)
parente644f7fc1173b4b0ebe66648f4f26f6b6c46d573 (diff)
Merge changes Ica13dd13,I9861d121,I8ac8ba57,Ib099936d,Ic701910d, ...
* changes: Fix csar-create to upload csar properly SDC VSP list command SDC VSP creation SDC VLM license checkin SDC VLM aggreement create SDC VLM feature group create SDC VLM key group create SDC VLM entitlement pool create SDC vlm-create
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json29
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json31
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json30
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json27
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json25
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json21
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json41
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml9
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json58
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml20
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml78
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml63
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml89
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml91
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml78
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml50
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml107
-rw-r--r--products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml73
-rw-r--r--products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml2
-rw-r--r--profiles/http/pom.xml2
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java14
-rw-r--r--profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java1
28 files changed, 984 insertions, 9 deletions
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..b22f95cc
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-moco.json
@@ -0,0 +1,29 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/license-agreements",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-84977a57-d8dd-47a9-87fb-6171b3a02db8",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "addedFeatureGroupsIds" : [ "e4ba1e16f22f44c59051dead1fa7d1cf" ],
+ "description" : "Huawei Test license",
+ "licenseTerm" : {
+ "choice" : "Fixed_Term",
+ "other" : ""
+ },
+ "name" : "Test aggrement"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "value" : "ddfcedccb72241a1b87c63be74896322"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..5974d206
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-aggreement-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-aggreement-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-aggreement-create
+ input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test aggrement --description Huawei Test license --vlm-feature-group-id e4ba1e16f22f44c59051dead1fa7d1cf -d
+ moco: vlm-aggreement-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..b885f3f0
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-moco.json
@@ -0,0 +1,31 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-4692c777-f63e-4e50-a994-b5c208b62a9a",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "vendorName" : "Huawei IN",
+ "description" : "Huawei Test license",
+ "iconRef" : "icon"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "itemId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "version" : {
+ "id" : "7afd0daa8271470db3b556fdedf074f4",
+ "name" : "1.0",
+ "description" : "Initial version",
+ "status" : "Draft"
+ }
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..2f6384a1
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-create
+ input: --vendor-name Huawei IN --description Huawei Test license -d
+ moco: vlm-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..c4052efe
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-moco.json
@@ -0,0 +1,30 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/entitlement-pools",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-f141aab8-be09-417a-9363-1ccf1f796280",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "name" : "Test Pool",
+ "time" : {
+ "choice" : "",
+ "other" : ""
+ },
+ "startDate" : "12/12/2018",
+ "expiryDate" : "10/11/2019",
+ "manufacturerReferenceNumber" : "123456"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "value" : "3091c5af38bf4fc3b3e17371c9fecbda"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..50fc98cb
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-entitlement-pool-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-entitlement-pool-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-entitlement-pool-create
+ input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test Pool --description Huawei Test license --manufacture-reference-number 123456 --startDate 12/12/2018 --expiryDate 10/11/2019 -d
+ moco: vlm-entitlement-pool-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..e2e4a1ad
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-moco.json
@@ -0,0 +1,27 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/feature-groups",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-aec4e184-23a7-48ac-88fb-96202e971b25",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "name" : "Test key group",
+ "addedLicenseKeyGroupsIds" : [ "f3fd5a1294694f8590051c2755a4a918" ],
+ "addedEntitlementPoolsIds" : [ "3091c5af38bf4fc3b3e17371c9fecbda" ],
+ "partNumber" : "654321",
+ "description" : "Huawei Test license"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "value" : "e4ba1e16f22f44c59051dead1fa7d1cf"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..1b21f99f
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-feature-group-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-feature-group-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-feature-group-create
+ input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test key group --description Huawei Test license --part-number 654321 --vlm-key-group-id f3fd5a1294694f8590051c2755a4a918 --vlm-entitle-pool-id 3091c5af38bf4fc3b3e17371c9fecbda -d
+ moco: vlm-feature-group-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..d74f37b5
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-moco.json
@@ -0,0 +1,25 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/license-key-groups",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-9247b01c-1707-42d5-bc83-3402d5c48501",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "description" : "Huawei Test license",
+ "name" : "Test key group",
+ "type" : "Universal"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "value" : "f3fd5a1294694f8590051c2755a4a918"
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..58a6ddb6
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-key-group-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-key-group-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-key-group-create
+ input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --name Test key group --description Huawei Test license -d
+ moco: vlm-key-group-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json
new file mode 100644
index 00000000..7460914b
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-moco.json
@@ -0,0 +1,21 @@
+[ {
+ "request" : {
+ "method" : "put",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models/d8c1362526414b9bbe25cdd972eebf0e/versions/7afd0daa8271470db3b556fdedf074f4/actions",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-bb4ab620-1c37-48f0-9fe1-96df9838c0ed",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "action" : "Submit"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : { }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..d107005d
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vlm/vlm-submit-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vlm-submit
+version: onap-casablanca
+samples:
+ sample1:
+ name: vlm-submit
+ input: --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 -d
+ moco: vlm-submit-schema-casablanca-moco.json
+ output: \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json
new file mode 100644
index 00000000..7720cc9e
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-moco.json
@@ -0,0 +1,41 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-software-products",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-2d36d422-79f1-4d8e-bada-dee0e32266c2",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "category" : "resourceNewCategory.generic",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "subCategory" : "resourceNewCategory.generic.abstract",
+ "description" : "vFW sample vsp",
+ "licensingVersion" : "7afd0daa8271470db3b556fdedf074f4",
+ "licensingData" : {
+ "featureGroups" : [ "e4ba1e16f22f44c59051dead1fa7d1cf" ],
+ "licenseAgreement" : "ddfcedccb72241a1b87c63be74896322"
+ },
+ "icon" : "icon",
+ "onboardingMethod" : "Manual",
+ "vendorName" : "Huawei IN",
+ "name" : "vFW software"
+ }
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "itemId" : "5223ac6156ce4a5fb3b33ab205f34c6e",
+ "version" : {
+ "id" : "0732aefa14634e398f16ccfdabc8ed0a",
+ "name" : "1.0",
+ "description" : "Initial version",
+ "status" : "Draft"
+ }
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..a89fc626
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-create-schema-casablanca-sample.yaml
@@ -0,0 +1,9 @@
+open_cli_sample_version: 1.0
+name: vsp-create
+version: onap-casablanca
+samples:
+ sample1:
+ name: vsp-create
+ input: --vsp-name vFW software --vsp-description vFW sample vsp --vlm-id d8c1362526414b9bbe25cdd972eebf0e --vlm-version 7afd0daa8271470db3b556fdedf074f4 --vlm-feature-group-id e4ba1e16f22f44c59051dead1fa7d1cf --vlm-agreement-id ddfcedccb72241a1b87c63be74896322 --vlm-vendor Huawei IN -d
+ moco: vsp-create-schema-casablanca-moco.json
+ output: |
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json
new file mode 100644
index 00000000..f66bcdb1
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-moco.json
@@ -0,0 +1,58 @@
+[ {
+ "request" : {
+ "method" : "get",
+ "uri" : "/onboarding-api/v1.0/vendor-software-products",
+ "headers" : {
+ "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh",
+ "X-FromAppId" : "ONAP CLI",
+ "Accept" : "application/json",
+ "USER_ID" : "cs0008",
+ "X-TransactionId" : "req-373a1f99-8c3a-43b8-8b27-7d2d75dc60bb",
+ "Content-Type" : "application/json"
+ },
+ "json" : null
+ },
+ "response" : {
+ "status" : 200,
+ "json" : {
+ "listCount" : 4,
+ "results" : [ {
+ "name" : "vFW software",
+ "description" : "vFW sample vsp",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "5223ac6156ce4a5fb3b33ab205f34c6e",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test123",
+ "description" : "test",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "83f9c5d846044f81b3b94e15aaaafb0b",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test",
+ "description" : "test",
+ "vendorName" : "hw",
+ "vendorId" : "efd7a4cece974be7ad8d7798b17f9621",
+ "onboardingMethod" : "NetworkPackage",
+ "id" : "3cf5d987d1d444be8b172b3744bcbe0c",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ }, {
+ "name" : "test1",
+ "description" : "test",
+ "vendorName" : "Huawei IN",
+ "vendorId" : "d8c1362526414b9bbe25cdd972eebf0e",
+ "onboardingMethod" : "Manual",
+ "id" : "3ee1964d46834c0eaa4f9909bf40b961",
+ "owner" : "cs0008",
+ "status" : "ACTIVE"
+ } ]
+ }
+ }
+} ] \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml
new file mode 100644
index 00000000..50614092
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-sample/vsp/vsp-list-schema-casablanca-sample.yaml
@@ -0,0 +1,20 @@
+open_cli_sample_version: 1.0
+name: vsp-list
+version: onap-casablanca
+samples:
+ sample1:
+ name: vsp-list
+ input: -d
+ moco: vsp-list-schema-casablanca-moco.json
+ output: |
+ +----------------------------------+--------------+----------+--------+
+ |ID |name |version |status |
+ +----------------------------------+--------------+----------+--------+
+ |5223ac6156ce4a5fb3b33ab205f34c6e |vFW software | |ACTIVE |
+ +----------------------------------+--------------+----------+--------+
+ |83f9c5d846044f81b3b94e15aaaafb0b |test123 | |ACTIVE |
+ +----------------------------------+--------------+----------+--------+
+ |3cf5d987d1d444be8b172b3744bcbe0c |test | |ACTIVE |
+ +----------------------------------+--------------+----------+--------+
+ |3ee1964d46834c0eaa4f9909bf40b961 |test1 | |ACTIVE |
+ +----------------------------------+--------------+----------+--------+
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml
new file mode 100644
index 00000000..b1a3d2a1
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-aggreement-create-schema-casablanca.yaml
@@ -0,0 +1,78 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-aggreement-create
+description: Create license aggreement
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: name
+ description: aggreement name
+ type: string
+ short_option: x
+ long_option: name
+ is_optional: false
+ - name: vlm-id
+ description: License Model ID
+ type: string
+ short_option: y
+ long_option: vlm-id
+ is_optional: false
+ - name: vlm-version
+ description: License Model version
+ type: string
+ short_option: e
+ long_option: vlm-version
+ is_optional: false
+ - name: description
+ description: Description for aggreement
+ type: string
+ short_option: z
+ long_option: description
+ is_optional: false
+ - name: vlm-feature-group-id
+ description: VLM feature group
+ type: string
+ short_option: g
+ long_option: vlm-feature-group-id
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: aggreement ID
+ scope: short
+ type: string
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/license-agreements
+ method: POST
+ body: '{"addedFeatureGroupsIds": ["${vlm-feature-group-id}"], "description": "${description}", "licenseTerm": {"choice": "Fixed_Term", "other": ""}, "name": "${name}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value}
+ sample_response:
+ body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}'
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml
new file mode 100644
index 00000000..74f8cbad
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-create-schema-casablanca.yaml
@@ -0,0 +1,63 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-create
+description: Create License Model
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: vendor-name
+ description: vendor name
+ type: string
+ short_option: x
+ long_option: vendor-name
+ is_optional: false
+ - name: description
+ description: Description for License Model
+ type: string
+ short_option: y
+ long_option: description
+ is_optional: true
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: License Model ID
+ scope: short
+ type: uuid
+ - name: version
+ description: License Model version
+ scope: short
+ type: uuid
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models
+ method: POST
+ body: '{"vendorName": "${vendor-name}", "description": "${description}", "iconRef": "icon"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.itemId}
+ version: $b{$.version.id} \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml
new file mode 100644
index 00000000..039bb0c5
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-entitlement-pool-create-schema-casablanca.yaml
@@ -0,0 +1,89 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-entitlement-pool-create
+description: Create Entitlement Pool
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: name
+ description: Entitlement Pool name
+ type: string
+ short_option: x
+ long_option: name
+ is_optional: false
+ - name: vlm-id
+ description: License Model ID
+ type: string
+ short_option: y
+ long_option: vlm-id
+ is_optional: false
+ - name: vlm-version
+ description: License Model version
+ type: string
+ short_option: e
+ long_option: vlm-version
+ is_optional: false
+ - name: description
+ description: Description for Entitlement Pool
+ type: string
+ short_option: z
+ long_option: description
+ is_optional: false
+ - name: manufacture-reference-number
+ description: Manufature Reference Number
+ type: string
+ short_option: k
+ long_option: manufacture-reference-number
+ is_optional: false
+ - name: startDate
+ description: License start date (MM/DD/YYYY)
+ type: string
+ short_option: l
+ long_option: startDate
+ is_optional: false
+ - name: expiryDate
+ description: License end date (MM/DD/YYYY)
+ type: string
+ short_option: g
+ long_option: expiryDate
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: Entitlement Pool ID
+ scope: short
+ type: string
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/entitlement-pools
+ method: POST
+ body: '{"name":"${name}","time":{"choice":"","other":""},"startDate":"${startDate}","expiryDate":"${expiryDate}","manufacturerReferenceNumber":"${manufacture-reference-number}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value}
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml
new file mode 100644
index 00000000..90a43e27
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-feature-group-create-schema-casablanca.yaml
@@ -0,0 +1,91 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-feature-group-create
+description: Create feature group Pool
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: name
+ description: Feature group name
+ type: string
+ short_option: x
+ long_option: name
+ is_optional: false
+ - name: vlm-id
+ description: License Model ID
+ type: string
+ short_option: y
+ long_option: vlm-id
+ is_optional: false
+ - name: vlm-version
+ description: License Model version
+ type: string
+ short_option: e
+ long_option: vlm-version
+ is_optional: false
+ - name: description
+ description: Description for feature group
+ type: string
+ short_option: z
+ long_option: description
+ is_optional: false
+ - name: vlm-key-group-id
+ description: VLM keygroup
+ type: string
+ short_option: g
+ long_option: vlm-key-group-id
+ is_optional: false
+ - name: vlm-entitle-pool-id
+ description: VLM Entitlement pool
+ type: string
+ short_option: b
+ long_option: vlm-entitle-pool-id
+ is_optional: false
+ - name: part-number
+ description: Part number
+ type: string
+ short_option: c
+ long_option: part-number
+ is_optional: false
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: Feature group ID
+ scope: short
+ type: string
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/feature-groups
+ method: POST
+ body: '{"name": "${name}", "addedLicenseKeyGroupsIds": ["${vlm-key-group-id}"], "addedEntitlementPoolsIds": ["${vlm-entitle-pool-id}"], "partNumber": "${part-number}", "description": "${description}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value}
+ sample_response:
+ body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}'
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml
new file mode 100644
index 00000000..f26a463b
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-key-group-create-schema-casablanca.yaml
@@ -0,0 +1,78 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-key-group-create
+description: Create License Key Group
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: vlm-id
+ description: License Model Id
+ type: string
+ short_option: c
+ long_option: vlm-id
+ is_optional: false
+ - name: vlm-version
+ description: License Model version
+ type: string
+ short_option: e
+ long_option: vlm-version
+ is_optional: false
+ - name: name
+ description: name
+ type: string
+ short_option: x
+ long_option: name
+ is_optional: false
+ - name: type
+ description: type of group (Universal, unique, one-time)
+ type: string
+ short_option: y
+ long_option: type
+ is_optional: false
+ default_value: Universal
+ - name: description
+ description: Description for License Key Group
+ type: string
+ short_option: z
+ long_option: description
+ is_optional: true
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: License Model ID
+ scope: short
+ type: string
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/license-key-groups
+ method: POST
+ body: '{"description": "${description}", "name": "${name}", "type": "${type}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value} \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml
new file mode 100644
index 00000000..44201671
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vlm/vlm-submit-schema-casablanca.yaml
@@ -0,0 +1,50 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vlm-submit
+description: Submit Vendor License Model
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+
+parameters:
+ - name: vlm-id
+ description: Onap VLM ID
+ type: string
+ short_option: x
+ long_option: vlm-id
+ is_optional: false
+ - name: vlm-version
+ description: VLM version
+ type: string
+ short_option: y
+ long_option: vlm-version
+ is_optional: false
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${vlm-id}/versions/${vlm-version}/actions
+ method: PUT
+ body: '{"action": "Submit"}'
+ success_codes:
+ - 201
+ - 200
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml
new file mode 100644
index 00000000..095face5
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-create-schema-casablanca.yaml
@@ -0,0 +1,107 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vsp-create
+description: Create Vendor Software Product
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+parameters:
+ - name: vsp-name
+ description: Onap VSP Name
+ type: string
+ short_option: x
+ long_option: vsp-name
+ is_optional: false
+ - name: vsp-description
+ description: Description for VSP
+ type: string
+ short_option: y
+ long_option: vsp-description
+ is_optional: true
+ - name: vsp-category
+ description: Category of the VSP
+ type: string
+ long_option: vsp-category
+ short_option: z
+ is_optional: true
+ default_value: resourceNewCategory.generic
+ - name: vsp-subcategory
+ description: Sub Category of VSP
+ type: string
+ long_option: vsp-subcategory
+ short_option: b
+ is_optional: true
+ default_value: resourceNewCategory.generic.abstract
+ - name: vlm-version
+ description: License version
+ type: string
+ long_option: vlm-version
+ short_option: c
+ is_optional: true
+ default_value: 1.0
+ - name: vlm-vendor
+ description: License Model vendor
+ type: string
+ long_option: vlm-vendor
+ short_option: e
+ is_optional: false
+ - name: vlm-id
+ description: License Model ID
+ type: string
+ long_option: vlm-id
+ short_option: g
+ is_optional: false
+ - name: vlm-agreement-id
+ description: License Agreement ID
+ type: string
+ long_option: vlm-agreement-id
+ short_option: i
+ is_optional: false
+ - name: vlm-feature-group-id
+ description: Feature Group ID
+ type: string
+ long_option: vlm-feature-group-id
+ short_option: j
+ is_optional: false
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: VSP ID
+ scope: short
+ type: string
+ - name: version
+ description: VSP Model version
+ scope: short
+ type: uuid
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-software-products
+ method: POST
+ body: '{"category": "${vsp-category}", "vendorId": "${vlm-id}", "subCategory": "${vsp-subcategory}", "description": "${vsp-description}", "licensingVersion": "${vlm-version}", "licensingData": {"featureGroups": ["${vlm-feature-group-id}"], "licenseAgreement": "${vlm-agreement-id}"}, "icon": "icon", "onboardingMethod": "Manual", "vendorName": "${vlm-vendor}", "name": "${vsp-name}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.vspId}
+ version: $b{$.version.id} \ No newline at end of file
diff --git a/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml
new file mode 100644
index 00000000..95d62c9e
--- /dev/null
+++ b/products/onap-casablanca/features/sdc/src/main/resources/open-cli-schema/vsp/vsp-list-schema-casablanca.yaml
@@ -0,0 +1,73 @@
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+open_cli_schema_version: 1.0
+name: vsp-list
+description: List of the Vendor Software Products
+
+info:
+ product: onap-casablanca
+ service: sdc
+ author: ONAP CLI Team onap-discuss@lists.onap.org
+
+results:
+ direction: landscape
+ attributes:
+ - name: ID
+ description: VSP ID
+ scope: short
+ type: string
+ - name: name
+ description: VSP Name
+ scope: short
+ type: string
+ - name: vendor-name
+ description: Vendor name
+ scope: long
+ type: string
+ - name: version
+ description: Version
+ scope: short
+ type: string
+ - name: status
+ description: status
+ scope: short
+ type: string
+ - name: license-id
+ description: license aggreement
+ scope: long
+ type: string
+ - name: license-version
+ description: license version
+ scope: long
+ type: string
+http:
+ service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+ request:
+ uri: /onboarding-api/v1.0/vendor-software-products
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{results.[*].id}
+ name: $b{results.[*].name}
+ vendor-name: $b{results.[*].vendorName}
+ version: $b{results.[*].version.id}
+ status: $b{results.[*].status}
+ license-id: $b{results.[*].licensingData.licenseAgreement}
+ license-version: $b{results.[*].licensingVersion.id}
diff --git a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml
index 64b390e2..d1728745 100644
--- a/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml
+++ b/products/onap-casablanca/features/vnfsdk/src/main/resources/open-cli-schema/csar-create-schema.yaml
@@ -46,8 +46,6 @@ http:
method: POST
body: ${csar-file}
multipart_entity_name: file
- headers:
- Content-Type: multipart/form-data
success_codes:
- 200
result_map:
diff --git a/profiles/http/pom.xml b/profiles/http/pom.xml
index d8ea2b49..ac2f089f 100644
--- a/profiles/http/pom.xml
+++ b/profiles/http/pom.xml
@@ -45,7 +45,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
- <version>4.0.1</version>
+ <version>4.3.5</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
index b21c2575..b86ef26b 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/connect/OnapHttpConnection.java
@@ -54,9 +54,9 @@ import org.apache.http.conn.ssl.AllowAllHostnameVerifier;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.X509HostnameVerifier;
import org.apache.http.cookie.Cookie;
+import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
-import org.apache.http.entity.mime.MultipartEntity;
-import org.apache.http.entity.mime.content.FileBody;
+import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.BasicCookieStore;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.client.LaxRedirectStrategy;
@@ -365,10 +365,12 @@ public class OnapHttpConnection {
}
private HttpEntity getMultipartEntity(HttpInput input) {
- FileBody fileBody = new FileBody(new File(input.getBody().trim()));
- MultipartEntity multipartEntity = new MultipartEntity();
- String fileName = input.getMultipartEntityName() != "" ? input.getMultipartEntityName() : "upload";
- multipartEntity.addPart(fileName, fileBody);
+ String fileTag = input.getMultipartEntityName() != "" ? input.getMultipartEntityName() : "file";
+ File file = new File(input.getBody().trim());
+ HttpEntity multipartEntity = MultipartEntityBuilder
+ .create()
+ .addBinaryBody(fileTag, file, ContentType.create("application/octet-stream"), file.getName())
+ .build();
return multipartEntity;
}
diff --git a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
index ed415335..a0c96cad 100644
--- a/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
+++ b/profiles/http/src/main/java/org/onap/cli/fw/http/utils/OnapCommandHttpUtils.java
@@ -73,6 +73,7 @@ public class OnapCommandHttpUtils {
break;
}
}
+ inp.setMultipartEntityName(input.getMultipartEntityName());
inp.setBody(OnapCommandUtils.replaceLineFromInputParameters(input.getBody(), params));
inp.setUri(OnapCommandUtils.replaceLineFromInputParameters(input.getUri(), params));
inp.setMethod(input.getMethod().toLowerCase());