summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/so/src/main/resources/onap-cli-schema/services/service-create-schema-1.1.yaml63
-rw-r--r--plugins/so/src/test/resources/onap-cli-sample/services/service-create-sample-1.1.yaml8
-rw-r--r--plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-moco.json48
-rw-r--r--plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-sample.yaml14
4 files changed, 108 insertions, 25 deletions
diff --git a/plugins/so/src/main/resources/onap-cli-schema/services/service-create-schema-1.1.yaml b/plugins/so/src/main/resources/onap-cli-schema/services/service-create-schema-1.1.yaml
index 03d57582..a4593644 100644
--- a/plugins/so/src/main/resources/onap-cli-schema/services/service-create-schema-1.1.yaml
+++ b/plugins/so/src/main/resources/onap-cli-schema/services/service-create-schema-1.1.yaml
@@ -4,23 +4,47 @@ description: Create a service instance using MSO
version: onap-1.1
service:
name: mso
- version: v2
+ version: v3
auth: basic
mode: direct
parameters:
- - name: global-subscriber-id
+ - name: cloud-region
+ description: cloud region identifier
+ type: string
+ long_option: cloud-region
+ is_optional: false
+ - name: tenant-id
+ description: tenant id
+ type: string
+ long_option: tenant-id
+ is_optional: false
+ - name: model-invariant-id
+ description: model invariant id generated by ASDC.
+ type: string
+ long_option: model-invariant-id
+ is_optional: false
+ - name: model-uuid
+ description: model uuid generated by ASDC.
+ type: string
+ long_option: model-uuid
+ is_optional: false
+ - name: model-name
+ description: model name as provided in ASDC design time.
+ type: string
+ long_option: model-name
+ is_optional: false
+ - name: model-version
+ description: model-version
+ type: string
+ long_option: model-version
+ is_optional: false
+ - name: customer
description: unique id for customer
type: string
short_option: c
- long_option: global-subscriber-id
+ long_option: customer
is_optional: false
- - name: subscriber-name
- description: subscriber name
- type: string
- short_option: b
- long_option: subscriber-name
- is_optional: true
- name: instance-name
description: service instance name
type: string
@@ -33,11 +57,16 @@ parameters:
short_option: r
long_option: supress-rollback
is_optional: true
+ - name: service-type
+ description: subscription service type
+ type: string
+ long_option: service-type
+ is_optional: false
results:
direction: portrait
- attribute:
- - name: instance-id
+ attributes:
+ - name: service-id
description: instance id for the created service.
type: string
scope: short
@@ -45,13 +74,13 @@ results:
http:
request:
- uri: ecomp/mso/infra/serviceInstances/v2
- method: PUT
- body: '{"requestDetails": {"modelInfo": {"modelType": "service","modelInvariantId": "ff3514e3-5a33-55df-13ab-12abad84e7ff","modelNameVersionId": "fe6985cd-ea33-3346-ac12-ab121484a3fe","modelName": "Test","modelVersion": "1.0"},"subscriberInfo": {"globalSubscriberId": "${global-subscriber-id}","subscriberName": "${subscriber-name}"},"requestInfo": {"instanceName": "${instance-name}","source": "VID","suppressRollback": "${supress-rollback}"},"requestParameters": {"subscriptionServiceType": "MOG"}}}'
+ uri: /ecomp/mso/infra/serviceInstances/v3
+ method: POST
+ body: '{"requestDetails": {"cloudConfiguration" : {"lcpCloudRegionId": "${cloud-region}","tenantId": "${tenant-id}"},"modelInfo": {"modelType": "service","modelInvariantId": "${model-invariant-id}","modelNameVersionId": "${model-uuid}","modelName": "${model-name}","modelVersion": "${model-version}"},"subscriberInfo": {"globalSubscriberId": "${customer}"},"requestInfo": {"instanceName": "${instance-name}","source": "VID","suppressRollback": "${supress-rollback}"},"requestParameters": {"subscriptionServiceType": "${service-type}"}}}'
success_codes:
- 202
- result_mpa:
- instance-id: $b{$.instance-id}
+ result_map:
+ service-id: $b{$.requestReferences.instanceId}
sample_response:
- body: '{"instance-id":"234567AB"}'
+ body: '{"requestReferences":{"instanceId":"${instance-id}","requestId":"375ba428-65e7-4f2b-afb9-74735ac6bfd0"}}'
diff --git a/plugins/so/src/test/resources/onap-cli-sample/services/service-create-sample-1.1.yaml b/plugins/so/src/test/resources/onap-cli-sample/services/service-create-sample-1.1.yaml
deleted file mode 100644
index c52d8000..00000000
--- a/plugins/so/src/test/resources/onap-cli-sample/services/service-create-sample-1.1.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-onap_cli_sample_version: 1.0
-
-name: service-create
-version: onap-1.1
-samples:
- sample1:
- name: Create a service instance
- input: -h https://locahost:8080 -u InfraPortalClient -p password1$ -c customer -s subscriber -i instance -r \ No newline at end of file
diff --git a/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-moco.json b/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-moco.json
new file mode 100644
index 00000000..28321085
--- /dev/null
+++ b/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-moco.json
@@ -0,0 +1,48 @@
+[ {
+ "request" : {
+ "method" : "post",
+ "uri" : "/ecomp/mso/infra/serviceInstances/v3",
+ "headers" : {
+ "Authorization" : "Basic SW5mcmFQb3J0YWxDbGllbnQ6cGFzc3dvcmQxJA==",
+ "X-FromAppId" : "onap-cli",
+ "Accept" : "application/json",
+ "X-TransactionId" : "req-0dc01d80-f629-4ea9-b49f-0bc45b79bfaf",
+ "Content-Type" : "application/json"
+ },
+ "json" : {
+ "requestDetails" : {
+ "cloudConfiguration" : {
+ "lcpCloudRegionId" : "RegionOne",
+ "tenantId" : "onap"
+ },
+ "modelInfo" : {
+ "modelType" : "service",
+ "modelInvariantId" : "1de901ed-17af-4b03-bc1f-41659cfa27cb",
+ "modelNameVersionId" : "ace39141-09ec-4068-b06d-ac6b23bdc6e0",
+ "modelName" : "demoVLB",
+ "modelVersion" : "1.0"
+ },
+ "subscriberInfo" : {
+ "globalSubscriberId" : "Demonstration"
+ },
+ "requestInfo" : {
+ "instanceName" : "sample-service-onap-cli-13",
+ "source" : "VID",
+ "suppressRollback" : "false"
+ },
+ "requestParameters" : {
+ "subscriptionServiceType" : "vLB"
+ }
+ }
+ }
+ },
+ "response" : {
+ "status" : 202,
+ "json" : {
+ "requestReferences" : {
+ "instanceId" : "957949b4-f857-497c-81b0-832ce7bb9434",
+ "requestId" : "d59fc98a-b0fa-4de9-b426-6ef40dfd0812"
+ }
+ }
+ }
+} ] \ No newline at end of file
diff --git a/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-sample.yaml b/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-sample.yaml
new file mode 100644
index 00000000..aebadfcf
--- /dev/null
+++ b/plugins/so/src/test/resources/onap-cli-sample/services/service-create-schema-1.1-sample.yaml
@@ -0,0 +1,14 @@
+onap_cli_sample_version: 1.0
+name: service-create
+version: onap-1.1
+samples:
+ sample1:
+ name: service-create
+ input: --cloud-region RegionOne --tenant-id onap --model-invariant-id 1de901ed-17af-4b03-bc1f-41659cfa27cb --model-uuid ace39141-09ec-4068-b06d-ac6b23bdc6e0 --model-name demoVLB --model-version 1.0 -c Demonstration --instance-name sample-service-onap-cli-13 --service-type vLB
+ moco: service-create-schema-1.1-moco.json
+ ouput: |
+ +--------------+--------------------------------------+
+ |property |value |
+ +--------------+--------------------------------------+
+ |service-id |957949b4-f857-497c-81b0-832ce7bb9434 |
+ +--------------+--------------------------------------+