From 0036212a81245ca1e55014ab3196557734adda00 Mon Sep 17 00:00:00 2001 From: Haibin Huang Date: Thu, 21 Mar 2019 11:01:00 +0800 Subject: Add vfc nslcm operation in onap dublin Change-Id: I5f332ce6922cc2cf88c3761333f5d45ef5d60f11 Issue-ID: CLI-149 Signed-off-by: Haibin Huang --- .../nslcm/vfc-nslcm-create-schema.yaml | 62 +++++++++++++++++++ .../nslcm/vfc-nslcm-delete-schema.yaml | 56 +++++++++++++++++ .../nslcm/vfc-nslcm-get-schema.yaml | 71 ++++++++++++++++++++++ .../nslcm/vfc-nslcm-instantiate-schema.yaml | 69 +++++++++++++++++++++ 4 files changed, 258 insertions(+) create mode 100644 products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-create-schema.yaml create mode 100644 products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-delete-schema.yaml create mode 100644 products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-schema.yaml create mode 100644 products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-instantiate-schema.yaml (limited to 'products/onap-dublin/features/vfc/src/main/resources/open-cli-schema') diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-create-schema.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-create-schema.yaml new file mode 100644 index 00000000..0577d30f --- /dev/null +++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-create-schema.yaml @@ -0,0 +1,62 @@ +# Copyright © Intel Corporation 2019 +# +# 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: vfc-nslcm-create +description: vfc nslcm create ns + +info: + product: onap-dublin + service: vfc + author: ONAP HPA Integration Team (haibin.huang@intel.com) + +parameters: + - name: ns-csar-uuid + description: ns's uuid of csar file + type: string + short_option: c + long_option: ns-csar-uuid + is_optional: false + - name: ns-csar-name + description: ns's name of csar + type: string + short_option: n + long_option: ns-csar-name + is_optional: false + +results: + direction: landscape + attributes: + - name: ns-instance-id + description: ns-instance-id + scope: short + type: string + +http: + service: + auth: none + mode: direct + request: + uri: /api/nslcm/v1/ns + method: POST + context: + remove_empty_node: true + body: '{"csarId": "${ns-csar-uuid}", "nsName": "${ns-csar-name}"}' + headers: + Content-Type: application/json + Accept: application/json + success_codes: + - 201 + result_map: + ns-instance-id: $b{$.nsInstanceId} diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-delete-schema.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-delete-schema.yaml new file mode 100644 index 00000000..4850e070 --- /dev/null +++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-delete-schema.yaml @@ -0,0 +1,56 @@ +# Copyright © Intel Corporation 2019 +# +# 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: vfc-nslcm-delete +description: vfc nslcm delete ns + +info: + product: onap-dublin + service: vfc + author: ONAP HPA Integration Team (haibin.huang@intel.com) + +parameters: + - name: ns-instance-id + description: ns's instance id + type: string + short_option: c + long_option: ns-instance-id + is_optional: false + +results: + direction: landscape + attributes: + - name: status + description: status + scope: short + type: string + +http: + service: + auth: none + mode: direct + request: + uri: /api/nslcm/v1/ns/${ns-instance-id} + method: DELETE + context: + remove_empty_node: true + body: '{}' + headers: + Content-Type: application/json + Accept: application/json + success_codes: + - 204 + result_map: + status: ${success_codes} diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-schema.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-schema.yaml new file mode 100644 index 00000000..2983d185 --- /dev/null +++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-get-schema.yaml @@ -0,0 +1,71 @@ +# Copyright © Intel Corporation 2019 +# +# 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: vfc-nslcm-get +description: vfc nsclm get the status of creating ns + +info: + product: onap-dublin + service: vfc + author: ONAP HPA Integration Team (haibin.huang@intel.com) + +parameters: + - name: ns-instance-id + description: ns's instance id + type: string + short_option: c + long_option: ns-instance-id + is_optional: false + +results: + direction: landscape + attributes: + - name: ns-instance-id + description: ns-instance-id + scope: short + type: string + - name: ns-name + description: ns-name + scope: short + type: string + - name: description + description: description + scope: short + type: string + - name: nsd-id + description: nsd-id + scope: short + type: string + +http: + service: + auth: none + mode: direct + request: + uri: /api/nslcm/v1/ns/${ns-instance-id} + method: GET + context: + remove_empty_node: true + body: '{}' + headers: + Content-Type: application/json + Accept: application/json + success_codes: + - 200 + result_map: + ns-instance-id: $b{$.nsInstanceId} + ns-name: $b{$.nsName} + description: $b{$.description} + nsd-id: $b{$.nsdId} diff --git a/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-instantiate-schema.yaml b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-instantiate-schema.yaml new file mode 100644 index 00000000..5db338f7 --- /dev/null +++ b/products/onap-dublin/features/vfc/src/main/resources/open-cli-schema/nslcm/vfc-nslcm-instantiate-schema.yaml @@ -0,0 +1,69 @@ +# Copyright © Intel Corporation 2019 +# +# 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: vfc-nslcm-instantiate +description: vfc nslcm instantiate ns + +info: + product: onap-dublin + service: vfc + author: ONAP HPA Integration Team (haibin.huang@intel.com) + +parameters: + - name: ns-instance-id + description: ns's instance id + type: string + short_option: i + long_option: ns-instance-id + is_optional: false + - name: location-constraints + description: localtion constraints + type: json + short_option: c + long_option: location-constraints + is_optional: false + - name: sdn-controller-id + description: sdn controller id + type: string + short_option: n + long_option: sdn-controller-id + is_optional: false + +results: + direction: landscape + attributes: + - name: job-id + description: job id + scope: short + type: string + +http: + service: + auth: none + mode: direct + request: + uri: /api/nslcm/v1/ns/${ns-instance-id}/instantiate + method: POST + context: + remove_empty_node: true + body: '{"additionalParamForNs": {"sdnControllerId": "${sdn-controller-id}"}, + "locationConstraints": "${location-constraints}"}' + headers: + Content-Type: application/json + Accept: application/json + success_codes: + - 200 + result_map: + job-id: $b{$.jobId} -- cgit 1.2.3-korg