aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sdc/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/sdc/src')
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-create-schema.yaml85
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-show-schema.yaml51
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-create-schema.yaml48
-rw-r--r--plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-show-schema.yaml51
-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
16 files changed, 457 insertions, 0 deletions
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-create-schema.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-create-schema.yaml
new file mode 100644
index 00000000..db0af2b6
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-create-schema.yaml
@@ -0,0 +1,85 @@
+open_cli_schema_version: 1.0
+name: ep-create
+description: Create Entitlement Pool
+version: onap-1.0
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: ep-name
+ description: Entitlement Pool name
+ type: string
+ short_option: x
+ long_option: ep-name
+ is_optional: false
+ - name: license-model-id
+ description: License Model ID
+ type: string
+ short_option: y
+ long_option: license-model-id
+ is_optional: false
+ - name: ep-description
+ description: Description for Entitlement Pool
+ type: string
+ short_option: z
+ long_option: ep-description
+ is_optional: false
+ - name: threshold-value
+ description: threshold
+ type: string
+ short_option: q
+ long_option: threshold-value
+ is_optional: false
+ - name: threshold-unit
+ description: threshold
+ type: string
+ short_option: b
+ long_option: threshold-unit
+ is_optional: false
+ - name: entitlement-metric
+ description: Entitlement Metric
+ type: string
+ short_option: c
+ long_option: entitlement-metric
+ is_optional: false
+ - name: aggregation-function
+ description: Aggregation Function
+ type: string
+ short_option: e
+ long_option: aggregation-function
+ is_optional: false
+ - name: operational-scope
+ description: Operational Scope
+ type: string
+ short_option: g
+ long_option: operational-scope
+ is_optional: false
+ - name: reference-number
+ description: Reference Number
+ type: string
+ short_option: k
+ long_option: reference-number
+ is_optional: false
+
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: Entitlement Pool ID
+ scope: short
+ type: string
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${license-model-id}/entitlement-pools
+ method: POST
+ body: '{"name": "${ep-name}", "description": "${ep-description}", "thresholdValue": "${threshold-value}", "thresholdUnits": "${threshold-unit}", "entitlementMetric":{"choice": "${entitlement-metric}","other": ""}, "increments": "robot", "aggregationFunction":{"choice": "${aggregation-function}","other": ""}, "operationalScope":{"choices":["${operational-scope}"], "other":""},"time":{"choice": "Hour", "other":""}, "manufacturerReferenceNumber":"${reference-number}"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value}
+ sample_response:
+ body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}'
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-show-schema.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-show-schema.yaml
new file mode 100644
index 00000000..93968407
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-entitlement-pool-show-schema.yaml
@@ -0,0 +1,51 @@
+open_cli_schema_version: 1.0
+name: ep-show
+description: Details of the Entitlement Pool
+version: onap-1.0
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: license-model-id
+ description: Onap License Model ID
+ type: string
+ short_option: x
+ long_option: license-model-id
+ is_optional: false
+ - name: pool-id
+ description: Onap Entitlement Pool ID
+ type: string
+ short_option: y
+ long_option: pool-id
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: Entitlement Pool Name
+ scope: short
+ type: string
+ - name: ID
+ description: Entitlement Pool ID
+ scope: short
+ type: string
+ - name: description
+ description: Description for the Entitlement Pool
+ scope: short
+ type: string
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${license-model-id}/entitlement-pools/${pool-id}
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ name: $b{$.name}
+ ID: $b{$.id}
+ description: $b{$.description}
+ sample_response:
+ body: '{"name":"demo-group","description":"","type":"Universal","operationalScope":{"choices":["Tenant"]},"id":"FF87C2483B854B5BA5F96751BF251F46","referencingFeatureGroups":[]}'
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-create-schema.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-create-schema.yaml
new file mode 100644
index 00000000..bd9b8a23
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-create-schema.yaml
@@ -0,0 +1,48 @@
+open_cli_schema_version: 1.0
+name: license-group-create
+description: Create License Group
+version: onap-1.0
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: group-name
+ description: group name
+ type: string
+ short_option: x
+ long_option: group-name
+ is_optional: false
+ - name: license-model-id
+ description: License Model ID
+ type: string
+ short_option: y
+ long_option: license-model-id
+ is_optional: false
+ - name: license-group-description
+ description: Description for License Group
+ type: string
+ short_option: z
+ long_option: license-group-description
+ is_optional: true
+
+results:
+ direction: portrait
+ attributes:
+ - name: ID
+ description: License Group ID
+ scope: short
+ type: string
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${license-model-id}/license-key-groups
+ method: POST
+ body: '{"name": "${group-name}", "description": "${license-group-description}", "operationalScope": {"choices": ["Tenant"],"other":""},"type": "Universal"}'
+ success_codes:
+ - 200
+ result_map:
+ ID: $b{$.value}
+ sample_response:
+ body: '{"value":"2DEB6CB4B082415BB7A697C9CD1273BA"}'
diff --git a/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-show-schema.yaml b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-show-schema.yaml
new file mode 100644
index 00000000..3b93d9e2
--- /dev/null
+++ b/plugins/sdc/src/main/resources/onap-cli-schema/license-models/license-group-show-schema.yaml
@@ -0,0 +1,51 @@
+open_cli_schema_version: 1.0
+name: license-group-show
+description: Details of the License Group
+version: onap-1.0
+service:
+ name: sdc
+ version: v1.0
+ auth: basic
+ mode: direct
+
+parameters:
+ - name: license-model-id
+ description: Onap License Model ID
+ type: string
+ short_option: x
+ long_option: license-model-id
+ is_optional: false
+ - name: license-group-id
+ description: Onap License Group ID
+ type: string
+ short_option: y
+ long_option: license-group-id
+ is_optional: false
+
+results:
+ direction: landscape
+ attributes:
+ - name: name
+ description: License Group Name
+ scope: short
+ type: string
+ - name: ID
+ description: License Group ID
+ scope: short
+ type: string
+ - name: description
+ description: Description for the License Group
+ scope: short
+ type: string
+http:
+ request:
+ uri: /onboarding-api/v1.0/vendor-license-models/${license-model-id}/license-key-groups/${license-group-id}
+ method: GET
+ success_codes:
+ - 200
+ result_map:
+ name: $b{$.name}
+ ID: $b{$.id}
+ description: $b{$.description}
+ sample_response:
+ body: '{"name":"demo-group","description":"","type":"Universal","operationalScope":{"choices":["Tenant"]},"id":"FF87C2483B854B5BA5F96751BF251F46","referencingFeatureGroups":[]}'
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 |
+ +----------+----------------------------------+----------------------+--------+