summaryrefslogtreecommitdiffstats
path: root/tests/blueprints
diff options
context:
space:
mode:
Diffstat (limited to 'tests/blueprints')
-rwxr-xr-xtests/blueprints/heat/hello-world.hot38
-rwxr-xr-xtests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml57
-rwxr-xr-xtests/blueprints/tosca-vnfd-hello-world-tacker/start.sh47
3 files changed, 142 insertions, 0 deletions
diff --git a/tests/blueprints/heat/hello-world.hot b/tests/blueprints/heat/hello-world.hot
new file mode 100755
index 0000000..a4d6a7e
--- /dev/null
+++ b/tests/blueprints/heat/hello-world.hot
@@ -0,0 +1,38 @@
+heat_template_version: 2013-05-23
+description: 'Hello World'
+parameters: {}
+resources:
+ VDU1:
+ type: OS::Nova::Server
+ properties:
+ availability_zone: nova
+ config_drive: false
+ flavor: {get_resource: VDU1_flavor}
+ image: cirros-0.3.4-x86_64-uec
+ networks:
+ - port:
+ get_resource: CP1
+ - port:
+ get_resource: CP2
+ - port:
+ get_resource: CP3
+ user_data_format: SOFTWARE_CONFIG
+ CP1:
+ type: OS::Neutron::Port
+ properties:
+ network: vnf_mgmt
+ CP2:
+ type: OS::Neutron::Port
+ properties:
+ network: vnf_private
+ CP3:
+ type: OS::Neutron::Port
+ properties:
+ network: public
+ VDU1_flavor:
+ properties: {disk: 1, ram: 512, vcpus: 1}
+ type: OS::Nova::Flavor
+outputs:
+ mgmt_ip-VDU1:
+ value:
+ get_attr: [CP1, fixed_ips, 0, ip_address]
diff --git a/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml b/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml
new file mode 100755
index 0000000..e8d91af
--- /dev/null
+++ b/tests/blueprints/tosca-vnfd-hello-world-tacker/blueprint.yaml
@@ -0,0 +1,57 @@
+tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0
+
+description: Hello World
+
+metadata:
+ template_name: tosca-vnfd-hello-world
+
+topology_template:
+ node_templates:
+ VDU1:
+ type: tosca.nodes.nfv.VDU.Tacker
+ capabilities:
+ nfv_compute:
+ properties:
+ num_cpus: 1
+ mem_size: 1024 MB
+ disk_size: 4 GB
+ properties:
+ image: models-xenial-server
+ availability_zone: nova
+ mgmt_driver: noop
+ config: |
+ param0: key1
+ param1: key2
+
+ CP1:
+ type: tosca.nodes.nfv.CP.Tacker
+ properties:
+ management: true
+ anti_spoofing_protection: false
+ requirements:
+ - virtualLink:
+ node: VL1
+ - virtualBinding:
+ node: VDU1
+
+ CP2:
+ type: tosca.nodes.nfv.CP.Tacker
+ properties:
+ anti_spoofing_protection: false
+ requirements:
+ - virtualLink:
+ node: VL2
+ - virtualBinding:
+ node: VDU1
+
+ VL1:
+ type: tosca.nodes.nfv.VL
+ properties:
+ network_name: vnf_mgmt
+ vendor: Tacker
+
+ VL2:
+ type: tosca.nodes.nfv.VL
+ properties:
+ network_name: vnf_private
+ vendor: Tacker \ No newline at end of file
diff --git a/tests/blueprints/tosca-vnfd-hello-world-tacker/start.sh b/tests/blueprints/tosca-vnfd-hello-world-tacker/start.sh
new file mode 100755
index 0000000..55e51ce
--- /dev/null
+++ b/tests/blueprints/tosca-vnfd-hello-world-tacker/start.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+# Copyright 2016 AT&T Intellectual Property, Inc
+#
+# 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.
+#
+# What this is: Startup script for a simple web server as part of the
+# vHello test of the OPNFV Models project.
+#
+# Status: this is a work in progress, under test.
+#
+# How to use:
+# $ bash start.sh
+
+set -e
+
+sudo apt-get update
+sudo apt-get install -y python3
+
+cat <<EOF >index.html
+<!DOCTYPE html>
+<html>
+<head>
+<title>Hello World!</title>
+<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1"/>
+<style>
+body { width: 100%; background-color: white; color: black; padding: 0px; margin: 0px; font-family: sans-serif; font-size:100%; }
+</style>
+</head>
+<body>
+Hello World!<br>
+<a href="http://wiki.opnfv.org"><img src="logo.png"></a>
+</body></html>
+EOF
+
+wget https://www.opnfv.org/sites/all/themes/opnfv/logo.png
+
+nohup sudo python3 -m http.server 80 > /dev/null 2>&1 & \ No newline at end of file