diff options
author | Itohan Ukponmwan <itohan.ukponmwan@intel.com> | 2019-03-20 00:31:42 +0000 |
---|---|---|
committer | Itohan Ukponmwan <itohan.ukponmwan@intel.com> | 2019-03-20 00:42:01 +0000 |
commit | 618482352bbfdfb225bdee0ba377a4ab71ce5135 (patch) | |
tree | 89a93ce8f4f823a10db298006c14b69a99ee5bc0 /products/onap-dublin/features/sdnc/src/main | |
parent | e595350b9af7e1df041b4686608c4b385613e681 (diff) |
SDNC framework and commands
-SDNC commands to do a preload for a VF
-SDNC framework files
-SDNC test files
Change-Id: Iac61e43269f0b808ba837f00c60a6e5f9eae984a
Issue-ID: CLI-143
Signed-off-by: Itohan Ukponmwan <itohan.ukponmwan@intel.com>
Diffstat (limited to 'products/onap-dublin/features/sdnc/src/main')
3 files changed, 214 insertions, 0 deletions
diff --git a/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-moco.json b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-moco.json new file mode 100644 index 00000000..466db8c5 --- /dev/null +++ b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-moco.json @@ -0,0 +1,150 @@ +[ { + "request" : { + "method" : "post", + "uri" : "/restconf/operations/VNF-API:preload-vnf-topology-operation", + "headers" : { + "Authorization" : "Basic YWRtaW46S3A4Yko0U1hzek0wV1hsaGFrM2VIbGNzZTJnQXc4NHZhb0dHbUp2VXkyVQ==", + "X-FromAppId" : "ONAP CLI", + "Accept" : "application/json", + "X-TransactionId" : "req-940f9f93-8a71-4c54-820a-ee67ea4b7910", + "Content-Type" : "application/json" + }, + "json" : { + "input" : { + "request-information" : { + "notification-url" : "openecomp.org", + "order-number" : "1", + "order-version" : "1", + "request-action" : "PreloadVNFRequest", + "request-id" : "test" + }, + "sdnc-request-header" : { + "svc-action" : "reserve", + "svc-notification-url" : "http://openecomp.org:8080/adapters/rest/SDNCNotify", + "svc-request-id" : "test" + }, + "vnf-topology-information" : { + "vnf-assignments" : { + "availability-zones" : [ ], + "vnf-networks" : [ ], + "vnf-vms" : [ ] + }, + "vnf-parameters" : [ { + "vnf-parameter-name" : "vfw_image_name", + "vnf-parameter-value" : "ubuntu-16.04" + }, { + "vnf-parameter-name" : "firewall_flavor_name", + "vnf-parameter-value" : "m1.medium" + }, { + "vnf-parameter-name" : "sink_flavor_name", + "vnf-parameter-value" : "m1.medium" + }, { + "vnf-parameter-name" : "packetgen_flavor_name", + "vnf-parameter-value" : "m1.medium" + }, { + "vnf-parameter-name" : "public_net_id", + "vnf-parameter-value" : "external" + }, { + "vnf-parameter-name" : "unprotected_private_net_id", + "vnf-parameter-value" : "unprotected_private_net_00" + }, { + "vnf-parameter-name" : "protected_private_net_id", + "vnf-parameter-value" : "protected_private_net_00" + }, { + "vnf-parameter-name" : "onap_private_net_id", + "vnf-parameter-value" : "k8_network" + }, { + "vnf-parameter-name" : "onap_private_subnet_id", + "vnf-parameter-value" : "k8_network" + }, { + "vnf-parameter-name" : "unprotected_private_net_cidr", + "vnf-parameter-value" : "192.168.10.0/24" + }, { + "vnf-parameter-name" : "protected_private_net_cidr", + "vnf-parameter-value" : "192.168.20.0/24" + }, { + "vnf-parameter-name" : "onap_private_net_cidr", + "vnf-parameter-value" : "10.240.0.0/24" + }, { + "vnf-parameter-name" : "vfw_private_ip_0", + "vnf-parameter-value" : "192.168.10.100" + }, { + "vnf-parameter-name" : "vfw_private_ip_1", + "vnf-parameter-value" : "192.168.20.100" + }, { + "vnf-parameter-name" : "vfw_private_ip_2", + "vnf-parameter-value" : "10.240.0.10" + }, { + "vnf-parameter-name" : "vpg_private_ip_0", + "vnf-parameter-value" : "192.168.10.200" + }, { + "vnf-parameter-name" : "vpg_private_ip_1", + "vnf-parameter-value" : "10.240.0.12" + }, { + "vnf-parameter-name" : "vsn_private_ip_0", + "vnf-parameter-value" : "192.168.20.250" + }, { + "vnf-parameter-name" : "vsn_private_ip_1", + "vnf-parameter-value" : "10.240.0.8" + }, { + "vnf-parameter-name" : "vfw_name_0", + "vnf-parameter-value" : "vfw" + }, { + "vnf-parameter-name" : "vpg_name_0", + "vnf-parameter-value" : "vpktgen" + }, { + "vnf-parameter-name" : "vsn_name_0", + "vnf-parameter-value" : "vsink" + }, { + "vnf-parameter-name" : "vfw_private_0_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vfw_private_1_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vfw_private_2_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vpg_private_0_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vpg_private_1_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vsn_private_0_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vsn_private_1_port_vnic_type", + "vnf-parameter-value" : "normal" + }, { + "vnf-parameter-name" : "vf_module_id", + "vnf-parameter-value" : "VfwhpaTest1V2..base_vfw..module-0" + }, { + "vnf-parameter-name" : "sec_group", + "vnf-parameter-value" : "default" + }, { + "vnf-parameter-name" : "template_type", + "vnf-parameter-value" : "heat" + } ], + "vnf-topology-identifier" : { + "generic-vnf-name" : "cli_test1", + "generic-vnf-type" : "vfwhpa_test1_v2 0", + "service-type" : "7cc3eb0e-1c86-4fc7-9c5c-646a409e6752", + "vnf-name" : "cli_test1", + "vnf-type" : "VfwhpaTest1V2..base_vfw..module-0" + } + } + } + } + }, + "response" : { + "status" : 200, + "json" : { + "output" : { + "svc-request-id" : "test", + "response-code" : "200", + "ack-final-indicator" : "Y" + } + } + } +} ]
\ No newline at end of file diff --git a/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-sample.yaml b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-sample.yaml new file mode 100644 index 00000000..280c5cfa --- /dev/null +++ b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-sample.yaml @@ -0,0 +1,22 @@ +# 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_sample_version: 1.0 +name: -u +version: onap-dublin +samples: + sample1: + name: -u + input: admin -p Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U -m http://10.12.6.129:30202 -y test_preload.txt + moco: vf-preload-schema-dublin-moco.json + output: diff --git a/products/onap-dublin/features/sdnc/src/main/resources/open-cli-schema/vf-preload-schema-dublin.yaml b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-schema/vf-preload-schema-dublin.yaml new file mode 100644 index 00000000..38aa55d7 --- /dev/null +++ b/products/onap-dublin/features/sdnc/src/main/resources/open-cli-schema/vf-preload-schema-dublin.yaml @@ -0,0 +1,42 @@ +# 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: vf-preload +description: Preload SDNC with parameter values for a VF module in ONAP + +info: + product: onap-dublin + service: sdnc + author: Intel ONAP HPA integration team (itohan.ukponmwan@intel.com) + + +parameters: + - name: preload-file + description: File containing preload values + type: text + short_option: y + long_option: preload-file + is_optional: false + +http: + service: + auth: basic + mode: direct + request: + uri: /restconf/operations/VNF-API:preload-vnf-topology-operation + method: POST + body: '${preload-file}' + success_codes: + - 200 |