diff options
author | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-03-19 16:08:48 +0530 |
---|---|---|
committer | Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com> | 2018-03-19 16:08:48 +0530 |
commit | a1b334af3f30c4d5f1dc986b81155e5df994478c (patch) | |
tree | 64f0b32f9df0bcc856c377b5f965eb521d4be01b /products/onap-beijing/features/sdc | |
parent | 480590dae302132fb934b4205c0d20028f22cc27 (diff) |
CLI: service-model-checkin beijing
Change-Id: I5f6e8d32402c60854d7be47b1b1f6510eb3df952
Issue-ID: CLI-100
Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'products/onap-beijing/features/sdc')
3 files changed, 115 insertions, 0 deletions
diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-moco.json b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-moco.json new file mode 100644 index 00000000..b6979a55 --- /dev/null +++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-moco.json @@ -0,0 +1,48 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/sdc2/rest/v1/catalog/services/7b427dbf-685b-4ba9-8838-a9b3b3c8e584/lifecycleState/checkin", + "headers" : { + "Authorization" : "Basic Y3MwMDA4OmRlbW8xMjM0NTYh", + "X-FromAppId" : "onap-cli", + "Accept" : "application/json", + "USER_ID" : "cs0008", + "X-TransactionId" : "req-7fce4b26-bae7-455f-b3d6-ebb01cca72b7", + "Content-Type" : "application/json" + }, + "json" : { + "userRemarks" : "Checked in via CLI" + } + }, + "response" : { + "status" : 200, + "json" : { + "uniqueId" : "7b427dbf-685b-4ba9-8838-a9b3b3c8e584", + "name" : "kanag-cli-VLB", + "version" : "0.1", + "isHighestVersion" : true, + "creationDate" : 1509606274213, + "lastUpdateDate" : 1509606402636, + "description" : "VLB created from CLI", + "lifecycleState" : "NOT_CERTIFIED_CHECKIN", + "tags" : [ "CLI", "kanag-cli-VLB" ], + "icon" : "defaulticon", + "normalizedName" : "kanagclivlb", + "systemName" : "KanagCliVlb", + "contactId" : "cs0008", + "projectCode" : "kanag-123456", + "invariantUUID" : "c4425f23-fc9a-4cbf-a3b7-12e69054806b", + "componentType" : "SERVICE", + "creatorUserId" : "cs0008", + "creatorFullName" : "Carlos Santana", + "lastUpdaterUserId" : "cs0008", + "lastUpdaterFullName" : "Carlos Santana", + "distributionStatus" : "DISTRIBUTION_NOT_APPROVED", + "ecompGeneratedNaming" : true, + "namingPolicy" : "", + "serviceType" : "", + "serviceRole" : "", + "uuid" : "660c524c-176b-43b1-a85b-1ef18011ca85" + } + } +} ]
\ No newline at end of file diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-sample.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-sample.yaml new file mode 100644 index 00000000..c2893973 --- /dev/null +++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-sample/service-model/service-model-checkin-schema-beijing-sample.yaml @@ -0,0 +1,23 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_sample_version: 1.0 +name: service-model-checkin +version: onap-beijing +samples: + sample1: + name: service-model-checkin + input: --service-model-id 7b427dbf-685b-4ba9-8838-a9b3b3c8e584 + moco: service-model-checkin-schema-1.1-moco.json + output:
\ No newline at end of file diff --git a/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-beijing.yaml b/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-beijing.yaml new file mode 100644 index 00000000..74e8fb13 --- /dev/null +++ b/products/onap-beijing/features/sdc/src/main/resources/open-cli-schema/service-model/service-model-checkin-schema-beijing.yaml @@ -0,0 +1,44 @@ +# Copyright 2018 Huawei Technologies Co., Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +open_cli_schema_version: 1.0 +name: service-model-checkin +description: Checkin Service model in SDC + +info: + product: onap-beijing + service: sdc + author: ONAP CLI Team onap-discuss@lists.onap.org + +parameters: + - name: service-model-id + description: Service model ID + type: string + long_option: service-model-id + short_option: b + is_optional: true + +http: + service: + name: sdc + version: v1.0 + auth: basic + mode: direct + request: + uri: /sdc2/rest/v1/catalog/services/${service-model-id}/lifecycleState/checkin + method: POST + body: '{"userRemarks": "Checked in via CLI"}' + success_codes: + - 200 + |