aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-20 00:31:42 +0000
committerItohan Ukponmwan <itohan.ukponmwan@intel.com>2019-03-20 00:42:01 +0000
commit618482352bbfdfb225bdee0ba377a4ab71ce5135 (patch)
tree89a93ce8f4f823a10db298006c14b69a99ee5bc0
parente595350b9af7e1df041b4686608c4b385613e681 (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>
-rw-r--r--products/onap-dublin/features/pom.xml1
-rw-r--r--products/onap-dublin/features/sdnc/pom.xml41
-rw-r--r--products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-moco.json150
-rw-r--r--products/onap-dublin/features/sdnc/src/main/resources/open-cli-sample/vf-preload-schema-dublin-sample.yaml22
-rw-r--r--products/onap-dublin/features/sdnc/src/main/resources/open-cli-schema/vf-preload-schema-dublin.yaml42
5 files changed, 256 insertions, 0 deletions
diff --git a/products/onap-dublin/features/pom.xml b/products/onap-dublin/features/pom.xml
index a5b63d10..3f0e8749 100644
--- a/products/onap-dublin/features/pom.xml
+++ b/products/onap-dublin/features/pom.xml
@@ -38,6 +38,7 @@
<module>policy</module>
<module>multicloud</module>
<module>vfc</module>
+ <module>sdnc</module>
</modules>
<build>
diff --git a/products/onap-dublin/features/sdnc/pom.xml b/products/onap-dublin/features/sdnc/pom.xml
new file mode 100644
index 00000000..599e729e
--- /dev/null
+++ b/products/onap-dublin/features/sdnc/pom.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
+ http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.onap.cli</groupId>
+ <artifactId>cli-products-onap-dublin-features</artifactId>
+ <version>2.0.6</version>
+ </parent>
+
+ <artifactId>cli-products-onap-dublin-features-sdnc</artifactId>
+ <name>cli/products/onap-dublin/features/sdnc</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
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