diff options
author | 2017-08-29 18:15:10 +0530 | |
---|---|---|
committer | 2017-08-30 11:02:07 +0530 | |
commit | a4cd2403a5a171d6ab6aa6b1b0b1aae83345121b (patch) | |
tree | 21646bed2f1dd2974ed24756c1f04855362219eb /plugins/aai/src/main/resources/onap-cli-schema/service-type | |
parent | 56ecabe9f1e7fca51d919df2836811b378c0e7df (diff) |
Add versioning for command
By allowing to add version to the YAML, helps to
create same command for multiple versions of
product say onap 1.0, 1.1
CLI-37
Change-Id: Ic3982ea912045ff4f422fcf093cbd98ecd99716d
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'plugins/aai/src/main/resources/onap-cli-schema/service-type')
6 files changed, 107 insertions, 0 deletions
diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema-1.1.yaml new file mode 100644 index 00000000..a91f005b --- /dev/null +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema-1.1.yaml @@ -0,0 +1,33 @@ +onap_cmd_schema_version: 1.0 +name: service-type-create +description: Add a service type in Onap +version: onap-1.1 +service: + name: aai + version: v8 + auth: basic + mode: direct + +parameters: + - name: service-type + description: Onap service type + type: string + short_option: x + long_option: service-type + is_optional: false + - name: service-type-id + description: Onap service type uuid + type: uuid + short_option: y + long_option: service-type-id + is_optional: true + +http: + request: + uri: /aai/v11/service-design-and-creation/services/service/${service-type-id} + method: PUT + body: '{"service-description": "${service-type}", "service-id": "${service-type-id}"}' + success_codes: + - 201 + sample_response: + body: '' diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema.yaml index ad11c35d..0f5eea1f 100644 --- a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema.yaml +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-create-schema.yaml @@ -1,6 +1,7 @@ onap_cmd_schema_version: 1.0 name: service-type-create description: Add a service type in Onap +version: onap-1.0 service: name: aai version: v8 diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema-1.1.yaml new file mode 100644 index 00000000..30296a94 --- /dev/null +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema-1.1.yaml @@ -0,0 +1,34 @@ +onap_cmd_schema_version: 1.0 +name: service-type-delete +description: Delete a service type from Onap +version: onap-1.1 +service: + name: aai + version: v8 + auth: basic + mode: direct + +parameters: + - name: service-type-id + description: Onap service type uuid + type: uuid + short_option: x + long_option: service-type-id + is_optional: true + - name: resource-version + description: Onap service resource version + type: uuid + short_option: y + long_option: resource-version + is_optional: true +http: + request: + uri: /aai/v11/service-design-and-creation/services/service/${service-type-id}?resource-version=${resource-version} + queries: + resource-version: ${resource-version} + method: DELETE + success_codes: + - 204 + - 404 + sample_response: + body: '' diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema.yaml index a2eecd93..d007a05c 100644 --- a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema.yaml +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-delete-schema.yaml @@ -1,6 +1,7 @@ onap_cmd_schema_version: 1.0 name: service-type-delete description: Delete a service type from Onap +version: onap-1.0 service: name: aai version: v8 diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema-1.1.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema-1.1.yaml new file mode 100644 index 00000000..ac57b05b --- /dev/null +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema-1.1.yaml @@ -0,0 +1,37 @@ +onap_cmd_schema_version: 1.0 +name: service-type-list +description: List the service types configured in Onap +version: onap-1.1 +service: + name: aai + version: v8 + auth: basic + mode: direct + +results: + direction: landscape + attributes: + - name: service-type-id + description: Onap cloud service + scope: short + type: string + - name: service-type + description: Onap cloud service + scope: short + type: string + - name: resource-version + description: Onap cloud service resource version + scope: short + type: string +http: + request: + uri: /aai/v11/service-design-and-creation/services + method: GET + success_codes: + - 200 + result_map: + service-type: $b{service.[*].service-description} + service-type-id: $b{service.[*].service-id} + resource-version: $b{service.[*].resource-version} + sample_response: + body: '{"service":[{"service-id":"db3403eb-5c94-4295-bb00-a9dba8964ab3","service-description":"vFW","resource-version":"1500729865"},{"service-id":"33737156-ff09-4b3d-884a-fe9a372afa4e","service-description":"vLB","resource-version":"1500729866"}]}' diff --git a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema.yaml b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema.yaml index 7be38f1c..a81b6d95 100644 --- a/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema.yaml +++ b/plugins/aai/src/main/resources/onap-cli-schema/service-type/service-type-list-schema.yaml @@ -1,6 +1,7 @@ onap_cmd_schema_version: 1.0 name: service-type-list description: List the service types configured in Onap +version: onap-1.0 service: name: aai version: v8 |