aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sdc/src/test
diff options
context:
space:
mode:
authorBharath Thiruveedula <bharath_ves@hotmail.com>2017-10-14 01:00:18 +0530
committerBharath Thiruveedula <bharath_ves@hotmail.com>2017-10-19 15:50:39 +0530
commitb41bd894df391281b637e00f2909940200e734d5 (patch)
tree8c843f30eae28f714af99017f358e5e0909e3696 /plugins/sdc/src/test
parent83673ac6ee94bc7f554132893932715d009f0cdd (diff)
Add support for license-model commands
Change-Id: Ifc0fadcec234f23f0e46f8990e4ca7c5d1d2800a Issue-ID: CLI-16 Signed-Off-By: Bharath Thiruveedula<bharath.thiruveedula@verizon.com>
Diffstat (limited to 'plugins/sdc/src/test')
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-create-schema-moco.json16
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-show-schema-moco.json36
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-create-moco.json16
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-show-schema-moco.json24
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-model-create-schema-moco.json15
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-moco.json24
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-create-schema.yaml15
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-show-schema.yaml16
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-create-schema.yaml15
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-show-schema.yaml15
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-create-schema.yaml15
-rw-r--r--plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema.yaml15
12 files changed, 222 insertions, 0 deletions
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-create-schema-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-create-schema-moco.json
new file mode 100644
index 00000000..9baef0ef
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-create-schema-moco.json
@@ -0,0 +1,16 @@
+[{
+ "request" :
+ {
+ "method" : "post",
+ "uri" : "onboarding-api/v1.0/vendor-license-models/4904E77EC4EF4CB18083E8ED7D283585/entitlement-pools",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ },
+ "json" : {"name": "demo-ep", "description": "demo ep desc", "thresholdValue": "99", "thresholdUnits": "Absolute", "entitlementMetric": {"choice": "CPU","other": ""}, "increments": "robot", "aggregationFunction": { "choice": "Peak", "other": ""}, "operationalScope": { "choices":["Availability_Zone"],"other":""},"time": {"choice": "Hour","other":""},"manufacturerReferenceNumber": "robot12345"}
+ },
+ "response" :
+ {
+ "json" : {"value":"840FFB495CAA46A6B720E3D734D52C66"}
+ }
+}]
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-show-schema-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-show-schema-moco.json
new file mode 100644
index 00000000..02b06875
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-entitlement-pool-show-schema-moco.json
@@ -0,0 +1,36 @@
+[{
+ "requesN" :
+ {
+ "method" : "get",
+ "uri" : "onboarding-api/v1.0/vendor-license-models/4904E77EC4EF4CB18083E8ED7D283585/entitlement-pools/840FFB495CAA46A6B720E3D734D52C66",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ }
+ },
+ "response" :{
+ "json" : {
+ "name": "demo-ep",
+ "description": "demo ep desc",
+ "thresholdValue": 99,
+ "thresholdUnits": "Absolute",
+ "entitlementMetric": {
+ "choice": "CPU"
+ },
+ "increments": "robot",
+ "aggregationFunction": {
+ "choice": "Peak"
+ },
+ "operationalScope": {
+ "choices": [
+ "Availability_Zone"
+ ]
+ },
+ "time": {
+ "choice": "Hour"
+ },
+ "manufacturerReferenceNumber": "robot12345",
+ "id": "840FFB495CAA46A6B720E3D734D52C66",
+ "referencingFeatureGroups": []
+ }}
+}]
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-create-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-create-moco.json
new file mode 100644
index 00000000..ee1c073d
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-create-moco.json
@@ -0,0 +1,16 @@
+[{
+ "request" :
+ {
+ "method" : "post",
+ "uri" : "onboarding-api/v1.0/vendor-license-models",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ },
+ "json" : {"description": "test","name": "htipl-key-grp","operationalScope": {"choices": ["Tenant"],"other": ""},"type": "Universal"}
+ },
+ "response" :
+ {
+ "json" : {"value":"81997d7d4795485daea7418fae26c5d0"}
+ }
+}] \ No newline at end of file
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-show-schema-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-show-schema-moco.json
new file mode 100644
index 00000000..7b7a56be
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-key-group-show-schema-moco.json
@@ -0,0 +1,24 @@
+[{
+ "requesN" :
+ {
+ "method" : "get",
+ "uri" : "onboarding-api/v1.0/vendor-license-models/4904E77EC4EF4CB18083E8ED7D283585/license-key-groups/3F57DDC6AF55420680D499CDAC047253",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ }
+ },
+ "response" :{
+ "json" : {
+ "name": "demo-key-group",
+ "description": "",
+ "type": "Universal",
+ "operationalScope": {
+ "choices": [
+ "Tenant"
+ ]
+ },
+ "id": "3F57DDC6AF55420680D499CDAC047253",
+ "referencingFeatureGroups": []
+ }}
+}]
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-model-create-schema-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-create-schema-moco.json
new file mode 100644
index 00000000..7030ad42
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-create-schema-moco.json
@@ -0,0 +1,15 @@
+[{
+ "request" :
+ {
+ "method" : "post",
+ "uri" : "/onboarding-api/v1.0/vendor-license-models",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ },
+ "json" : {"vendorName": "htipl-sample", "description": "sample model", "iconRef": "icon"}
+ },
+ "response" : {
+ "json" : {"value":"2366699475c943bdb283fc0b9106579c"}
+ }
+}]
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-moco.json b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-moco.json
new file mode 100644
index 00000000..85f840e9
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-model-show-schema-moco.json
@@ -0,0 +1,24 @@
+[{
+ "requesN" :
+ {
+ "method" : "get",
+ "uri" : "onboarding-api/v1.0/vendor-license-models/4904E77EC4EF4CB18083E8ED7D283585",
+ "headers" : {
+ "USER_ID": "cs0008",
+ "content-type" : "application/json"
+ }
+ },
+ "response" :{
+ "json" : {
+ "vendorName": "5aa8a88c",
+ "description": "vendor license model",
+ "iconRef": "icon",
+ "id": "4904E77EC4EF4CB18083E8ED7D283585",
+ "version": "0.1",
+ "status": "Locked",
+ "lockingUser": "cs0008",
+ "viewableVersions": [
+ "0.1"
+ ]
+ }}
+}]
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-create-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-create-schema.yaml
new file mode 100644
index 00000000..2b1d78d9
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-create-schema.yaml
@@ -0,0 +1,15 @@
+onap_cli_sample_version: 1.0
+
+name: ep-create
+version: onap-1.0
+samples:
+ sample1:
+ name: create license entitlement Pool
+ input: --threshold-value 99 --license-model-id 4904E77EC4EF4CB18083E8ED7D283585 --ep-name demo121 --ep-description demo --threshold-unit Absolute --entitlement-metric CPU --operational-scope Availability_Zone --aggregation-function Peak --reference-number 12345 -u cs0008 -p demo123456! -m http://192.168.17.126:8080
+ moco: license-entitlement-pool-create-schema-moco.json
+ output: |
+ +----------+----------------------------------+
+ |property |value |
+ +----------+----------------------------------+
+ |ID |2366699475c943bdb283fc0b9106579c |
+ +----------+----------------------------------+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-show-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-show-schema.yaml
new file mode 100644
index 00000000..244c1d66
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-entitlement-pool-show-schema.yaml
@@ -0,0 +1,16 @@
+onap_cli_sample_version: 1.0
+
+name: ep-show
+version: onap-1.0
+samples:
+ sample1:
+ name: Get specific license key group
+ input: -u cs0008 -p demo123456! -m http://192.168.17.126:8080 --license-model-id 4904E77EC4EF4CB18083E8ED7D283585 --pool-id E19CDA7DA8A9462FB1A33166C28B11D2
+ moco: license-entitlement-pool-show-schema-moco.json
+ output: |
+ +----------+----------------------------------+--------------+
+ |name |ID |description |
+ +----------+----------------------------------+--------------+
+ |demo121 |E19CDA7DA8A9462FB1A33166C28B11D2 |demo |
+ +----------+----------------------------------+--------------+
+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-create-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-create-schema.yaml
new file mode 100644
index 00000000..21ab46d2
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-create-schema.yaml
@@ -0,0 +1,15 @@
+onap_cli_sample_version: 1.0
+
+name: license-key-group-create
+version: onap-1.0
+samples:
+ sample1:
+ name: create license key group
+ input: --license-model-id 2366699475c943bdb283fc0b9106579c -x htipl-key-grp -y Universal -z test --operational-scope Tenant -u cs0008 -p demo123456! -m http://192.168.17.126:8080
+ moco: license-group-create-moco.json
+ output: |
+ +----------+----------------------------------+
+ |property |value |
+ +----------+----------------------------------+
+ |ID |81997d7d4795485daea7418fae26c5d0 |
+ +----------+----------------------------------+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-show-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-show-schema.yaml
new file mode 100644
index 00000000..b927cd97
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-group-show-schema.yaml
@@ -0,0 +1,15 @@
+onap_cli_sample_version: 1.0
+
+name: license-group-show
+version: onap-1.0
+samples:
+ sample1:
+ name: Get specific license key group
+ input: -u cs0008 -p demo123456! -m http://192.168.17.126:8080 -x 4904E77EC4EF4CB18083E8ED7D283585 -y 3F57DDC6AF55420680D499CDAC047253
+ moco: license-key-group-show-schema-moco.json
+ output: |
+ +----------------+----------------------------------+--------------+
+ |name |ID |description |
+ +----------------+----------------------------------+--------------+
+ |demo-key-group |3F57DDC6AF55420680D499CDAC047253 | |
+ +----------------+----------------------------------+--------------+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-create-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-create-schema.yaml
new file mode 100644
index 00000000..10fc0510
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-create-schema.yaml
@@ -0,0 +1,15 @@
+onap_cli_sample_version: 1.0
+
+name: license-model-create
+version: onap-1.0
+samples:
+ sample1:
+ name: create license model
+ input: -x htipl -y "sample model" -u cs0008 -p demo123456! -m http://192.168.17.126:8080
+ moco: license-model-create-schema-moco.json
+ output: |
+ +----------+----------------------------------+
+ |property |value |
+ +----------+----------------------------------+
+ |ID |2366699475c943bdb283fc0b9106579c |
+ +----------+----------------------------------+
diff --git a/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema.yaml b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema.yaml
new file mode 100644
index 00000000..18e4c297
--- /dev/null
+++ b/plugins/sdc/src/test/resources/onap-cli-sample/license-models/license-model-show-schema.yaml
@@ -0,0 +1,15 @@
+onap_cli_sample_version: 1.0
+
+name: license-model-show
+version: onap-1.0
+samples:
+ sample1:
+ name: Get specific license model
+ input: -u cs0008 -p demo123456! -m http://192.168.17.126:8080 -x 4904E77EC4EF4CB18083E8ED7D283585
+ moco: license-model-show-schema-moco.json
+ output: |
+ +----------+----------------------------------+----------------------+--------+
+ |name |ID |description |status |
+ +----------+----------------------------------+----------------------+--------+
+ |5aa8a88c |4904E77EC4EF4CB18083E8ED7D283585 |vendor license model |Locked |
+ +----------+----------------------------------+----------------------+--------+