aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sdc/src
diff options
context:
space:
mode:
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>2017-10-13 09:15:30 +0000
committersubhash kumar singh <subhash.kumar.singh@huawei.com>2017-10-16 05:38:58 +0000
commitf94566f788525068ff2c0ed2040dc658d1fcfd7a (patch)
tree443dc5362b8c3f20a2a9b32c0d97bd94feb42905 /plugins/sdc/src
parent0e89c1fbeb6618a1a4218c7c78506dff6f71dd6d (diff)
Impement CMD yaml for fetching license
Implement CMD yaml for fetching license yaml from SDC. Change-Id: I3cecf6b6a1069b2d8d0c42ec141114d9649101fa Issue-ID: CLI-53 Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
Diffstat (limited to 'plugins/sdc/src')
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-model-show-schema-1.1.yaml45
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-1.1-moco.json39
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema-1.1.yaml37
3 files changed, 121 insertions, 0 deletions
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-model-show-schema-1.1.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-model-show-schema-1.1.yaml
new file mode 100644
index 00000000..8e4c27b5
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-model-show-schema-1.1.yaml
@@ -0,0 +1,45 @@
+open_cli_schema_version: 1.0
+name: license-model-show
+description: List License Model
+version: onap-1.1
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+results:
+ direction: landscape
+ attributes:
+ - name: id
+ description: License ID
+ scope: short
+ type: uuid
+ - name: vendor-name
+ description: Vendor Name
+ scope: short
+ type: string
+ - name: icon-ref
+ description: icon ref
+ scope: long
+ type: string
+ - name: status
+ description: status
+ scope: short
+ type: string
+ - name: description
+ description: License description
+ scope: long
+ type: string
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ id: $b{$.results.[*].id}
+ vendor-name: $b{$.results.[*].vendorName}
+ icon-ref: $b{$.results.[*].iconRef}
+ status: $b{$.results.[*].status}
+ description: $b{$.results.[*].description} \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-1.1-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-1.1-moco.json
new file mode 100644
index 00000000..08493faf
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-1.1-moco.json
@@ -0,0 +1,39 @@
+[{
+ "request" :
+ {
+ "method" : "get",
+ "uri" : "onboarding-api/v1.0/vendor-license-models",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ }
+ },
+ "response" :
+ {
+ "listCount": 1,
+ "results": [
+ {
+ "vendorName": "856acdac-40ef-4482-9981",
+ "description": "vendor license model",
+ "iconRef": "icon",
+ "id": "214fa77b19bb4253a35df7882562f2d0",
+ "version": {
+ "id": "1.0",
+ "label": "1.0"
+ },
+ "status": "Final",
+ "viewableVersions": [
+ {
+ "id": "1.0",
+ "label": "1.0"
+ }
+ ],
+ "finalVersions": [
+ {
+ "id": "1.0",
+ "label": "1.0"
+ }
+ ]
+ }]
+ }
+}] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema-1.1.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema-1.1.yaml
new file mode 100644
index 00000000..9bba4d61
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema-1.1.yaml
@@ -0,0 +1,37 @@
+onap_cli_sample_version: 1.0
+
+name: license-model-show
+version: onap-1.1
+samples:
+ sample1:
+ name: list license models
+ input: -u cs0008 -p demo123456! -m http://192.168.17.126:8080 --long
+ moco: license-model-show-schema-1.1-moco.json
+ output: |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |id |vendor-name |icon-ref |status |description |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |214fa77b19bb4253a35df7882562f2d0 |856acdac-40ef-4482-9981 |icon |Final |vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |4c292ccadd65463eb13eee6599454a1d |e719888c-0239-4dca-be7d |icon |Final |vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |29d0695d8aec4ee583123fe0d1851b4f |ee7ab025-6c58-433d-bd0d |icon |Final |vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |2744ca76b4ac4888b620c05ae91556f6 |ciLicense21435036 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |030a59bde96f430b95465b007a9b3cdd |ciLicensefe30858a |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |950e25392f754522be7c3eb3de12bcf9 |ciLicense751898ab |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |8e8175bfff7849479f0073d198c63f53 |ciLicense28ebe623 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |e05042b6f04d4b7a9ec75cf96bc6e470 |ciLicense90306c63 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |39ea2c9a76f24e5fb8c384028cbd8f15 |ciLicenseed4a6e3f |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |a0edbf2e71734b1985cd92dcc77c1b4d |ciLicenseb0467328 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |55f9d6352935440ea9c75aebe2cca80d |ciLicensef4044f13 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+
+ |182c1888c32e427698c621b9fb0987a5 |ciLicensec8ab4c16 |icon |Final |new vendor license model |
+ +----------------------------------+--------------------------+----------+--------+--------------------------+ \ No newline at end of file