diff options
Diffstat (limited to 'robot')
73 files changed, 1707 insertions, 2616 deletions
diff --git a/robot/assets/asdc/base_clearwater/MANIFEST.json b/robot/assets/asdc/base_clearwater/MANIFEST.json deleted file mode 100644 index f2beda9e..00000000 --- a/robot/assets/asdc/base_clearwater/MANIFEST.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Project Clearwater", - "description": "Project Clearwater IMS", - "data": [ - { - "file": "base_clearwater.yaml", - "type": "HEAT", - "isBase": "true", - "data": [ - { - "file": "base_clearwater.env", - "type": "HEAT_ENV" - } - ] - }, - { - "file": "bono.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "dns.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "ellis.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "homer.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "homestead.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "ralf.yaml", - "type": "HEAT", - "isBase": "false" - }, - { - "file": "sprout.yaml", - "type": "HEAT", - "isBase": "false" - } - ] -} diff --git a/robot/assets/asdc/base_clearwater/base_clearwater.env b/robot/assets/asdc/base_clearwater/base_clearwater.env deleted file mode 100644 index d4a77e49..00000000 --- a/robot/assets/asdc/base_clearwater/base_clearwater.env +++ /dev/null @@ -1,21 +0,0 @@ -parameters: - public_net_id: 00000000-0000-0000-0000-000000000000 - bono_flavor_name: 4 GB General Purpose v1 - sprout_flavor_name: 4 GB General Purpose v1 - homer_flavor_name: 4 GB General Purpose v1 - homestead_flavor_name: 4 GB General Purpose v1 - ralf_flavor_name: 4 GB General Purpose v1 - ellis_flavor_name: 4 GB General Purpose v1 - dns_flavor_name: 4 GB General Purpose v1 - bono_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - sprout_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - homer_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - homestead_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - ralf_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - ellis_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - dns_image_name: Ubuntu 14.04 LTS (Trusty Tahr) (PVHVM) - repo_url: http://repo.cw-ngv.com/stable - zone: me.cw-ngv.com - dn_range_start: "2425550000" - dn_range_length: "10000" - dnssec_key: 9FPdYTWhk5+LbhrqtTPQKw==
\ No newline at end of file diff --git a/robot/assets/asdc/base_clearwater/base_clearwater.yaml b/robot/assets/asdc/base_clearwater/base_clearwater.yaml deleted file mode 100644 index c41b0509..00000000 --- a/robot/assets/asdc/base_clearwater/base_clearwater.yaml +++ /dev/null @@ -1,322 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Base Project Clearwater deployment on ONAP (Open Network Automation Platform) - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - bono_flavor_name: - type: string - description: VM flavor for bono VMs - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - sprout_flavor_name: - type: string - description: VM flavor for sprout VMs - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - homestead_flavor_name: - type: string - description: VM flavor for homestead VMs - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - homer_flavor_name: - type: string - description: VM flavor for homer VMs - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - ralf_flavor_name: - type: string - description: VM flavor for ralf VMs - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - ellis_flavor_name: - type: string - description: VM flavor for ellis VM - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - dns_flavor_name: - type: string - description: VM flavor for dns VM - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - bono_image_name: - type: string - description: Name of image for bono VMs - sprout_image_name: - type: string - description: Name of image for sprout VMs - homestead_image_name: - type: string - description: Name of image for homestead VMs - homer_image_name: - type: string - description: Name of image for homer VMs - ralf_image_name: - type: string - description: Name of image for ralf VMs - ellis_image_name: - type: string - description: Name of image for ellis VM - dns_image_name: - type: string - description: Name of image for dns VMs - key_name: - type: string - description: Name of keypair to create - pub_key: - type: string - label: Public key - description: Public key to be installed on all compute instances - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dn_range_start: - type: string - description: First directory number in pool - default: "6505550000" - constraints: - - allowed_pattern: "[0-9]+" - description: Must be numeric - dn_range_length: - type: string - description: Number of directory numbers to add to pool - default: "1000" - constraints: - - allowed_pattern: "[0-9]+" - description: Must be numeric - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - -resources: - cw_keypair: - type: OS::Nova::KeyPair - properties: - name: { get_param: key_name } - public_key: { get_param: pub_key } - save_private_key: false - -# security_groups: -# type: security-groups.yaml -# properties: -# name_prefix: { get_param: "OS::stack_name" } - - dns: - type: dns.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - dns_flavor_name: { get_param: dns_flavor_name } - dns_image_name: { get_param: dns_image_name } - key_name: { get_resource: cw_keypair } -# dns_security_group: { get_attr: [ security_groups, dns ] } - zone: { get_param: zone } - dnssec_key: { get_param: dnssec_key } - - - ellis: - type: ellis.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - ellis_flavor_name: { get_param: ellis_flavor_name } - ellis_image_name: { get_param: ellis_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# ellis_mgmt_security_group: { get_attr: [ security_groups, ellis_mgmt ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dn_range_start: { get_param: dn_range_start } - dn_range_length: { get_param: dn_range_length } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - - bono: - type: OS::Heat::ResourceGroup - properties: - count: 2 - index_var: "__index__" - resource_def: - type: bono.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - bono_flavor_name: { get_param: bono_flavor_name } - bono_image_name: { get_param: bono_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# bono_sig_security_group: { get_attr: [ security_groups, bono_sig ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - etcd_ip: { get_attr: [ ellis, public_ip ] } - index: __index__ - - sprout: - type: OS::Heat::ResourceGroup - properties: - count: 2 - index_var: __index__ - resource_def: - type: sprout.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - sprout_flavor_name: { get_param: sprout_flavor_name } - sprout_image_name: { get_param: sprout_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# sprout_sig_security_group: { get_attr: [ security_groups, sprout_sig ] } -# sprout_sig2_security_group: { get_attr: [ security_groups, sprout_sig2 ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - etcd_ip: { get_attr: [ ellis, public_ip ] } - index: __index__ - - homer: - type: OS::Heat::ResourceGroup - properties: - count: 2 - index_var: __index__ - resource_def: - type: homer.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - homer_flavor_name: { get_param: homer_flavor_name } - homer_image_name: { get_param: homer_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# homer_mgmt_security_group: { get_attr: [ security_groups, homer_mgmt ] } -# homer_sig_security_group: { get_attr: [ security_groups, homer_sig ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - etcd_ip: { get_attr: [ ellis, public_ip ] } - index: __index__ - - homestead: - type: OS::Heat::ResourceGroup - properties: - count: 2 - index_var: __index__ - resource_def: - type: homestead.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - homestead_flavor_name: { get_param: homestead_flavor_name } - homestead_image_name: { get_param: homestead_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# homestead_mgmt_security_group: { get_attr: [ security_groups, homestead_mgmt ] } -# homestead_sig_security_group: { get_attr: [ security_groups, homestead_sig ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - etcd_ip: { get_attr: [ ellis, public_ip ] } - index: __index__ - - ralf: - type: OS::Heat::ResourceGroup - properties: - count: 2 - index_var: __index__ - resource_def: - type: ralf.yaml - properties: - vnf_id: { get_param: vnf_id } - vf_module_id: { get_param: vf_module_id } - public_net_id: { get_param: public_net_id } - ralf_flavor_name: { get_param: ralf_flavor_name } - ralf_image_name: { get_param: ralf_image_name } - key_name: { get_resource: cw_keypair } -# base_mgmt_security_group: { get_attr: [ security_groups, base_mgmt ] } -# ralf_sig_security_group: { get_attr: [ security_groups, ralf_sig ] } - repo_url: { get_param: repo_url } - zone: { get_param: zone } - dns_ip: { get_attr: [ dns, dns_ip ] } - dnssec_key: { get_param: dnssec_key } - etcd_ip: { get_attr: [ ellis, public_ip ] } - index: __index__ - -outputs: - zone: - description: DNS zone - value: { get_param: zone } - dns_ip: - description: IP address of DNS - value: { get_attr: [ dns, dns_ip ] } - diff --git a/robot/assets/asdc/base_clearwater/bono.yaml b/robot/assets/asdc/base_clearwater/bono.yaml deleted file mode 100644 index 575dbb94..00000000 --- a/robot/assets/asdc/base_clearwater/bono.yaml +++ /dev/null @@ -1,191 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Bono node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - bono_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - bono_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (managment) -# bono_sig_security_group: -# type: string -# description: ID of security group for Bono nodes (signaling) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dns_ip: - type: string - description: IP address for DNS server on management network - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Bono node in the Bono cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: bono-__index__.__zone__ } } - image: { get_param: bono_image_name } - flavor: { get_param: bono_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-bono.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - management_local_ip=$PUBLIC_ADDR - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=__index__.bono.__zone__ - etcd_cluster=$etcd_ip - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install bono-node --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add bono-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add __index__.bono.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add __zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add __zone__. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.__zone__. - update add __zone__. 30 NAPTR 0 0 "s" "SIP+D2U" "" _sip._udp.__zone__. - update add _sip._tcp.__zone__. 30 SRV 0 0 5060 __index__.bono.__zone__. - update add _sip._udp.__zone__. 30 SRV 0 0 5060 __index__.bono.__zone__. - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_clearwater/dns.yaml b/robot/assets/asdc/base_clearwater/dns.yaml deleted file mode 100644 index f257d240..00000000 --- a/robot/assets/asdc/base_clearwater/dns.yaml +++ /dev/null @@ -1,159 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - DNS server exposing dynamic DNS using DNSSEC - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - dns_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - dns_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# dns_security_group: -# type: string -# description: ID of security group for DNS nodes - zone: - type: string - description: DNS zone - default: example.com - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __zone__: { get_param: zone } }, template: ns.__zone__ } } - image: { get_param: dns_image_name } - flavor: { get_param: dns_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __zone__: { get_param: zone } - __dnssec_key__: { get_param: dnssec_key } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-dns.log) 2>&1 - set -x - - # Install BIND. - apt-get update - DEBIAN_FRONTEND=noninteractive apt-get install bind9 --yes - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Update BIND configuration with the specified zone and key. - cat >> /etc/bind/named.conf.local << EOF - key __zone__. { - algorithm "HMAC-MD5"; - secret "__dnssec_key__"; - }; - - zone "__zone__" IN { - type master; - file "/var/lib/bind/db.__zone__"; - allow-update { - key __zone__.; - }; - }; - EOF - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Create basic zone configuration. - cat > /var/lib/bind/db.__zone__ << EOF - \$ORIGIN __zone__. - \$TTL 1h - @ IN SOA ns admin\@__zone__. ( $(date +%Y%m%d%H) 1d 2h 1w 30s ) - @ NS ns - ns $(ip2rr $PUBLIC_ADDR) - EOF - chown root:bind /var/lib/bind/db.__zone__ - - # Now that BIND configuration is correct, kick it to reload. - service bind9 reload - -outputs: - dns_ip: - description: IP address of DNS server - value: { get_attr: [ server, accessIPv4 ] } - zone: - description: DNS zone - value: { get_param: zone } - dnssec_key: - description: DNSSEC private key (Base64-encoded) - value: { get_param: dnssec_key } diff --git a/robot/assets/asdc/base_clearwater/ellis.yaml b/robot/assets/asdc/base_clearwater/ellis.yaml deleted file mode 100644 index 76e68b03..00000000 --- a/robot/assets/asdc/base_clearwater/ellis.yaml +++ /dev/null @@ -1,242 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Ellis node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - ellis_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - ellis_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (management) -# ellis_mgmt_security_group: -# type: string -# description: ID of security group for Ellis nodes (management) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dn_range_start: - type: string - description: First directory number in pool - default: "6505550000" - constraints: - - allowed_pattern: "[0-9]+" - description: Must be numeric - dn_range_length: - type: string - description: Number of directory numbers to add to pool - default: "1000" - constraints: - - allowed_pattern: "[0-9]+" - description: Must be numeric - dns_ip: - type: string - description: IP address for DNS server - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Ellis node in the Ellis cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: ellis-__index__.__zone__ } } - image: { get_param: ellis_image_name } - flavor: { get_param: ellis_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dn_range_start__: { get_param: dn_range_start } - __dn_range_length__: { get_param: dn_range_length } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-ellis.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. Add xdms_hostname here to use Homer's management - # hostname instead of signaling. This will override shared_config. This works around - # https://github.com/Metaswitch/ellis/issues/153. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=ellis-__index__.__zone__ - etcd_cluster=$etcd_ip - xdms_hostname=homer-0.__zone__:7888 - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install ellis-node --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Wait until etcd is up and running before uploading the shared_config - /usr/share/clearwater/clearwater-etcd/scripts/wait_for_etcd - - # Configure and upload /etc/clearwater/shared_config. - cat > /etc/clearwater/shared_config << EOF - # Deployment definitions - home_domain=__zone__ - sprout_hostname=sprout.__zone__ - hs_hostname=hs.__zone__:8888 - hs_provisioning_hostname=hs-prov.__zone__:8889 - ralf_hostname=ralf.__zone__:10888 - xdms_hostname=homer.__zone__:7888 - sprout_registration_store=sprout.__zone__ - ralf_session_store=ralf.__zone__ - - upstream_port=0 - - # Email server configuration - smtp_smarthost=localhost - smtp_username=username - smtp_password=password - email_recovery_sender=clearwater@example.org - - # Keys - signup_key=secret - turn_workaround=secret - ellis_api_key=secret - ellis_cookie_key=secret - EOF - sudo /usr/share/clearwater/clearwater-config-manager/scripts/upload_shared_config - - # Allocate a pool of numbers to assign to users. Before we do this, - # restart clearwater-infrastructure to make sure that - # local_settings.py runs to pick up the configuration changes. - service clearwater-infrastructure restart - service ellis stop - /usr/share/clearwater/ellis/env/bin/python /usr/share/clearwater/ellis/src/metaswitch/ellis/tools/create_numbers.py --start __dn_range_start__ --count __dn_range_length__ - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add ellis-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add ellis.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_clearwater/homer.yaml b/robot/assets/asdc/base_clearwater/homer.yaml deleted file mode 100644 index cbf9733f..00000000 --- a/robot/assets/asdc/base_clearwater/homer.yaml +++ /dev/null @@ -1,190 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Homer node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - homer_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - homer_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (management) -# homer_mgmt_security_group: -# type: string -# description: ID of security group for Homer nodes (maangement) -# homer_sig_security_group: -# type: string -# description: ID of security group for Homer nodes (signaling) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dns_ip: - type: string - description: IP address for DNS server on management network - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Homer node in the Homer cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: homer-__index__.__zone__ } } - image: { get_param: homer_image_name } - flavor: { get_param: homer_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-homer.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - management_local_ip=$PUBLIC_ADDR - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=homer-__index__.__zone__ - etcd_cluster=$etcd_ip - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install homer-node --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add homer-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add homer.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_clearwater/homestead.yaml b/robot/assets/asdc/base_clearwater/homestead.yaml deleted file mode 100644 index f3519bb7..00000000 --- a/robot/assets/asdc/base_clearwater/homestead.yaml +++ /dev/null @@ -1,190 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Homestead node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - homestead_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - homestead_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (management) -# homestead_mgmt_security_group: -# type: string -# description: ID of security group for Homestead nodes (management) -# homestead_sig_security_group: -# type: string -# description: ID of security group for Homestead nodes (signaling) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dns_ip: - type: string - description: IP address for DNS server on management network - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Homestead node in the Homestead cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: homestead-__index__.__zone__ } } - image: { get_param: homestead_image_name } - flavor: { get_param: homestead_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-homestead.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - management_local_ip=$PUBLIC_ADDR - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=homestead-__index__.__zone__ - etcd_cluster=$etcd_ip - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install homestead-node clearwater-prov-tools --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add homestead-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add hs-prov.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add hs.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_clearwater/ralf.yaml b/robot/assets/asdc/base_clearwater/ralf.yaml deleted file mode 100644 index 301a5619..00000000 --- a/robot/assets/asdc/base_clearwater/ralf.yaml +++ /dev/null @@ -1,205 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Ralf node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - ralf_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - ralf_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (management) -# ralf_sig_security_group: -# type: string -# description: ID of security group for Ralf nodes (signaling) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dns_ip: - type: string - description: IP address for DNS server - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Ralf node in the Ralf cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: ralf-__index__.__zone__ } } - image: { get_param: ralf_image_name } - flavor: { get_param: ralf_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-ralf.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - management_local_ip=$PUBLIC_ADDR - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=ralf-__index__.__zone__ - etcd_cluster=$etcd_ip - EOF - - # Create /etc/chronos/chronos.conf. - mkdir -p /etc/chronos - cat > /etc/chronos/chronos.conf << EOF - [http] - bind-address = $PUBLIC_ADDR - bind-port = 7253 - threads = 50 - - [logging] - folder = /var/log/chronos - level = 2 - - [alarms] - enabled = true - - [exceptions] - max_ttl = 600 - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install ralf-node --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add ralf-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add ralf.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_clearwater/sprout.yaml b/robot/assets/asdc/base_clearwater/sprout.yaml deleted file mode 100644 index 7fb9dd81..00000000 --- a/robot/assets/asdc/base_clearwater/sprout.yaml +++ /dev/null @@ -1,217 +0,0 @@ -# Project Clearwater - IMS in the Cloud -# Copyright (C) 2015 Metaswitch Networks Ltd -# -# This program is free software: you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version, along with the "Special Exception" for use of -# the program along with SSL, set forth below. This program is distributed -# in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more -# details. You should have received a copy of the GNU General Public -# License along with this program. If not, see -# <http://www.gnu.org/licenses/>. -# -# The author can be reached by email at clearwater@metaswitch.com or by -# post at Metaswitch Networks Ltd, 100 Church St, Enfield EN2 6BQ, UK -# -# Special Exception -# Metaswitch Networks Ltd grants you permission to copy, modify, -# propagate, and distribute a work formed by combining OpenSSL with The -# Software, or a work derivative of such a combination, even if such -# copying, modification, propagation, or distribution would otherwise -# violate the terms of the GPL. You must comply with the GPL in all -# respects for all of the code used other than OpenSSL. -# "OpenSSL" means OpenSSL toolkit software distributed by the OpenSSL -# Project and licensed under the OpenSSL Licenses, or a work based on such -# software and licensed under the OpenSSL Licenses. -# "OpenSSL Licenses" means the OpenSSL License and Original SSLeay License -# under which the OpenSSL Project distributes the OpenSSL toolkit software, -# as those licenses appear in the file LICENSE-OPENSSL. - -heat_template_version: 2013-05-23 - -description: > - Clearwater Sprout node - -parameters: - vnf_id: - type: string - label: VNF ID - description: The VNF ID provided by ONAP - vf_module_id: - type: string - label: VNF module ID - description: The VNF module ID provided by ONAP - public_net_id: - type: string - description: ID of public network - constraints: - - custom_constraint: neutron.network - description: Must be a valid network ID - sprout_flavor_name: - type: string - description: Flavor to use - constraints: - - custom_constraint: nova.flavor - description: Must be a valid flavor name - sprout_image_name: - type: string - description: Name of image to use - key_name: - type: string - description: Name of keypair to assign - constraints: - - custom_constraint: nova.keypair - description: Must be a valid keypair name -# base_mgmt_security_group: -# type: string -# description: ID of base security group for all Clearwater nodes (management) -# sprout_sig_security_group: -# type: string -# description: ID of security group for Sprout nodes (signaling) -# sprout_sig2_security_group: -# type: string -# description: ID of additional security group for Sprout nodes (signaling) - repo_url: - type: string - description: URL for Clearwater repository - default: http://repo.cw-ngv.com/stable - zone: - type: string - description: DNS zone - default: example.com - dns_ip: - type: string - description: IP address for DNS server on network - dnssec_key: - type: string - description: DNSSEC private key (Base64-encoded) - constraints: - - allowed_pattern: "[0-9A-Za-z+/=]+" - description: Must be Base64-encoded - etcd_ip: - type: string - description: IP address of an existing member of the etcd cluster - default: "" - index: - type: number - description: Index of this Sprout node in the Sprout cluster - default: 0 - -resources: - server: - type: OS::Nova::Server - properties: - name: { str_replace: { params: { __index__: { get_param: index }, __zone__: { get_param: zone } }, template: sprout-__index__.__zone__ } } - image: { get_param: sprout_image_name } - flavor: { get_param: sprout_flavor_name } - key_name: { get_param: key_name } - networks: - - network: { get_param: public_net_id } - metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} - user_data_format: RAW - user_data: - str_replace: - params: - __repo_url__: { get_param: repo_url } - __zone__: { get_param: zone } - __dns_ip__: { get_param: dns_ip } - __dnssec_key__: { get_param: dnssec_key } - __etcd_ip__ : { get_param: etcd_ip } - __index__ : { get_param: index } - template: | - #!/bin/bash - - # Log all output to file. - exec > >(tee -a /var/log/clearwater-heat-sprout.log) 2>&1 - set -x - - # Configure the APT software source. - echo 'deb __repo_url__ binary/' > /etc/apt/sources.list.d/clearwater.list - curl -L http://repo.cw-ngv.com/repo_key | apt-key add - - apt-get update - - # Get the public IP address from eth0 - sudo apt-get install ipcalc - ADDR=`ip addr show eth0 | awk '/inet /{print $2}'` - PUBLIC_ADDR=`ipcalc -n -b $ADDR | awk '/Address:/{print $2}'` - - # Configure /etc/clearwater/local_config. - mkdir -p /etc/clearwater - etcd_ip=__etcd_ip__ - [ -n "$etcd_ip" ] || etcd_ip=$PUBLIC_ADDR - cat > /etc/clearwater/local_config << EOF - management_local_ip=$PUBLIC_ADDR - local_ip=$PUBLIC_ADDR - public_ip=$PUBLIC_ADDR - public_hostname=__index__.sprout.__zone__ - etcd_cluster=$etcd_ip - EOF - - # Create /etc/chronos/chronos.conf. - mkdir -p /etc/chronos - cat > /etc/chronos/chronos.conf << EOF - [http] - bind-address = $PUBLIC_ADDR - bind-port = 7253 - threads = 50 - - [logging] - folder = /var/log/chronos - level = 2 - - [alarms] - enabled = true - - [exceptions] - max_ttl = 600 - EOF - - # Now install the software. - DEBIAN_FRONTEND=noninteractive apt-get install sprout-node --yes --force-yes - DEBIAN_FRONTEND=noninteractive apt-get install clearwater-management --yes --force-yes - - # Function to give DNS record type and IP address for specified IP address - ip2rr() { - if echo $1 | grep -q -e '[^0-9.]' ; then - echo AAAA $1 - else - echo A $1 - fi - } - - # Update DNS - retries=0 - while ! { nsupdate -y "__zone__:__dnssec_key__" -v << EOF - server __dns_ip__ - update add sprout-__index__.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add __index__.sprout.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add sprout.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add scscf.sprout.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add icscf.sprout.__zone__. 30 $(ip2rr $PUBLIC_ADDR) - update add sprout.__zone__. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.sprout.__zone__. - update add _sip._tcp.sprout.__zone__. 30 SRV 0 0 5054 __index__.sprout.__zone__. - update add icscf.sprout.__zone__. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.icscf.sprout.__zone__. - update add _sip._tcp.icscf.sprout.__zone__. 30 SRV 0 0 5052 __index__.sprout.__zone__. - update add scscf.sprout.__zone__. 30 NAPTR 0 0 "s" "SIP+D2T" "" _sip._tcp.scscf.sprout.__zone__. - update add _sip._tcp.scscf.sprout.__zone__. 30 SRV 0 0 5054 __index__.sprout.__zone__. - send - EOF - } && [ $retries -lt 10 ] - do - retries=$((retries + 1)) - echo 'nsupdate failed - retrying (retry '$retries')...' - sleep 5 - done - - # Use the DNS server. - echo 'nameserver __dns_ip__' > /etc/dnsmasq.resolv.conf - echo 'RESOLV_CONF=/etc/dnsmasq.resolv.conf' >> /etc/default/dnsmasq - service dnsmasq force-reload - -outputs: - public_ip: - description: IP address in public network - value: { get_attr: [ server, accessIPv4 ] } diff --git a/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.env b/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.env index 689d1cf0..1d820705 100644 --- a/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.env +++ b/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.env @@ -1,17 +1,19 @@ parameters: - vcpe_image_name: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM) - vcpe_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 + vcpe_image_name: PUT THE IMAGE NAME HERE (Ubuntu 1604 SUGGESTED) + vcpe_flavor_name: PUT THE FLAVOR NAME HERE (MEDIUM FLAVOR SUGGESTED) + public_net_id: PUT THE PUBLIC NETWORK ID HERE cpe_signal_net_id: zdfw1cpe01_private + cpe_signal_subnet_id: zdfw1cpe01_sub_private cpe_public_net_id: zdfw1cpe01_public + cpe_public_subnet_id: zdfw1cpe01_sub_public onap_private_net_id: PUT THE ONAP PRIVATE NETWORK NAME HERE - onap_private_subnet_id: PUT THE ONAP PRIVATE NETWORK NAME HERE + onap_private_subnet_id: PUT THE ONAP PRIVATE SUBNETWORK NAME HERE onap_private_net_cidr: 10.0.0.0/16 cpe_signal_net_cidr: 10.4.0.0/24 cpe_public_net_cidr: 10.2.0.0/24 vdhcp_private_ip_0: 10.4.0.1 vdhcp_private_ip_1: 10.0.101.1 - vaaa_private_ip_0: 10.4.0.2 + vaaa_private_ip_0: 10.4.0.4 vaaa_private_ip_1: 10.0.101.2 vdns_private_ip_0: 10.2.0.1 vdns_private_ip_1: 10.0.101.3 @@ -32,4 +34,4 @@ parameters: install_script_version: 1.1.0-SNAPSHOT key_name: vaaa_key pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN - cloud_env: rackspace + cloud_env: PUT THE CLOUD PROVIDED HERE (openstack or rackspace) diff --git a/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.yaml b/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.yaml index c0a18756..c6349581 100644 --- a/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.yaml +++ b/robot/assets/asdc/base_vcpe_infra/base_vcpe_infra.yaml @@ -24,7 +24,7 @@ heat_template_version: 2013-05-23 -description: Heat template to deploy vCPE Infrastructue emlements (vAAA, vDHCP, vDNS_DHCP, webServer_sink) for ONAP +description: Heat template to deploy vCPE Infrastructue emlements (vAAA, vDHCP, vDNS_DHCP, webServer) ############## # # @@ -61,6 +61,10 @@ parameters: type: string label: vAAA private network name or ID description: Private network that connects vAAA with vDNSs + cpe_signal_subnet_id: + type: string + label: CPE Signal subnet + description: CPE Signal subnet cpe_signal_net_cidr: type: string label: vAAA private network CIDR @@ -69,6 +73,10 @@ parameters: type: string label: vCPE Public network (emulates internet) name or ID description: Private network that connects vGW to emulated internet + cpe_public_subnet_id: + type: string + label: CPE Public subnet + description: CPE Public subnet cpe_public_net_cidr: type: string label: vCPE public network CIDR @@ -195,37 +203,13 @@ resources: public_key: { get_param: pub_key } save_private_key: false - cpe_signal_network: - type: OS::Neutron::Net - properties: - name: { get_param: cpe_signal_net_id } - - cpe_signal_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: cpe_signal_net_id } - network_id: { get_resource: cpe_signal_network } - cidr: { get_param: cpe_signal_net_cidr } - - cpe_public_network: - type: OS::Neutron::Net - properties: - name: { get_param: cpe_public_net_id } - - cpe_public_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: cpe_public_net_id } - network_id: { get_resource: cpe_public_network } - cidr: { get_param: cpe_public_net_cidr } - # Virtual AAA server Instantiation vaaa_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: cpe_signal_network } - fixed_ips: [{"subnet": { get_resource: cpe_signal_subnet }, "ip_address": { get_param: vaaa_private_ip_0 }}] + network: { get_param: cpe_signal_net_id } + fixed_ips: [{"subnet": { get_param: cpe_signal_subnet_id }, "ip_address": { get_param: vaaa_private_ip_0 }}] vaaa_private_1_port: type: OS::Neutron::Port @@ -288,8 +272,8 @@ resources: vdns_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: cpe_public_network } - fixed_ips: [{"subnet": { get_resource: cpe_public_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}] + network: { get_param: cpe_public_net_id } + fixed_ips: [{"subnet": { get_param: cpe_public_subnet_id }, "ip_address": { get_param: vdns_private_ip_0 }}] vdns_private_1_port: type: OS::Neutron::Port @@ -348,8 +332,8 @@ resources: vdhcp_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: cpe_signal_network } - fixed_ips: [{"subnet": { get_resource: cpe_signal_subnet }, "ip_address": { get_param: vdhcp_private_ip_0 }}] + network: { get_param: cpe_signal_net_id } + fixed_ips: [{"subnet": { get_param: cpe_signal_subnet_id }, "ip_address": { get_param: vdhcp_private_ip_0 }}] vdhcp_private_1_port: type: OS::Neutron::Port @@ -409,8 +393,8 @@ resources: vweb_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: cpe_public_network } - fixed_ips: [{"subnet": { get_resource: cpe_public_subnet }, "ip_address": { get_param: vweb_private_ip_0 }}] + network: { get_param: cpe_public_net_id } + fixed_ips: [{"subnet": { get_param: cpe_public_subnet_id }, "ip_address": { get_param: vweb_private_ip_0 }}] vweb_private_1_port: type: OS::Neutron::Port diff --git a/robot/assets/asdc/base_vcpe_vbng/MANIFEST.json b/robot/assets/asdc/base_vcpe_vbng/MANIFEST.json index f4fbb305..0b34111e 100644 --- a/robot/assets/asdc/base_vcpe_vbng/MANIFEST.json +++ b/robot/assets/asdc/base_vcpe_vbng/MANIFEST.json @@ -3,12 +3,12 @@ "description": "", "data": [ { - "file": "base_vcpe_vbng_rackspace.yaml", + "file": "base_vcpe_vbng.yaml", "type": "HEAT", "isBase": "true", "data": [ { - "file": "base_vcpe_vbng_rackspace.env", + "file": "base_vcpe_vbng.env", "type": "HEAT_ENV" } ] diff --git a/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng_rackspace.env b/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng.env index e363b3d7..be4f9728 100644 --- a/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng_rackspace.env +++ b/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng.env @@ -1,13 +1,16 @@ parameters: - vcpe_image_name: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM) - vcpe_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 + vcpe_image_name: PUT THE IMAGE NAME HERE (Ubuntu 1604 SUGGESTED) + vcpe_flavor_name: PUT THE FLAVOR NAME HERE (MEDIUM FLAVOR SUGGESTED) + public_net_id: PUT THE PUBLIC NETWORK ID HERE brgemu_bng_private_net_id: zdfw1bngin01_private + brgemu_bng_private_subnet_id: zdfw1bngin01_sub_private bng_gmux_private_net_id: zdfw1bngmux01_private - onap_private_net_id: <PUT_YOUR_ONAP_NET_ID_HERE> - onap_private_subnet_id: <PUT_YOUR_ONAP_NET_ID_HERE> + bng_gmux_private_subnet_id: zdfw1bngmux01_sub_private + onap_private_net_id: PUT THE ONAP PRIVATE NETWORK NAME HERE + onap_private_subnet_id: PUT THE ONAP PRIVATE SUBNETWORK NAME HERE onap_private_net_cidr: 10.0.0.0/16 cpe_signal_net_id: zdfw1cpe01_private + cpe_signal_subnet_id: zdfw1cpe01_sub_private brgemu_bng_private_net_cidr: 10.3.0.0/24 bng_gmux_private_net_cidr: 10.1.0.0/24 cpe_signal_private_net_cidr: 10.4.0.0/24 @@ -26,4 +29,7 @@ install_script_version: 1.1.0-SNAPSHOT key_name: vbng_key pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN - cloud_env: rackspace + cloud_env: PUT THE CLOUD PROVIDED HERE (openstack or rackspace) + vpp_source_repo_url: https://gerrit.fd.io/r/vpp + vpp_source_repo_branch: stable/1704 + vpp_patch_url: https://git.onap.org/demo/plain/vnfs/vCPE/vpp-radius-client-for-vbng/src/patches/Vpp-Integrate-FreeRADIUS-Client-for-vBNG.patch diff --git a/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng_rackspace.yaml b/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng.yaml index d5c0eed8..9cc44840 100644 --- a/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng_rackspace.yaml +++ b/robot/assets/asdc/base_vcpe_vbng/base_vcpe_vbng.yaml @@ -24,7 +24,7 @@ heat_template_version: 2013-05-23 -description: Heat template to deploy vCPE virtual Broadband Network Gateway (vBNG) for ONAP +description: Heat template to deploy vCPE virtual Broadband Network Gateway (vBNG) ############## # # @@ -49,6 +49,10 @@ parameters: type: string label: vBNG IN private network name or ID description: Private network that connects vBRG to vBNG + brgemu_bng_private_subnet_id: + type: string + label: vBNG IN private sub-network name or ID + description: vBNG IN private sub-network name or ID brgemu_bng_private_net_cidr: type: string label: vBNG IN private network CIDR @@ -57,6 +61,10 @@ parameters: type: string label: vBNG vGMUX private network name or ID description: Private network that connects vBNG to vGMUX + bng_gmux_private_subnet_id: + type: string + label: vBNG vGMUX private sub-network name or ID + description: vBNG vGMUX private sub-network name or ID bng_gmux_private_net_cidr: type: string label: vGMUX private network CIDR @@ -77,6 +85,10 @@ parameters: type: string label: vCPE private network name or ID description: Private network that connects vCPE elements with vCPE infrastructure elements + cpe_signal_subnet_id: + type: string + label: vCPE private sub-network name or ID + description: vCPE private sub-network name or ID cpe_signal_private_net_cidr: type: string label: vAAA private network CIDR @@ -145,6 +157,18 @@ parameters: type: string label: Cloud environment description: Cloud environment (e.g., openstack, rackspace) + vpp_source_repo_url: + type: string + label: VPP Source Git Repo + description: URL for VPP source codes + vpp_source_repo_branch: + type: string + label: VPP Source Git Branch + description: Git Branch for the VPP source codes + vpp_patch_url: + type: string + label: VPP Patch URL + description: URL for VPP patch for vBNG ############# # # @@ -171,24 +195,13 @@ resources: public_key: { get_param: pub_key } save_private_key: false - brgemu_bng_private_network: - type: OS::Neutron::Net - properties: - name: { get_param: brgemu_bng_private_net_id } - - brgemu_bng_private_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: brgemu_bng_private_net_id } - network_id: { get_resource: brgemu_bng_private_network } - cidr: { get_param: brgemu_bng_private_net_cidr } # Virtual BNG Instantiation vbng_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: brgemu_bng_private_network } - fixed_ips: [{"subnet": { get_resource: brgemu_bng_private_subnet }, "ip_address": { get_param: vbng_private_ip_0 }}] + network: { get_param: brgemu_bng_private_net_id } + fixed_ips: [{"subnet": { get_param: brgemu_bng_private_subnet_id }, "ip_address": { get_param: vbng_private_ip_0 }}] vbng_private_1_port: type: OS::Neutron::Port @@ -200,13 +213,13 @@ resources: type: OS::Neutron::Port properties: network: { get_param: cpe_signal_net_id } - fixed_ips: [{"subnet": { get_param: cpe_signal_net_id }, "ip_address": { get_param: vbng_private_ip_2 }}] + fixed_ips: [{"subnet": { get_param: cpe_signal_subnet_id }, "ip_address": { get_param: vbng_private_ip_2 }}] vbng_private_3_port: type: OS::Neutron::Port properties: network: { get_param: bng_gmux_private_net_id } - fixed_ips: [{"subnet": { get_param: bng_gmux_private_net_id }, "ip_address": { get_param: vbng_private_ip_3 }}] + fixed_ips: [{"subnet": { get_param: bng_gmux_private_subnet_id }, "ip_address": { get_param: vbng_private_ip_3 }}] vbng_0: type: OS::Nova::Server @@ -240,6 +253,9 @@ resources: __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } __cloud_env__ : { get_param: cloud_env } + __vpp_source_repo_url__ : { get_param: vpp_source_repo_url } + __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch } + __vpp_patch_url__ : { get_param: vpp_patch_url } template: | #!/bin/bash @@ -260,6 +276,9 @@ resources: echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt + echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt + echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt # Download and run install script curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_bng_install.sh -o /opt/v_bng_install.sh diff --git a/robot/assets/asdc/base_vcpe_vbrgemu/MANIFEST.json b/robot/assets/asdc/base_vcpe_vbrgemu/MANIFEST.json index 0edc4b9d..603f92d9 100644 --- a/robot/assets/asdc/base_vcpe_vbrgemu/MANIFEST.json +++ b/robot/assets/asdc/base_vcpe_vbrgemu/MANIFEST.json @@ -3,12 +3,12 @@ "description": "", "data": [ { - "file": "base_vcpe_vbrgemu_rackspace.yaml", + "file": "base_vcpe_vbrgemu.yaml", "type": "HEAT", "isBase": "true", "data": [ { - "file": "base_vcpe_vbrgemu_rackspace.env", + "file": "base_vcpe_vbrgemu.env", "type": "HEAT_ENV" } ] diff --git a/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu_rackspace.env b/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu.env index 1951c5e4..ea8bc823 100644 --- a/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu_rackspace.env +++ b/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu.env @@ -1,13 +1,15 @@ parameters: - vcpe_image_name: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM) - vcpe_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 + vcpe_image_name: PUT THE IMAGE NAME HERE (Ubuntu 1604 SUGGESTED) + vcpe_flavor_name: PUT THE FLAVOR NAME HERE (MEDIUM FLAVOR SUGGESTED) + public_net_id: PUT THE PUBLIC NETWORK ID HERE vbrgemu_bng_private_net_id: zdfw1bngin01_private - vbrgemu_private_net_id: zdfw1vbrgemu01_private + vbrgemu_bng_private_subnet_id: zdfw1bngin01_sub_private vbrgemu_bng_private_net_cidr: 10.3.0.0/24 + vbrgemu_private_net_id: zdfw1vbrgemu01_private vbrgemu_private_net_cidr: 192.168.1.0/24 - vbrgemu_private_ip_0: 10.3.0.2 + vbrgemu_private_ip_0: 10.3.0.4 vbrgemu_private_ip_1: 192.168.1.1 + sdnc_ip: 10.0.7.1 vbrgemu_name_0: zdcpe1cpe01brgemu01 vnf_id: vCPE_Infrastructure_BGREMU_demo_app vf_module_id: vCPE_Customer_BRGEMU @@ -17,4 +19,9 @@ install_script_version: 1.1.0-SNAPSHOT key_name: vbrgemu_key pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN - cloud_env: rackspace + cloud_env: PUT THE CLOUD PROVIDED HERE (openstack or rackspace) + vpp_source_repo_url: https://gerrit.fd.io/r/vpp + vpp_source_repo_branch: stable/1704 + hc2vpp_source_repo_url: https://gerrit.fd.io/r/hc2vpp + hc2vpp_source_repo_branch: stable/1704 + vpp_patch_url: https://git.onap.org/demo/plain/vnfs/vCPE/vpp-option-82-for-vbrg/src/patches/VPP-Add-Option82-Nat-Filter-For-vBRG.patch diff --git a/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu_rackspace.yaml b/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu.yaml index 6f926eb5..a9eb8726 100644 --- a/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu_rackspace.yaml +++ b/robot/assets/asdc/base_vcpe_vbrgemu/base_vcpe_vbrgemu.yaml @@ -24,7 +24,7 @@ heat_template_version: 2013-05-23 -description: Heat template to deploy vCPE vBRG Emulator (vBRGEMU) for ONAP +description: Heat template to deploy vCPE vBRG Emulator (vBRGEMU) ####################################################################### # # @@ -51,6 +51,10 @@ parameters: type: string label: vBNG private network name or ID description: Private network that connects vBRGEMU to vBNG + vbrgemu_bng_private_subnet_id: + type: string + label: vBNG private sub-network name or ID + description: vBNG private sub-network name or ID vbrgemu_bng_private_net_cidr: type: string label: vBNG IN private network CIDR @@ -111,6 +115,30 @@ parameters: type: string label: Cloud environment description: Cloud environment (e.g., openstack, rackspace) + vpp_source_repo_url: + type: string + label: VPP Source Git Repo + description: URL for VPP source codes + vpp_source_repo_branch: + type: string + label: VPP Source Git Branch + description: Git Branch for the VPP source codes + hc2vpp_source_repo_url: + type: string + label: Honeycomb Source Git Repo + description: URL for Honeycomb source codes + hc2vpp_source_repo_branch: + type: string + label: Honeycomb Source Git Branch + description: Git Branch for the Honeycomb source codes + vpp_patch_url: + type: string + label: VPP Patch URL + description: URL for VPP patch for vBRG Emulator + sdnc_ip: + type: string + label: SDNC ip address + description: SDNC ip address uesd to set NAT ############# # # @@ -155,7 +183,7 @@ resources: type: OS::Neutron::Port properties: network: { get_param: vbrgemu_bng_private_net_id } - fixed_ips: [{"subnet": { get_param: vbrgemu_bng_private_net_id }, "ip_address": { get_param: vbrgemu_private_ip_0 }}] + fixed_ips: [{"subnet": { get_param: vbrgemu_bng_private_subnet_id }, "ip_address": { get_param: vbrgemu_private_ip_0 }}] vbrgemu_private_1_port: type: OS::Neutron::Port @@ -187,6 +215,12 @@ resources: __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } __cloud_env__ : { get_param: cloud_env } + __vpp_source_repo_url__ : { get_param: vpp_source_repo_url } + __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch } + __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url } + __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch } + __vpp_patch_url__ : { get_param: vpp_patch_url } + __sdnc_ip__ : { get_param: sdnc_ip } template: | #!/bin/bash @@ -200,6 +234,12 @@ resources: echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt + echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt + echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt + echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt + echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt + echo "__sdnc_ip__" > /opt/config/sdnc_ip.txt # Download and run install script curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_brgemu_install.sh -o /opt/v_brgemu_install.sh diff --git a/robot/assets/asdc/base_vcpe_vgmux/MANIFEST.json b/robot/assets/asdc/base_vcpe_vgmux/MANIFEST.json index 35603f9a..62d1ef97 100644 --- a/robot/assets/asdc/base_vcpe_vgmux/MANIFEST.json +++ b/robot/assets/asdc/base_vcpe_vgmux/MANIFEST.json @@ -3,12 +3,12 @@ "description": "", "data": [ { - "file": "base_vcpe_vgmux_rackspace.yaml", + "file": "base_vcpe_vgmux.yaml", "type": "HEAT", "isBase": "true", "data": [ { - "file": "base_vcpe_vgmux_rackspace.env", + "file": "base_vcpe_vgmux.env", "type": "HEAT_ENV" } ] diff --git a/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux_rackspace.env b/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux.env index c6b20f9c..e81afa70 100644 --- a/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux_rackspace.env +++ b/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux.env @@ -1,11 +1,13 @@ parameters: - vcpe_image_name: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM) - vcpe_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 + vcpe_image_name: PUT THE IMAGE NAME HERE (Ubuntu 1604 SUGGESTED) + vcpe_flavor_name: PUT THE FLAVOR NAME HERE (MEDIUM FLAVOR SUGGESTED) + public_net_id: PUT THE PUBLIC NETWORK ID HERE bng_gmux_private_net_id: zdfw1bngmux01_private + bng_gmux_private_subnet_id: zdfw1bngmux01_sub_private mux_gw_private_net_id: zdfw1muxgw01_private - onap_private_net_id: <PUT_YOUR_ONAP_NET_ID_HERE> - onap_private_subnet_id: <PUT_YOUR_ONAP_NET_ID_HERE> + mux_gw_private_subnet_id: zdfw1muxgw01_sub_private + onap_private_net_id: PUT THE ONAP PRIVATE NETWORK NAME HERE + onap_private_subnet_id: PUT THE ONAP PRIVATE SUBNETWORK NAME HERE onap_private_net_cidr: 10.0.0.0/16 bng_gmux_private_net_cidr: 10.1.0.0/24 mux_gw_private_net_cidr: 10.5.0.0/24 @@ -21,6 +23,13 @@ repo_url_artifacts: https://nexus.onap.org/content/groups/staging demo_artifacts_version: 1.1.0 install_script_version: 1.1.0-SNAPSHOT - key_name: vbng_key + key_name: vgmux_key pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN - cloud_env: rackspace + cloud_env: PUT THE CLOUD PROVIDED HERE (openstack or rackspace) + vpp_source_repo_url: https://gerrit.fd.io/r/vpp + vpp_source_repo_branch: stable/1704 + hc2vpp_source_repo_url: https://gerrit.fd.io/r/hc2vpp + hc2vpp_source_repo_branch: stable/1704 + vpp_patch_url: https://git.onap.org/demo/plain/vnfs/vCPE/vpp-ves-agent-for-vgmux/src/patches/Vpp-Add-VES-agent-for-vG-MUX.patch + hc2vpp_patch_url: https://git.onap.org/demo/plain/vnfs/vCPE/vpp-ves-agent-for-vgmux/src/patches/Hc2vpp-Add-VES-agent-for-vG-MUX.patch + libevel_patch_url: https://git.onap.org/demo/plain/vnfs/vCPE/vpp-ves-agent-for-vgmux/src/patches/vCPE-vG-MUX-libevel-fixup.patch diff --git a/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux_rackspace.yaml b/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux.yaml index b6e212a1..ecdb1b1b 100644 --- a/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux_rackspace.yaml +++ b/robot/assets/asdc/base_vcpe_vgmux/base_vcpe_vgmux.yaml @@ -24,7 +24,7 @@ heat_template_version: 2013-05-23 -description: Heat template to deploy vCPE Infrastructue Metro vGMUX for ONAP +description: Heat template to deploy vCPE Infrastructue Metro vGMUX ############## # # @@ -49,14 +49,22 @@ parameters: type: string label: vBNG vGMUX private network name or ID description: Private network that connects vBNG to vGMUX + bng_gmux_private_subnet_id: + type: string + label: vBNG vGMUX private sub-network name or ID + description: vBNG vGMUX private sub-network name or ID bng_gmux_private_net_cidr: type: string label: vBNG vGMUX private network CIDR description: The CIDR of the vBNG-vGMUX private network mux_gw_private_net_id: type: string - label: vCPE Public network name or ID + label: vGMUX vGWs network name or ID description: Private network that connects vGMUX to vGWs + mux_gw_private_subnet_id: + type: string + label: vGMUX vGWs sub-network name or ID + description: vGMUX vGWs sub-network name or ID mux_gw_private_net_cidr: type: string label: vGMUX private network CIDR @@ -133,6 +141,34 @@ parameters: type: string label: Cloud environment description: Cloud environment (e.g., openstack, rackspace) + vpp_source_repo_url: + type: string + label: VPP Source Git Repo + description: URL for VPP source codes + vpp_source_repo_branch: + type: string + label: VPP Source Git Branch + description: Git Branch for the VPP source codes + hc2vpp_source_repo_url: + type: string + label: Honeycomb Source Git Repo + description: URL for Honeycomb source codes + hc2vpp_source_repo_branch: + type: string + label: Honeycomb Source Git Branch + description: Git Branch for the Honeycomb source codes + vpp_patch_url: + type: string + label: VPP Patch URL + description: URL for VPP patch for vG-MUX + hc2vpp_patch_url: + type: string + label: Honeycomb Patch URL + description: URL for Honeycomb patch for vG-MUX + libevel_patch_url: + type: string + label: libevel Patch URL + description: URL for libevel patch for vG-MUX ############# # # @@ -159,36 +195,13 @@ resources: public_key: { get_param: pub_key } save_private_key: false - mux_gw_private_network: - type: OS::Neutron::Net - properties: - name: { get_param: mux_gw_private_net_id } - - mux_gw_private_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: mux_gw_private_net_id } - network_id: { get_resource: mux_gw_private_network } - cidr: { get_param: mux_gw_private_net_cidr } - - bng_gmux_private_network: - type: OS::Neutron::Net - properties: - name: { get_param: bng_gmux_private_net_id } - - bng_gmux_private_subnet: - type: OS::Neutron::Subnet - properties: - name: { get_param: bng_gmux_private_net_id } - network_id: { get_resource: bng_gmux_private_network } - cidr: { get_param: bng_gmux_private_net_cidr } # Virtual GMUX Instantiation vgmux_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: bng_gmux_private_network } - fixed_ips: [{"subnet": { get_resource: bng_gmux_private_subnet }, "ip_address": { get_param: vgmux_private_ip_0 }}] + network: { get_param: bng_gmux_private_net_id } + fixed_ips: [{"subnet": { get_param: bng_gmux_private_subnet_id }, "ip_address": { get_param: vgmux_private_ip_0 }}] vgmux_private_1_port: type: OS::Neutron::Port @@ -199,8 +212,8 @@ resources: vgmux_private_2_port: type: OS::Neutron::Port properties: - network: { get_resource: mux_gw_private_network } - fixed_ips: [{"subnet": { get_resource: mux_gw_private_subnet }, "ip_address": { get_param: vgmux_private_ip_2 }}] + network: { get_param: mux_gw_private_net_id } + fixed_ips: [{"subnet": { get_param: mux_gw_private_subnet_id }, "ip_address": { get_param: vgmux_private_ip_2 }}] vgmux_0: type: OS::Nova::Server @@ -230,6 +243,13 @@ resources: __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } __cloud_env__ : { get_param: cloud_env } + __vpp_source_repo_url__ : { get_param: vpp_source_repo_url } + __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch } + __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url } + __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch } + __vpp_patch_url__ : { get_param: vpp_patch_url } + __hc2vpp_patch_url__ : { get_param: hc2vpp_patch_url } + __libevel_patch_url__ : { get_param: libevel_patch_url } template: | #!/bin/bash @@ -246,10 +266,16 @@ resources: echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt + echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt + echo "__vpp_patch_url__" > /opt/config/vpp_patch_url.txt + echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt + echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt + echo "__hc2vpp_patch_url__" > /opt/config/hc2vpp_patch_url.txt + echo "__libevel_patch_url__" > /opt/config/libevel_patch_url.txt # Download and run install script curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_gmux_install.sh -o /opt/v_gmux_install.sh cd /opt chmod +x v_gmux_install.sh ./v_gmux_install.sh - diff --git a/robot/assets/asdc/base_vcpe_vgw/MANIFEST.json b/robot/assets/asdc/base_vcpe_vgw/MANIFEST.json index edaface7..f99303e4 100644 --- a/robot/assets/asdc/base_vcpe_vgw/MANIFEST.json +++ b/robot/assets/asdc/base_vcpe_vgw/MANIFEST.json @@ -3,12 +3,12 @@ "description": "", "data": [ { - "file": "base_vcpe_vgw_rackspace.yaml", + "file": "base_vcpe_vgw.yaml", "type": "HEAT", "isBase": "true", "data": [ { - "file": "base_vcpe_vgw_rackspace.env", + "file": "base_vcpe_vgw.env", "type": "HEAT_ENV" } ] diff --git a/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw_rackspace.env b/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw.env index 93096f2d..f1cadb83 100644 --- a/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw_rackspace.env +++ b/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw.env @@ -1,17 +1,19 @@ parameters: - vcpe_image_name: Ubuntu 16.04 LTS (Xenial Xerus) (PVHVM) - vcpe_flavor_name: 4 GB General Purpose v1 - public_net_id: 00000000-0000-0000-0000-000000000000 + vcpe_image_name: PUT THE IMAGE NAME HERE (Ubuntu 1604 SUGGESTED) + vcpe_flavor_name: PUT THE FLAVOR NAME HERE (MEDIUM FLAVOR SUGGESTED) + public_net_id: PUT THE PUBLIC NETWORK ID HERE mux_gw_private_net_id: zdfw1muxgw01_private + mux_gw_private_subnet_id: zdfw1muxgw01_sub_private mux_gw_private_net_cidr: 10.5.0.0/24 cpe_public_net_id: zdfw1cpe01_public + cpe_public_subnet_id: zdfw1cpe01_sub_public cpe_public_net_cidr: 10.2.0.0/24 - onap_private_net_id: <PUT_YOUR_ONAP_NET_ID_HERE> - onap_private_subnet_id: <PUT_YOUR_ONAP_NET_ID_HERE> + onap_private_net_id: PUT THE ONAP PRIVATE NETWORK NAME HERE + onap_private_subnet_id: PUT THE ONAP PRIVATE SUBNETWORK NAME HERE onap_private_net_cidr: 10.0.0.0/16 vgw_private_ip_0: 10.5.0.21 vgw_private_ip_1: 10.0.101.30 - vgw_private_ip_2: 10.2.0.2 + vgw_private_ip_2: 10.2.0.3 vgw_name_0: zdcpe1cpe01gw01 vnf_id: vCPE_Infrastructure_GW_demo_app vf_module_id: vCPE_Customer_GW @@ -23,4 +25,8 @@ install_script_version: 1.1.0-SNAPSHOT key_name: vgw_key pub_key: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQXYJYYi3/OUZXUiCYWdtc7K0m5C0dJKVxPG0eI8EWZrEHYdfYe6WoTSDJCww+1qlBSpA5ac/Ba4Wn9vh+lR1vtUKkyIC/nrYb90ReUd385Glkgzrfh5HdR5y5S2cL/Frh86lAn9r6b3iWTJD8wBwXFyoe1S2nMTOIuG4RPNvfmyCTYVh8XTCCE8HPvh3xv2r4egawG1P4Q4UDwk+hDBXThY2KS8M5/8EMyxHV0ImpLbpYCTBA6KYDIRtqmgS6iKyy8v2D1aSY5mc9J0T5t9S2Gv+VZQNWQDDKNFnxqYaAo1uEoq/i1q63XC5AD3ckXb2VT6dp23BQMdDfbHyUWfJN - cloud_env: rackspace + cloud_env: PUT THE CLOUD PROVIDED HERE (openstack or rackspace) + vpp_source_repo_url: https://gerrit.fd.io/r/vpp + vpp_source_repo_branch: stable/1704 + hc2vpp_source_repo_url: https://gerrit.fd.io/r/hc2vpp + hc2vpp_source_repo_branch: stable/1704 diff --git a/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw_rackspace.yaml b/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw.yaml index 0621556a..173ba6dd 100644 --- a/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw_rackspace.yaml +++ b/robot/assets/asdc/base_vcpe_vgw/base_vcpe_vgw.yaml @@ -24,7 +24,7 @@ heat_template_version: 2013-05-23 -description: Heat template to deploy vCPE vGateway (vG) for ONAP +description: Heat template to deploy vCPE vGateway (vG) ############## # # @@ -49,6 +49,10 @@ parameters: type: string label: vGMUX private network name or ID description: Private network that connects vGMUX to vGWs + mux_gw_private_subnet_id: + type: string + label: vGMUX private sub-network name or ID + description: vGMUX private sub-network name or ID mux_gw_private_net_cidr: type: string label: vGMUX private network CIDR @@ -69,6 +73,10 @@ parameters: type: string label: vCPE network that emulates internetmanagement name or ID description: Private network that connects vGW to emulated internet + cpe_public_subnet_id: + type: string + label: vCPE Public subnet + description: vCPE Public subnet cpe_public_net_cidr: type: string label: vCPE public network CIDR @@ -133,6 +141,22 @@ parameters: type: string label: Cloud environment description: Cloud environment (e.g., openstack, rackspace) + vpp_source_repo_url: + type: string + label: VPP Source Git Repo + description: URL for VPP source codes + vpp_source_repo_branch: + type: string + label: VPP Source Git Branch + description: Git Branch for the VPP source codes + hc2vpp_source_repo_url: + type: string + label: Honeycomb Source Git Repo + description: URL for Honeycomb source codes + hc2vpp_source_repo_branch: + type: string + label: Honeycomb Source Git Branch + description: Git Branch for the Honeycomb source codes ############# # # @@ -160,13 +184,11 @@ resources: save_private_key: false # Virtual GW Instantiation - # mux_gw_private_net created by mux heat template - # cpe_public_net created by infra heat template (vDNS) vgw_private_0_port: type: OS::Neutron::Port properties: network: { get_param: mux_gw_private_net_id } - fixed_ips: [{"subnet": { get_param: mux_gw_private_net_id }, "ip_address": { get_param: vgw_private_ip_0 }}] + fixed_ips: [{"subnet": { get_param: mux_gw_private_subnet_id }, "ip_address": { get_param: vgw_private_ip_0 }}] vgw_private_1_port: type: OS::Neutron::Port @@ -178,7 +200,7 @@ resources: type: OS::Neutron::Port properties: network: { get_param: cpe_public_net_id} - fixed_ips: [{"subnet": { get_param: cpe_public_net_id }, "ip_address": { get_param: vgw_private_ip_2 }}] + fixed_ips: [{"subnet": { get_param: cpe_public_subnet_id }, "ip_address": { get_param: vgw_private_ip_2 }}] vgw_0: type: OS::Nova::Server @@ -207,6 +229,10 @@ resources: __demo_artifacts_version__ : { get_param: demo_artifacts_version } __install_script_version__ : { get_param: install_script_version } __cloud_env__ : { get_param: cloud_env } + __vpp_source_repo_url__ : { get_param: vpp_source_repo_url } + __vpp_source_repo_branch__ : { get_param: vpp_source_repo_branch } + __hc2vpp_source_repo_url__ : { get_param: hc2vpp_source_repo_url } + __hc2vpp_source_repo_branch__ : { get_param: hc2vpp_source_repo_branch } template: | #!/bin/bash @@ -222,6 +248,10 @@ resources: echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt echo "__install_script_version__" > /opt/config/install_script_version.txt echo "__cloud_env__" > /opt/config/cloud_env.txt + echo "__vpp_source_repo_url__" > /opt/config/vpp_source_repo_url.txt + echo "__vpp_source_repo_branch__" > /opt/config/vpp_source_repo_branch.txt + echo "__hc2vpp_source_repo_url__" > /opt/config/hc2vpp_source_repo_url.txt + echo "__hc2vpp_source_repo_branch__" > /opt/config/hc2vpp_source_repo_branch.txt # Download and run install script curl -k __repo_url_blob__/org.onap.demo/vnfs/vcpe/__install_script_version__/v_gw_install.sh -o /opt/v_gw_install.sh diff --git a/robot/assets/asdc/base_vfw/base_vfw.yaml b/robot/assets/asdc/base_vfw/base_vfw.yaml index a7df854a..a0a23094 100644 --- a/robot/assets/asdc/base_vfw/base_vfw.yaml +++ b/robot/assets/asdc/base_vfw/base_vfw.yaml @@ -1,6 +1,16 @@ +########################################################################## +# +########################################################################## + heat_template_version: 2013-05-23 -description: Heat template to deploy vFirewall demo app for OpenECOMP +description: Heat template that deploys vFirewall demo app for ONAP + +############## +# # +# PARAMETERS # +# # +############## parameters: vfw_image_name: @@ -23,14 +33,14 @@ parameters: type: string label: Protected private network name or ID description: Private network that connects vFirewall with vSink - ecomp_private_net_id: + onap_private_net_id: type: string - label: ECOMP management network name or ID - description: Private network that connects ECOMP component and the VNF - ecomp_private_subnet_id: + label: ONAP management network name or ID + description: Private network that connects ONAP components and the VNF + onap_private_subnet_id: type: string - label: ECOMP management sub-network name or ID - description: Private sub-network that connects ECOMP component and the VNF + label: ONAP management sub-network name or ID + description: Private sub-network that connects ONAP components and the VNF unprotected_private_net_cidr: type: string label: Unprotected private network CIDR @@ -39,9 +49,9 @@ parameters: type: string label: Protected private network CIDR description: The CIDR of the protected private network - ecomp_private_net_cidr: + onap_private_net_cidr: type: string - label: ECOMP private network CIDR + label: ONAP private network CIDR description: The CIDR of the protected private network vfw_private_ip_0: type: string @@ -53,24 +63,24 @@ parameters: description: Private IP address that is assigned to the vFirewall to communicate with the vSink vfw_private_ip_2: type: string - label: vFirewall private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vFirewall to communicate with ECOMP components + label: vFirewall private IP address towards the ONAP management network + description: Private IP address that is assigned to the vFirewall to communicate with ONAP components vpg_private_ip_0: type: string label: vPacketGenerator private IP address towards the unprotected network description: Private IP address that is assigned to the vPacketGenerator to communicate with the vFirewall vpg_private_ip_1: type: string - label: vPacketGenerator private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vPacketGenerator to communicate with ECOMP components + label: vPacketGenerator private IP address towards the ONAP management network + description: Private IP address that is assigned to the vPacketGenerator to communicate with ONAP components vsn_private_ip_0: type: string label: vSink private IP address towards the protected network description: Private IP address that is assigned to the vSink to communicate with the vFirewall vsn_private_ip_1: type: string - label: vSink private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vSink to communicate with ECOMP components + label: vSink private IP address towards the ONAP management network + description: Private IP address that is assigned to the vSink to communicate with ONAP components vfw_name_0: type: string label: vFirewall name @@ -86,11 +96,11 @@ parameters: vnf_id: type: string label: VNF ID - description: The VNF ID is provided by ECOMP + description: The VNF ID is provided by ONAP vf_module_id: type: string label: vFirewall module ID - description: The vFirewall Module ID is provided by ECOMP + description: The vFirewall Module ID is provided by ONAP dcae_collector_ip: type: string label: DCAE collector IP address @@ -115,13 +125,26 @@ parameters: type: string label: Repository URL description: URL of the repository that hosts the demo packages + install_script_version: + type: string + label: Installation script version number + description: Version number of the scripts that install the vFW demo app demo_artifacts_version: type: string label: Artifacts version used in demo vnfs description: Artifacts (jar, tar.gz) version used in demo vnfs + cloud_env: + type: string + label: Cloud environment + description: Cloud environment (e.g., openstack, rackspace) + +############# +# # +# RESOURCES # +# # +############# resources: - random-str: type: OS::Heat::RandomString properties: @@ -130,12 +153,12 @@ resources: my_keypair: type: OS::Nova::KeyPair properties: - name: + name: str_replace: template: base_rand params: base: { get_param: key_name } - rand: { get_resource: random-str } + rand: { get_resource: random-str } public_key: { get_param: pub_key } save_private_key: false @@ -161,6 +184,26 @@ resources: network_id: { get_resource: protected_private_network } cidr: { get_param: protected_private_net_cidr } + # Virtual Firewall instantiation + vfw_private_0_port: + type: OS::Neutron::Port + properties: + network: { get_resource: unprotected_private_network } + fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}] + + vfw_private_1_port: + type: OS::Neutron::Port + properties: + allowed_address_pairs: [{ "ip_address": { get_param: vpg_private_ip_0 }}] + network: { get_resource: protected_private_network } + fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}] + + vfw_private_2_port: + type: OS::Neutron::Port + properties: + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}] + vfw_0: type: OS::Nova::Server properties: @@ -183,87 +226,52 @@ resources: __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __install_script_version__ : { get_param: install_script_version } + __vfw_private_ip_0__ : { get_param: vfw_private_ip_0 } + __vfw_private_ip_1__ : { get_param: vfw_private_ip_1 } + __vfw_private_ip_2__ : { get_param: vfw_private_ip_2 } + __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr } + __protected_private_net_cidr__ : { get_param: protected_private_net_cidr } + __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } + __cloud_env__ : { get_param: cloud_env } template: | #!/bin/bash - - DCAE_COLLECTOR_IP=__dcae_collector_ip__ - DCAE_COLLECTOR_PORT=__dcae_collector_port__ - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y make wget openjdk-8-jdk gcc libcurl4-openssl-dev python-pip bridge-utils apt-transport-https ca-certificates - apt-get install -y maven - pip install jsonschema - - # Download vFirewall code for virtual firewall + + # Create configuration files mkdir /opt/config - mkdir /opt/honeycomb - cd /opt - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/v_firewall_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/vfirewall.sh - - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf:sample-distribution:$DEMO_ARTIFACTS_VERSION:tar.gz:hc -Dtransitive=false -Ddest=. - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=. - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves_vfw_reporting:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=. - + echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt + echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vfw_private_ip_0__" > /opt/config/vfw_private_ip_0.txt + echo "__vfw_private_ip_1__" > /opt/config/vfw_private_ip_1.txt + echo "__vfw_private_ip_2__" > /opt/config/vfw_private_ip_2.txt + echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt + echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt - tar -zxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz - mv ves-$DEMO_ARTIFACTS_VERSION VES - tar -zxvf ves_vfw_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz - mv ves_vfw_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vFW - tar -zxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz - mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb - sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json - mv VESreporting_vFW /opt/VES/code/evel_training/VESreporting - rm *.tar.gz - chmod +x v_firewall_init.sh - chmod +x vfirewall.sh - echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt - echo $DCAE_COLLECTOR_PORT > config/dcae_collector_port.txt - echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt - - # Install VPP - export UBUNTU="trusty" - export RELEASE=".stable.1609" - rm /etc/apt/sources.list.d/99fd.io.list - echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io$RELEASE.ubuntu.$UBUNTU.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list - apt-get update - apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev - sleep 1 - - # Install VES - cd /opt/VES/bldjobs/ - make clean - make - sleep 1 - - # Run instantiation script + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_firewall_install.sh -o /opt/v_firewall_install.sh cd /opt - mv vfirewall.sh /etc/init.d - update-rc.d vfirewall.sh defaults - ./v_firewall_init.sh + chmod +x v_firewall_install.sh + ./v_firewall_install.sh - vfw_private_0_port: - type: OS::Neutron::Port - properties: - network: { get_resource: unprotected_private_network } - fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vfw_private_ip_0 }}] - vfw_private_1_port: + # Virtual Packet Generator instantiation + vpg_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: protected_private_network } - fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vfw_private_ip_1 }}] + network: { get_resource: unprotected_private_network } + fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}] - vfw_private_2_port: + vpg_private_1_port: type: OS::Neutron::Port properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vfw_private_ip_2 }}] + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}] vpg_0: type: OS::Nova::Server @@ -287,75 +295,49 @@ resources: __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __install_script_version__ : { get_param: install_script_version } + __vpg_private_ip_0__ : { get_param: vpg_private_ip_0 } + __vpg_private_ip_1__ : { get_param: vpg_private_ip_1 } + __unprotected_private_net_cidr__ : { get_param: unprotected_private_net_cidr } + __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } + __cloud_env__ : { get_param: cloud_env } template: | #!/bin/bash - - FW_IPADDR=__fw_ipaddr__ - PROTECTED_NET_CIDR=__protected_net_cidr__ - SINK_IPADDR=__sink_ipaddr__ - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y make wget openjdk-8-jdk gcc libcurl4-openssl-dev python-pip bridge-utils apt-transport-https ca-certificates - apt-get install -y maven - pip install jsonschema - - # Download vFirewall demo code for packet generator + + # Create configuration files mkdir /opt/config - mkdir /opt/honeycomb + echo "__fw_ipaddr__" > /opt/config/fw_ipaddr.txt + echo "__protected_net_cidr__" > /opt/config/protected_net_cidr.txt + echo "__sink_ipaddr__" > /opt/config/sink_ipaddr.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vpg_private_ip_0__" > /opt/config/vpg_private_ip_0.txt + echo "__vpg_private_ip_1__" > /opt/config/vpg_private_ip_1.txt + echo "__unprotected_private_net_cidr__" > /opt/config/unprotected_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh cd /opt + chmod +x v_packetgen_install.sh + ./v_packetgen_install.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/v_packetgen_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/vpacketgen.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/run_traffic_fw_demo.sh - - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf:sample-distribution:$DEMO_ARTIFACTS_VERSION:tar.gz:hc -Dtransitive=false -Ddest=. - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vfw:vfw_pg_streams:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=. - - tar -zxvf sample-distribution-$DEMO_ARTIFACTS_VERSION-hc.tar.gz - tar -zxvf vfw_pg_streams-$DEMO_ARTIFACTS_VERSION-demo.tar.gz - mv vfw_pg_streams-$DEMO_ARTIFACTS_VERSION pg_streams - mv sample-distribution-$DEMO_ARTIFACTS_VERSION honeycomb - sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' honeycomb/sample-distribution-$DEMO_ARTIFACTS_VERSION/config/honeycomb.json - rm *.tar.gz - chmod +x v_packetgen_init.sh - chmod +x vpacketgen.sh - echo $FW_IPADDR > config/fw_ipaddr.txt - echo $PROTECTED_NET_CIDR > config/protected_net_cidr.txt - echo $SINK_IPADDR > config/sink_ipaddr.txt - echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt - - # Install VPP - export UBUNTU="trusty" - export RELEASE=".stable.1609" - rm /etc/apt/sources.list.d/99fd.io.list - echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io$RELEASE.ubuntu.$UBUNTU.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list - apt-get update - apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev - sleep 1 - - # Run instantiation script - cd /opt - mv vpacketgen.sh /etc/init.d - update-rc.d vpacketgen.sh defaults - ./v_packetgen_init.sh - - vpg_private_0_port: + # Virtual Sink instantiation + vsn_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: unprotected_private_network } - fixed_ips: [{"subnet": { get_resource: unprotected_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}] + network: { get_resource: protected_private_network } + fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}] - vpg_private_1_port: + vsn_private_1_port: type: OS::Neutron::Port properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}] + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}] vsn_0: type: OS::Nova::Server @@ -377,47 +359,29 @@ resources: __unprotected_net__: { get_param: unprotected_private_net_cidr } __repo_url_blob__ : { get_param: repo_url_blob } __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __install_script_version__ : { get_param: install_script_version } + __vsn_private_ip_0__ : { get_param: vsn_private_ip_0 } + __vsn_private_ip_1__ : { get_param: vsn_private_ip_1 } + __protected_private_net_cidr__ : { get_param: protected_private_net_cidr } + __onap_private_net_cidr__ : { get_param: onap_private_net_cidr } + __cloud_env__ : { get_param: cloud_env } template: | #!/bin/bash - - PROTECTED_NET_GW=__protected_net_gw__ - UNPROTECTED_NET=__unprotected_net__ - UNPROTECTED_NET=$(echo $UNPROTECTED_NET | cut -d'/' -f1) - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y make wget openjdk-8-jdk apt-transport-https ca-certificates darkstat - - # Configure and run darkstat - sed -i "s/START_DARKSTAT=.*/START_DARKSTAT=yes/g" /etc/darkstat/init.cfg - sed -i "s/INTERFACE=.*/INTERFACE=\"-i eth1\"/g" /etc/darkstat/init.cfg - /etc/init.d/darkstat start - + + # Create configuration files mkdir /opt/config + echo "__protected_net_gw__" > /opt/config/protected_net_gw.txt + echo "__unprotected_net__" > /opt/config/unprotected_net.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vsn_private_ip_0__" > /opt/config/vsn_private_ip_0.txt + echo "__vsn_private_ip_1__" > /opt/config/vsn_private_ip_1.txt + echo "__protected_private_net_cidr__" > /opt/config/protected_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vfw/__install_script_version__/v_sink_install.sh -o /opt/v_sink_install.sh cd /opt - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/v_sink_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vfw/$DEMO_ARTIFACTS_VERSION/vsink.sh - chmod +x v_sink_init.sh - chmod +x vsink.sh - echo $PROTECTED_NET_GW > config/protected_net_gw.txt - echo $UNPROTECTED_NET > config/unprotected_net.txt - mv vsink.sh /etc/init.d - update-rc.d vsink.sh defaults - ./v_sink_init.sh - - vsn_private_0_port: - type: OS::Neutron::Port - properties: - network: { get_resource: protected_private_network } - fixed_ips: [{"subnet": { get_resource: protected_private_subnet }, "ip_address": { get_param: vsn_private_ip_0 }}] - - vsn_private_1_port: - type: OS::Neutron::Port - properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vsn_private_ip_1 }}] + chmod +x v_sink_install.sh + ./v_sink_install.sh
\ No newline at end of file diff --git a/robot/assets/asdc/base_vlb/base_vlb.yaml b/robot/assets/asdc/base_vlb/base_vlb.yaml index c292f295..cbf0d4d4 100644 --- a/robot/assets/asdc/base_vlb/base_vlb.yaml +++ b/robot/assets/asdc/base_vlb/base_vlb.yaml @@ -1,6 +1,16 @@ +########################################################################## +# +########################################################################## + heat_template_version: 2013-05-23 -description: Heat template to deploy vLoadBalancer/vDNS demo app for OpenECOMP +description: Heat template to deploy vLoadBalancer/vDNS demo app for ONAP + +############## +# # +# PARAMETERS # +# # +############## parameters: vlb_image_name: @@ -19,21 +29,29 @@ parameters: type: string label: vLoadBalancer private network name or ID description: Private network that connects vLoadBalancer with vDNSs - ecomp_private_net_id: + pktgen_private_net_id: + type: string + label: vPacketGen private network name or ID + description: Private network that connects vLoadBalancer with vPacketGen + onap_private_net_id: type: string label: ECOMP management network name or ID - description: Private network that connects ECOMP component and the VNF - ecomp_private_subnet_id: + description: Private network that connects ONAP component and the VNF + onap_private_subnet_id: type: string label: ECOMP management sub-network name or ID - description: Private sub-network that connects ECOMP component and the VNF + description: Private sub-network that connects ONAP component and the VNF vlb_private_net_cidr: type: string label: vLoadBalancer private network CIDR description: The CIDR of the vLoadBalancer private network - ecomp_private_net_cidr: + pktgen_private_net_cidr: type: string - label: ECOMP private network CIDR + label: vPacketGen private network CIDR + description: The CIDR of the vPacketGen private network + onap_private_net_cidr: + type: string + label: ONAP private network CIDR description: The CIDR of the protected private network vlb_private_ip_0: type: string @@ -41,16 +59,40 @@ parameters: description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs vlb_private_ip_1: type: string - label: vLoadBalancer private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components + label: vLoadBalancer private IP address towards the ONAP management network + description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components + vlb_private_ip_2: + type: string + label: vLoadBalancer private IP address towards the vPacketGen network + description: Private IP address that is assigned to the vLoadBalancer to communicate with vPacketGen vdns_private_ip_0: type: string label: vDNS private IP address towards the private network description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer vdns_private_ip_1: type: string - label: vDNS private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vDNS to communicate with ECOMP components + label: vDNS private IP address towards the ONAP management network + description: Private IP address that is assigned to the vDNS to communicate with ONAP components + vpg_private_ip_0: + type: string + label: vPacketGen private IP address towards the vPacketGen private network + description: Private IP address that is assigned to the vPacketGen to communicate with the vLoadBalancer + vpg_private_ip_1: + type: string + label: vPacketGen private IP address towards the ONAP management network + description: Private IP address that is assigned to the vPacketGen to communicate with ONAP components + vip: + type: string + label: Virtual Private IP of the vLoadBalancer + description: Virtual Private IP that is assigned to the vLoadBalancer's VPP layer + gre_ipaddr: + type: string + label: IP Address of the GRE tunnel + description: IP address assigned to the GRE tunnel on the vLoadBalancer + pg_int: + type: string + label: IP Address of the output vPacketGen interface + description: IP address assigned to the output interface of the vPacketGen's VPP layer vlb_name_0: type: string label: vLoadBalancer name @@ -59,14 +101,18 @@ parameters: type: string label: vDNS name description: Name of the vDNS + vpg_name_0: + type: string + label: vPKTGEN name + description: Name of the vPKTGEN vnf_id: type: string label: VNF ID - description: The VNF ID is provided by ECOMP + description: The VNF ID is provided by ONAP vf_module_id: type: string label: vFirewall module ID - description: The vLoadBalancer Module ID is provided by ECOMP + description: The vLoadBalancer Module ID is provided by ONAP dcae_collector_ip: type: string label: DCAE collector IP address @@ -95,6 +141,20 @@ parameters: type: string label: Artifacts version used in demo vnfs description: Artifacts (jar, tar.gz) version used in demo vnfs + install_script_version: + type: string + label: Installation script version number + description: Version number of the scripts that install the vFW demo app + cloud_env: + type: string + label: Cloud environment + description: Cloud environment (e.g., openstack, rackspace) + +############# +# # +# RESOURCES # +# # +############# resources: @@ -102,7 +162,7 @@ resources: type: OS::Heat::RandomString properties: length: 4 - + my_keypair: type: OS::Nova::KeyPair properties: @@ -127,6 +187,36 @@ resources: network_id: { get_resource: vlb_private_network } cidr: { get_param: vlb_private_net_cidr } + pktgen_private_network: + type: OS::Neutron::Net + properties: + name: { get_param: pktgen_private_net_id } + + pktgen_private_subnet: + type: OS::Neutron::Subnet + properties: + name: { get_param: pktgen_private_net_id } + network_id: { get_resource: pktgen_private_network } + cidr: { get_param: pktgen_private_net_cidr } + + vlb_private_0_port: + type: OS::Neutron::Port + properties: + network: { get_resource: vlb_private_network } + fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}] + + vlb_private_1_port: + type: OS::Neutron::Port + properties: + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}] + + vlb_private_2_port: + type: OS::Neutron::Port + properties: + network: { get_resource: pktgen_private_network } + fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vlb_private_ip_2 }}] + vlb_0: type: OS::Nova::Server properties: @@ -138,6 +228,7 @@ resources: - network: { get_param: public_net_id } - port: { get_resource: vlb_private_0_port } - port: { get_resource: vlb_private_1_port } + - port: { get_resource: vlb_private_2_port } metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} user_data_format: RAW user_data: @@ -145,100 +236,62 @@ resources: params: __dcae_collector_ip__: { get_param: dcae_collector_ip } __dcae_collector_port__: { get_param: dcae_collector_port } - __local_private_ipaddr__: { get_param: vlb_private_ip_0 } - __repo_url_blob__ : { get_param: repo_url_blob } - __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __ip_to_dns_net__: { get_param: vlb_private_ip_0 } + __ip_to_pktgen_net__: { get_param: vlb_private_ip_2 } + __vip__: { get_param: vip } + __gre_ipaddr__: { get_param: gre_ipaddr } + __pktgen_ipaddr__: { get_param: vpg_private_ip_0 } + __oam_private_ipaddr__: { get_param: vlb_private_ip_1 } + __repo_url_blob__: { get_param: repo_url_blob } + __repo_url_artifacts__: { get_param: repo_url_artifacts } + __demo_artifacts_version__: { get_param: demo_artifacts_version } + __install_script_version__: { get_param: install_script_version } + __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr } + __onap_private_net_cidr__: { get_param: onap_private_net_cidr } + __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr } + __pktgen_mac__: { get_attr: [vpg_private_0_port, mac_address] } + __cloud_env__: { get_param: cloud_env } template: | #!/bin/bash - DCAE_COLLECTOR_IP=__dcae_collector_ip__ - DCAE_COLLECTOR_PORT=__dcae_collector_port__ - LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__ - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y make gcc wget openjdk-8-jdk bridge-utils libcurl4-openssl-dev apt-transport-https ca-certificates - apt-get install -y maven - sleep 1 - - # Download vLB demo code for load balancer + # Create configuration files mkdir /opt/config - mkdir /opt/FDserver + echo "__dcae_collector_ip__" > /opt/config/dcae_collector_ip.txt + echo "__dcae_collector_port__" > /opt/config/dcae_collector_port.txt + echo "__ip_to_dns_net__" > /opt/config/ip_to_dns_net.txt + echo "__ip_to_pktgen_net__" > /opt/config/ip_to_pktgen_net.txt + echo "__vip__" > /opt/config/vip.txt + echo "__gre_ipaddr__" > /opt/config/gre_ipaddr.txt + echo "__pktgen_ipaddr__" > /opt/config/pktgen_ipaddr.txt + echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt + echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__pktgen_mac__" > /opt/config/pktgen_mac.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_lb_install.sh -o /opt/v_lb_install.sh cd /opt + chmod +x v_lb_install.sh + ./v_lb_install.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/v_lb_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/vlb.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/dnsmembership.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/add_dns.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/remove_dns.sh - - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vlb:dns-manager:$DEMO_ARTIFACTS_VERSION:jar -Dtransitive=false -Ddest=. - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=. - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.ves:ves_vlb_reporting:$DEMO_ARTIFACTS_VERSION:tar.gz:demo -Dtransitive=false -Ddest=. - - tar -zxvf ves-$DEMO_ARTIFACTS_VERSION-demo.tar.gz - mv ves-$DEMO_ARTIFACTS_VERSION VES - tar -zxvf ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION-demo.tar.gz - mv ves_vlb_reporting-$DEMO_ARTIFACTS_VERSION VESreporting_vLB - - mv VESreporting_vLB /opt/VES/code/evel_training/VESreporting - mv dns-manager-$DEMO_ARTIFACTS_VERSION.jar /opt/FDserver/dns-manager-$DEMO_ARTIFACTS_VERSION.jar - mv dnsmembership.sh /opt/FDserver/dnsmembership.sh - mv add_dns.sh /opt/FDserver/add_dns.sh - mv remove_dns.sh /opt/FDserver/remove_dns.sh - rm *.tar.gz - - chmod +x v_lb_init.sh - chmod +x vlb.sh - chmod +x /opt/VES/code/evel_training/VESreporting/go-client.sh - chmod +x /opt/FDserver/dnsmembership.sh - chmod +x /opt/FDserver/add_dns.sh - chmod +x /opt/FDserver/remove_dns.sh - echo $DCAE_COLLECTOR_IP > config/dcae_collector_ip.txt - echo $DCAE_COLLECTOR_PORT > config/dcae_collector_port.txt - echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt - LOCAL_PUBLIC_IPADDR=$(ifconfig eth0 | grep "inet addr" | tr -s ' ' | cut -d' ' -f3 | cut -d':' -f2) - echo $LOCAL_PUBLIC_IPADDR > config/local_public_ipaddr.txt - echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt - - # Install VPP - export UBUNTU="trusty" - export RELEASE=".stable.1609" - rm /etc/apt/sources.list.d/99fd.io.list - echo "deb [trusted=yes] https://nexus.fd.io/content/repositories/fd.io$RELEASE.ubuntu.$UBUNTU.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list - apt-get update - apt-get install -y vpp vpp-dpdk-dkms vpp-lib vpp-dbg vpp-plugins vpp-dev - sleep 1 - - # Install VES - cd /opt/VES/bldjobs/ - make clean - make - sleep 1 - - # Run instantiation script - cd /opt - mv vlb.sh /etc/init.d - update-rc.d vlb.sh defaults - ./v_lb_init.sh - - vlb_private_0_port: + vdns_private_0_port: type: OS::Neutron::Port properties: network: { get_resource: vlb_private_network } - fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vlb_private_ip_0 }}] + fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}] - vlb_private_1_port: + vdns_private_1_port: type: OS::Neutron::Port properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vlb_private_ip_1 }}] + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}] vdns_0: type: OS::Nova::Server @@ -256,84 +309,100 @@ resources: user_data: str_replace: params: - __lb_oam_int__ : { get_param: vlb_private_ip_1 } + __lb_oam_int__: { get_param: vlb_private_ip_1 } __lb_private_ipaddr__: { get_param: vlb_private_ip_0 } __local_private_ipaddr__: { get_param: vdns_private_ip_0 } - __repo_url_blob__ : { get_param: repo_url_blob } - __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __oam_private_ipaddr__: { get_param: vdns_private_ip_1 } + __repo_url_blob__: { get_param: repo_url_blob } + __repo_url_artifacts__: { get_param: repo_url_artifacts } + __demo_artifacts_version__: { get_param: demo_artifacts_version } + __install_script_version__: { get_param: install_script_version } + __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr } + __onap_private_net_cidr__: { get_param: onap_private_net_cidr } + __cloud_env__: { get_param: cloud_env } template: | #!/bin/bash - LB_OAM_INT=__lb_oam_int__ - LB_PRIVATE_IPADDR=__lb_private_ipaddr__ - LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__ - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates - apt-get install -y maven - sleep 1 - - # Download vDNS demo code for DNS Server + # Create configuration files mkdir /opt/config - mkdir /opt/FDclient + echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt + echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt + echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt + echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh cd /opt - - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/v_dns_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/vdns.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/dnsclient.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/set_gre_tunnel.sh - - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vlb:dns-client:$DEMO_ARTIFACTS_VERSION:jar -Dtransitive=false -Ddest=. - - mv dns-client-$DEMO_ARTIFACTS_VERSION.jar /opt/FDclient/ - mv dnsclient.sh /opt/FDclient/ - mv set_gre_tunnel.sh /opt/FDclient/ - - chmod +x v_dns_init.sh - chmod +x vdns.sh - chmod +x /opt/FDclient/dnsclient.sh - chmod +x /opt/FDclient/set_gre_tunnel.sh - - echo $LB_OAM_INT > config/lb_oam_int.txt - echo $LB_PRIVATE_IPADDR > config/lb_private_ipaddr.txt - echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt - echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt + chmod +x v_dns_install.sh + ./v_dns_install.sh - # Download Bind config files - cd /opt/config - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/db_dnsdemo_openecomp_org - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.options - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.local - # Configure Bind - modprobe ip_gre - mkdir /etc/bind/zones - sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9 - mv db_dnsdemo_openecomp_org /etc/bind/zones/db.dnsdemo.openecomp.org - mv named.conf.options /etc/bind/ - mv named.conf.local /etc/bind/ - sleep 1 - - # Run instantiation script - cd /opt - mv vdns.sh /etc/init.d - update-rc.d vdns.sh defaults - ./v_dns_init.sh - - vdns_private_0_port: + vpg_private_0_port: type: OS::Neutron::Port properties: - network: { get_resource: vlb_private_network } - fixed_ips: [{"subnet": { get_resource: vlb_private_subnet }, "ip_address": { get_param: vdns_private_ip_0 }}] + network: { get_resource: pktgen_private_network } + fixed_ips: [{"subnet": { get_resource: pktgen_private_subnet }, "ip_address": { get_param: vpg_private_ip_0 }}] - vdns_private_1_port: + vpg_private_1_port: type: OS::Neutron::Port properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}] + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vpg_private_ip_1 }}] + + vpg_0: + type: OS::Nova::Server + properties: + image: { get_param: vlb_image_name } + flavor: { get_param: vlb_flavor_name } + name: { get_param: vpg_name_0 } + key_name: { get_resource: my_keypair } + networks: + - network: { get_param: public_net_id } + - port: { get_resource: vpg_private_0_port } + - port: { get_resource: vpg_private_1_port } + user_data_format: RAW + user_data: + str_replace: + params: + __repo_url_blob__: { get_param: repo_url_blob } + __repo_url_artifacts__: { get_param: repo_url_artifacts } + __local_private_ipaddr__: { get_param: vpg_private_ip_0 } + __oam_private_ipaddr__: { get_param: vpg_private_ip_1 } + __onap_private_net_cidr__: { get_param: onap_private_net_cidr } + __pktgen_private_net_cidr__: { get_param: pktgen_private_net_cidr } + __vlb_ipaddr__: { get_param: vlb_private_ip_2 } + __demo_artifacts_version__: { get_param: demo_artifacts_version } + __install_script_version__: { get_param: install_script_version } + __pg_int__: { get_param: pg_int } + __vlb_mac__: { get_attr: [vlb_private_2_port, mac_address] } + __cloud_env__: { get_param: cloud_env } + template: | + #!/bin/bash + + # Create configuration files + mkdir /opt/config + echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt + echo "__pktgen_private_net_cidr__" > /opt/config/pktgen_private_net_cidr.txt + echo "__vlb_ipaddr__" > /opt/config/vlb_ipaddr.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__pg_int__" > /opt/config/pg_int.txt + echo "__vlb_mac__" > /opt/config/vlb_mac.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_packetgen_install.sh -o /opt/v_packetgen_install.sh + cd /opt + chmod +x v_packetgen_install.sh + ./v_packetgen_install.sh
\ No newline at end of file diff --git a/robot/assets/asdc/base_vlb/dnsscaling.yaml b/robot/assets/asdc/base_vlb/dnsscaling.yaml index 003deb91..125eb583 100644 --- a/robot/assets/asdc/base_vlb/dnsscaling.yaml +++ b/robot/assets/asdc/base_vlb/dnsscaling.yaml @@ -1,6 +1,16 @@ +########################################################################## +# +########################################################################## + heat_template_version: 2013-05-23 -description: Heat template to deploy a vDNS for OpenECOMP (scaling-up scenario) +description: Heat template to deploy a vDNS for ONAP (scaling-up scenario) + +############## +# # +# PARAMETERS # +# # +############## parameters: vlb_image_name: @@ -19,30 +29,38 @@ parameters: type: string label: vLoadBalancer private network name or ID description: Private network that connects vLoadBalancer with vDNSs - ecomp_private_net_id: + onap_private_net_id: + type: string + label: ONAP management network name or ID + description: Private network that connects ONAP component and the VNF + onap_private_subnet_id: type: string - label: ECOMP management network name or ID - description: Private network that connects ECOMP component and the VNF - ecomp_private_subnet_id: + label: ONAP management sub-network name or ID + description: Private sub-network that connects ONAP component and the VNF + vlb_private_net_cidr: type: string - label: ECOMP management sub-network name or ID - description: Private sub-network that connects ECOMP component and the VNF + label: vLoadBalancer private network CIDR + description: The CIDR of the vLoadBalancer private network + onap_private_net_cidr: + type: string + label: ONAP private network CIDR + description: The CIDR of the protected private network vlb_private_ip_0: type: string label: vLoadBalancer private IP address towards the private network description: Private IP address that is assigned to the vLoadBalancer to communicate with the vDNSs vlb_private_ip_1: type: string - label: vLoadBalancer private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vLoadBalancer to communicate with ECOMP components + label: vLoadBalancer private IP address towards the ONAP management network + description: Private IP address that is assigned to the vLoadBalancer to communicate with ONAP components vdns_private_ip_0: type: string label: vDNS private IP address towards the private network description: Private IP address that is assigned to the vDNS to communicate with the vLoadBalancer vdns_private_ip_1: type: string - label: vDNS private IP address towards the ECOMP management network - description: Private IP address that is assigned to the vDNS to communicate with ECOMP components + label: vDNS private IP address towards the ONAP management network + description: Private IP address that is assigned to the vDNS to communicate with ONAP components vdns_name_0: type: string label: vDNS name @@ -50,11 +68,11 @@ parameters: vnf_id: type: string label: VNF ID - description: The VNF ID is provided by ECOMP + description: The VNF ID is provided by ONAP vf_module_id: type: string label: vFirewall module ID - description: The vLoadBalancer Module ID is provided by ECOMP + description: The vLoadBalancer Module ID is provided by ONAP key_name: type: string label: Key pair name @@ -71,10 +89,24 @@ parameters: type: string label: Repository URL description: URL of the repository that hosts the demo packages + install_script_version: + type: string + label: Installation script version number + description: Version number of the scripts that install the vFW demo app demo_artifacts_version: type: string label: Artifacts version used in demo vnfs description: Artifacts (jar, tar.gz) version used in demo vnfs + cloud_env: + type: string + label: Cloud environment + description: Cloud environment (e.g., openstack, rackspace) + +############# +# # +# RESOURCES # +# # +############# resources: @@ -95,7 +127,19 @@ resources: public_key: { get_param: pub_key } save_private_key: false - vdns_0: + vdns_2_private_0_port: + type: OS::Neutron::Port + properties: + network: { get_param: vlb_private_net_id } + fixed_ips: [{"subnet": { get_param: vlb_private_net_id }, "ip_address": { get_param: vdns_private_ip_0 }}] + + vdns_2_private_1_port: + type: OS::Neutron::Port + properties: + network: { get_param: onap_private_net_id } + fixed_ips: [{"subnet": { get_param: onap_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}] + + vdns_2: type: OS::Nova::Server properties: image: { get_param: vlb_image_name } @@ -104,91 +148,43 @@ resources: key_name: { get_resource: my_keypair } networks: - network: { get_param: public_net_id } - - port: { get_resource: vdns_private_0_port } - - port: { get_resource: vdns_private_1_port } + - port: { get_resource: vdns_2_private_0_port } + - port: { get_resource: vdns_2_private_1_port } metadata: {vnf_id: { get_param: vnf_id }, vf_module_id: { get_param: vf_module_id }} user_data_format: RAW user_data: str_replace: params: - __lb_oam_int__ : { get_param: vlb_private_ip_1 } + __lb_oam_int__: { get_param: vlb_private_ip_1 } __lb_private_ipaddr__: { get_param: vlb_private_ip_0 } __local_private_ipaddr__: { get_param: vdns_private_ip_0 } - __repo_url_blob__ : { get_param: repo_url_blob } - __repo_url_artifacts__ : { get_param: repo_url_artifacts } - __demo_artifacts_version__ : { get_param: demo_artifacts_version } + __oam_private_ipaddr__: { get_param: vdns_private_ip_1 } + __repo_url_blob__: { get_param: repo_url_blob } + __repo_url_artifacts__: { get_param: repo_url_artifacts } + __demo_artifacts_version__: { get_param: demo_artifacts_version } + __install_script_version__: { get_param: install_script_version } + __vlb_private_net_cidr__: { get_param: vlb_private_net_cidr } + __onap_private_net_cidr__: { get_param: onap_private_net_cidr } + __cloud_env__: { get_param: cloud_env } template: | #!/bin/bash - LB_OAM_INT=__lb_oam_int__ - LB_PRIVATE_IPADDR=__lb_private_ipaddr__ - LOCAL_PRIVATE_IPADDR=__local_private_ipaddr__ - REPO_URL_BLOB=__repo_url_blob__ - REPO_URL_ARTIFACTS=__repo_url_artifacts__ - DEMO_ARTIFACTS_VERSION=__demo_artifacts_version__ - - # Download required dependencies - add-apt-repository -y ppa:openjdk-r/ppa - apt-get update - apt-get install -y wget openjdk-8-jdk bind9 bind9utils bind9-doc apt-transport-https ca-certificates - apt-get install -y maven - sleep 1 - - # Download vDNS demo code for DNS Server + # Create configuration files mkdir /opt/config - mkdir /opt/FDclient + echo "__lb_oam_int__" > /opt/config/lb_oam_int.txt + echo "__lb_private_ipaddr__" > /opt/config/lb_private_ipaddr.txt + echo "__local_private_ipaddr__" > /opt/config/local_private_ipaddr.txt + echo "__oam_private_ipaddr__" > /opt/config/oam_private_ipaddr.txt + echo "__repo_url_blob__" > /opt/config/repo_url_blob.txt + echo "__repo_url_artifacts__" > /opt/config/repo_url_artifacts.txt + echo "__demo_artifacts_version__" > /opt/config/demo_artifacts_version.txt + echo "__install_script_version__" > /opt/config/install_script_version.txt + echo "__vlb_private_net_cidr__" > /opt/config/vlb_private_net_cidr.txt + echo "__onap_private_net_cidr__" > /opt/config/onap_private_net_cidr.txt + echo "__cloud_env__" > /opt/config/cloud_env.txt + + # Download and run install script + curl -k __repo_url_blob__/org.onap.demo/vnfs/vlb/__install_script_version__/v_dns_install.sh -o /opt/v_dns_install.sh cd /opt - - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/v_dns_init.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/vdns.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/dnsclient.sh - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/set_gre_tunnel.sh - - mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=$REPO_URL_ARTIFACTS -Dartifact=org.openecomp.demo.vnf.vlb:dns-client:$DEMO_ARTIFACTS_VERSION:jar -Dtransitive=false -Ddest=. - - mv dns-client-$DEMO_ARTIFACTS_VERSION.jar /opt/FDclient/ - mv dnsclient.sh /opt/FDclient/ - mv set_gre_tunnel.sh /opt/FDclient/ - - chmod +x v_dns_init.sh - chmod +x vdns.sh - chmod +x /opt/FDclient/dnsclient.sh - chmod +x /opt/FDclient/set_gre_tunnel.sh - - echo $LB_OAM_INT > config/lb_oam_int.txt - echo $LB_PRIVATE_IPADDR > config/lb_private_ipaddr.txt - echo $LOCAL_PRIVATE_IPADDR > config/local_private_ipaddr.txt - echo $DEMO_ARTIFACTS_VERSION > config/artifacts_version.txt - - # Download Bind config files - cd /opt/config - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/db_dnsdemo_openecomp_org - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.options - wget $REPO_URL_BLOB/org.openecomp.demo/vnfs/vlb/$DEMO_ARTIFACTS_VERSION/named.conf.local - - # Configure Bind - modprobe ip_gre - mkdir /etc/bind/zones - sed -i "s/OPTIONS=.*/OPTIONS=\"-4 -u bind\"/g" /etc/default/bind9 - mv db_dnsdemo_openecomp_org /etc/bind/zones/db.dnsdemo.openecomp.org - mv named.conf.options /etc/bind/ - mv named.conf.local /etc/bind/ - sleep 1 - - # Run instantiation script - cd /opt - mv vdns.sh /etc/init.d - update-rc.d vdns.sh defaults - ./v_dns_init.sh - - vdns_private_0_port: - type: OS::Neutron::Port - properties: - network: { get_param: vlb_private_net_id } - fixed_ips: [{"subnet": { get_param: vlb_private_net_id }, "ip_address": { get_param: vdns_private_ip_0 }}] - - vdns_private_1_port: - type: OS::Neutron::Port - properties: - network: { get_param: ecomp_private_net_id } - fixed_ips: [{"subnet": { get_param: ecomp_private_subnet_id }, "ip_address": { get_param: vdns_private_ip_1 }}] + chmod +x v_dns_install.sh + ./v_dns_install.sh
\ No newline at end of file diff --git a/robot/assets/keys/onap_dev.ppk b/robot/assets/keys/onap_dev.ppk new file mode 100644 index 00000000..eb84cbe6 --- /dev/null +++ b/robot/assets/keys/onap_dev.ppk @@ -0,0 +1,26 @@ +PuTTY-User-Key-File-2: ssh-rsa +Encryption: none +Comment: imported-openssh-key +Public-Lines: 6 +AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8 +ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544 +AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TG +Q5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2 +RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1 +ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh +Private-Lines: 14 +AAABAQClDekkhI9ZqseCqFjPuKaxsizZMg+faJb6WSHLSxzyk1OSWY6F6FklgLeC +8HW/fuLNYZyGOYDEsG20lMqL02Wdiy7OutS3oOS5iyzIf9a90HfFJi706el6RIpv +INETcaXCS0T8tQrcS1RdKqTaBRC6HXJGAPbBcvw3pwQSdskatU6a/Kt2a3x6Dsqq +inQcgEB/SbrDaJCUX9sbF2HVUwdq7aZK1Lk0ozr1FID9mrhjwWuQ6XC+vjG0Fqty +XeMpR5iaQ73hex3FXQ8zOjkFbMwuHWSh1DSx70r5yFrrBqwQKnMsBqx4QDRf3fIE +NUnWviaL+n+gwcXA07af4kaNUFUtAAAAgQD7jTUQBoWZ8mfc4Lp7PTzOep5njFIp +FeXTzdg020G+/XKX1fu6Quj3kh/3UyhS8+tneqgDNhLDV0L3sH/H4qQVQUT7Eaij +r/rnqXdNXRzcutiOQfs0Zm3vSm3vhDetKnc78jzPtoVegp7xr9XYq4pkvabuka8Q +9kZs9XnLZyRPqwAAAIEAzfBRtIR6bJnoQqNyTZF92KnNjQw0GchnZxSoeHyaY9eN +1MvOldv2+Y9sdvTVDCjww/6AydNtME7PI0Bod0isI70UdboLzmPei3ljNyv4RwFV +y5r7sodTRKCfjgk0fwOKwntjrdQ//Vdvh3X9C8d/FjLdY6+9F1Vnuk+jwk1f3mMA +AACBALHlChm+hPNF01VTc4srolW0ArCNGSbkX6jGdiCA0CVPbugJxgMGsorah25B +rJg0/uB1M9NftSSp58ONkXUqx3VPy2jqJw/kSBqntsfNNEF86gEii3Ql68u0aIha +ibZHRUMpMyXpgPsTl7xy4CovzFxbFPdDwg9FSSi4/L8KV+/G +Private-MAC: 0b5005f6dad99d4ef75fe22b572e5497e5b34853 diff --git a/robot/assets/keys/onap_dev.pvt b/robot/assets/keys/onap_dev.pvt new file mode 100644 index 00000000..81e334a6 --- /dev/null +++ b/robot/assets/keys/onap_dev.pvt @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAylw4KKN/ljqnFBvP+blG5PNfsnM4MAuGPMsE5rkKmzcZWNaE +NGMXTFKlJ4YrUl7OUv8kbgFTmB8BoNpgrNtKACDaz/psQSOeOADCG/YrT4wrYKrR +NhFqOjJpxRmxweEsd14qBOxeFT7Ie42qbCMMzo260HvjLmtUxkOXeJ3xDkGmoJVy +yzxX7nO1m4WyWyukO6x6mX0XDsADF4A6AapcqinoisJ7pnXaNkcjU/JY2Jrwem7s ++ypzIp86O6gdLpLVU9ORR/UYNAk1h+Z6K5Rual4D9mrpC9IJNaYfIgLe7mC39ZLa +fiySNoGhei9P6pYvRJlQki69bid/EPAgX5YZIQIDAQABAoIBAQClDekkhI9ZqseC +qFjPuKaxsizZMg+faJb6WSHLSxzyk1OSWY6F6FklgLeC8HW/fuLNYZyGOYDEsG20 +lMqL02Wdiy7OutS3oOS5iyzIf9a90HfFJi706el6RIpvINETcaXCS0T8tQrcS1Rd +KqTaBRC6HXJGAPbBcvw3pwQSdskatU6a/Kt2a3x6DsqqinQcgEB/SbrDaJCUX9sb +F2HVUwdq7aZK1Lk0ozr1FID9mrhjwWuQ6XC+vjG0FqtyXeMpR5iaQ73hex3FXQ8z +OjkFbMwuHWSh1DSx70r5yFrrBqwQKnMsBqx4QDRf3fIENUnWviaL+n+gwcXA07af +4kaNUFUtAoGBAPuNNRAGhZnyZ9zguns9PM56nmeMUikV5dPN2DTbQb79cpfV+7pC +6PeSH/dTKFLz62d6qAM2EsNXQvewf8fipBVBRPsRqKOv+uepd01dHNy62I5B+zRm +be9Kbe+EN60qdzvyPM+2hV6CnvGv1dirimS9pu6RrxD2Rmz1ectnJE+rAoGBAM3w +UbSEemyZ6EKjck2RfdipzY0MNBnIZ2cUqHh8mmPXjdTLzpXb9vmPbHb01Qwo8MP+ +gMnTbTBOzyNAaHdIrCO9FHW6C85j3ot5Yzcr+EcBVcua+7KHU0Sgn44JNH8DisJ7 +Y63UP/1Xb4d1/QvHfxYy3WOvvRdVZ7pPo8JNX95jAoGAIe5CIg8/JizUZa7KeKUh +9pgDleQPkQsrHQ6/AyIwFBsLwf9THSS5V+uV9D57SfUs46Bf2U8J6N90YQSlt8iS +aWuManFPVgT+yxDIzt6obf2mCEpOIBtQ6N4ZRh2HhQwdWTCrkzkDdGQaHG+jYL6C +xGPwiG2ON7OAfGIAM7eN5lECgYEAhoRLWlaOgRGnHKAWsYQvZ67CjTdDcPPuVu6v +fMQnNMA/7JeTwV+E205L0wfpgZ/cZKmBBlQMJlnUA3q2wfO+PTnse1mjDJU/cGtB +22/lJLxChlQdxGeQhGtGzUhF+hEeOhrO6WSSx7CtMRZoy6Dr6lwfMFZCdVNcBd6v +YOOZk3ECgYEAseUKGb6E80XTVVNziyuiVbQCsI0ZJuRfqMZ2IIDQJU9u6AnGAway +itqHbkGsmDT+4HUz01+1JKnnw42RdSrHdU/LaOonD+RIGqe2x800QXzqASKLdCXr +y7RoiFqJtkdFQykzJemA+xOXvHLgKi/MXFsU90PCD0VJKLj8vwpX78Y= +-----END RSA PRIVATE KEY----- diff --git a/robot/assets/keys/onap_dev_public.pub b/robot/assets/keys/onap_dev_public.pub new file mode 100644 index 00000000..f5d879e0 --- /dev/null +++ b/robot/assets/keys/onap_dev_public.pub @@ -0,0 +1,9 @@ +---- BEGIN SSH2 PUBLIC KEY ---- +Comment: "imported-openssh-key" +AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8 +ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544 +AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TG +Q5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2 +RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1 +ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh +---- END SSH2 PUBLIC KEY ---- diff --git a/robot/assets/keys/onap_dev_public.txt b/robot/assets/keys/onap_dev_public.txt new file mode 100644 index 00000000..838287f2 --- /dev/null +++ b/robot/assets/keys/onap_dev_public.txt @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh imported-openssh-key
\ No newline at end of file diff --git a/robot/assets/service_mappings.py b/robot/assets/service_mappings.py index 563cfe16..5a58bb9f 100644 --- a/robot/assets/service_mappings.py +++ b/robot/assets/service_mappings.py @@ -1,30 +1,47 @@ ''' This metadata identifies the folders to be zipped and uploaded to SDC for model distribution for a given VNF ''' -GLOBAL_SERVICE_FOLDER_MAPPING = {"vFW" : ['base_vfw'], \ - "vLB" : ['base_vlb'], \ - "vVG" : ['base_vvg'], \ - "vIMS" : ['base_clearwater'], \ - "vCPE" : ['base_vcpe_infra', 'base_vcpe_vbng', 'base_vcpe_vbrgemu', 'base_vcpe_vgmux', 'base_vcpe_vgw'], \ +GLOBAL_SERVICE_FOLDER_MAPPING = {"vFW" : ['vFW'], \ + "vLB" : ['vLB'], \ + "vVG" : ['vVG'], \ + "vCPE" : ['vCPE/infra', 'vCPE/vbng', 'vCPE/vbrgemu', 'vCPE/vgmux', 'vCPE/vgw'], + "vFWCL" : ['vFWCL/vFWSNK', 'vFWCL/vPKG'], } ''' -This metadata identifes the preloads that need to be done for a VNF as there may be more than one (vLB) -"template" maps to the key value in the preload_paramenters.py - GLOBAL_PRELOAD_PARAMETERS[<testcase>][<template>] - - GLOBAL_PRELOAD_PARAMETERS['Demo'][dnsscaling_preload.template'] -It no longer refers to a template file as all have been collapsed into preload.template -''' -GLOBAL_SERVICE_TEMPLATE_MAPPING = {"vFW" : [{"isBase" : "true", "template" : "vfw_preload.template", "name_pattern": "base_vfw"}], \ - "vLB" : [{"isBase" : "true", "template" : "vlb_preload.template", "name_pattern": "base_vlb"}, - {"isBase" : "false", "template" : "dnsscaling_preload.template", "name_pattern": "dnsscaling", "prefix" : "vDNS_"}], - "vVG" : [{"isBase" : "true", "template" : "vvg_preload.template", "name_pattern": "base_vvg"}], \ - "vIMS" : [{"isBase" : "true", "template" : "vims_preload.template", "name_pattern": "base_clearwater"}], \ +Map the service to the list of VNFs to be orchestrated +''' +GLOBAL_SERVICE_VNF_MAPPING = { + "vFW" : ['vFW'], + "vLB" : ['vLB'], + "vVG" : ['vVG'], + "vCPE" : ['vCPE'], + "vFWCL" : ['vFWSNK', 'vPKG'], } ''' +This metadata identifes the preloads that need to be done for a VNF as there may be more than one (vLB) +"template" maps to the parameters in the preload_paramenters.py + - GLOBAL_PRELOAD_PARAMETERS[<testcase>][<template>] - + i.e. GLOBAL_PRELOAD_PARAMETERS['Demo'][dnsscaling_preload.template'] +''' +GLOBAL_SERVICE_TEMPLATE_MAPPING = { + "vFW" : [{"isBase" : "true", "template" : "vfw_preload.template", "name_pattern": "base_vfw"}], + "vLB" : [{"isBase" : "true", "template" : "vlb_preload.template", "name_pattern": "base_vlb"}, + {"isBase" : "false", "template" : "dnsscaling_preload.template", "name_pattern": "dnsscaling", "prefix" : "vDNS_"}], + "vVG" : [{"isBase" : "true", "template" : "vvg_preload.template", "name_pattern": "base_vvg"}], + "vCPE" : [{"isBase" : "true", "template" : "vcpe_preload.template", "name_pattern": "base_clearwater"}], + "vFWSNK" : [{"isBase" : "true", "template" : "vfwsnk_preload.template", "name_pattern": "base_vfw"}], + "vPKG" : [{"isBase" : "true", "template" : "vpkg_preload.template", "name_pattern": "base_vpkg"}], +} + +''' Used by the Heatbridge Validate Query to A&AI to locate the vserver name ''' GLOBAL_VALIDATE_NAME_MAPPING = {"vFW" : 'vfw_name_0', "vLB" : 'vlb_name_0', - "vVG" : '' + "vVG" : '', + "vCPE" : '', + "vFWSNK" : 'vfw_name_0', + "vPKG" : 'vpg_name_0', } diff --git a/robot/assets/templates/aai/add_complex_body.template b/robot/assets/templates/aai/add_complex_body.template new file mode 100644 index 00000000..136a620b --- /dev/null +++ b/robot/assets/templates/aai/add_complex_body.template @@ -0,0 +1,42 @@ + { + "complex-name": "${complex_name}", + "physical-location-id": "${physical_location_id}", + "data-center-code": "example-data-center-code-val-5556", + "identity-url": "example-identity-url-val-56898", + "physical-location-type": "example-physical-location-type-val-7608", + "street1": "example-street1-val-34205", + "street2": "example-street2-val-99210", + "city": "example-city-val-27150", + "state": "example-state-val-59487", + "postal-code": "example-postal-code-val-68871", + "country": "example-country-val-94173", + "region": "example-region-val-13893", + "latitude": "example-latitude-val-89101", + "longitude": "example-longitude-val-66229", + "elevation": "example-elevation-val-30253", + "lata": "example-lata-val-46073", + "relationship-list": { + "relationship": [ + { + "related-to": "cloud-region", + "related-link": "/aai/v11/cloud-infrastructure/cloud-regions/cloud-region/CloudOwner/RegionOne", + "relationship-data": [ + { + "relationship-key": "cloud-region.cloud-owner", + "relationship-value": "${cloud_owner}" + }, + { + "relationship-key": "cloud-region.cloud-region-id", + "relationship-value": "${region}" + } + ], + "related-to-property": [ + { + "property-key": "cloud-region.owner-defined-type", + "property-value": "${owner_defined_type}" + } + ] + } + ] + } + } diff --git a/robot/assets/templates/aai/add_demo_customer.template b/robot/assets/templates/aai/add_demo_customer.template index e56577c5..a52d65bd 100644 --- a/robot/assets/templates/aai/add_demo_customer.template +++ b/robot/assets/templates/aai/add_demo_customer.template @@ -41,6 +41,44 @@ } ] } + }, { + "service-type" : "${service3}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "${cloud_owner}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "${cloud_region_id}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "${tenant_id}" + } + ] + } + ] + } + }, { + "service-type" : "${service4}", + "relationship-list" : { + "relationship" : [{ + "related-to" : "tenant", + "relationship-data" : [{ + "relationship-key" : "cloud-region.cloud-owner", + "relationship-value" : "${cloud_owner}" + }, { + "relationship-key" : "cloud-region.cloud-region-id", + "relationship-value" : "${cloud_region_id}" + }, { + "relationship-key" : "tenant.tenant-id", + "relationship-value" : "${tenant_id}" + } + ] + } + ] + } } ] } diff --git a/robot/assets/templates/aai/add_zone_body.template b/robot/assets/templates/aai/add_zone_body.template new file mode 100644 index 00000000..01f99c0a --- /dev/null +++ b/robot/assets/templates/aai/add_zone_body.template @@ -0,0 +1,7 @@ +{ +"zone-id":"${zone_id}", +"zone-name":"${zone_name}", +"design-type":"${design_type}", +"zone-context":"${zone_context}", +"status":"deployed" +}
\ No newline at end of file diff --git a/robot/assets/templates/nova_add_server.template b/robot/assets/templates/nova_add_server.template index 81578393..d40774a2 100644 --- a/robot/assets/templates/nova_add_server.template +++ b/robot/assets/templates/nova_add_server.template @@ -10,7 +10,7 @@ }, "networks": [ { - "uuid": "00000000-0000-0000-0000-000000000000" + "uuid": "${public_net_id}" } ] } diff --git a/robot/assets/templates/sdnc/preload.template b/robot/assets/templates/sdnc/preload.template index b2f4f088..327d806c 100644 --- a/robot/assets/templates/sdnc/preload.template +++ b/robot/assets/templates/sdnc/preload.template @@ -1,31 +1,33 @@ { - "input": { - "vnf-topology-information": { - "vnf-topology-identifier": { - "service-type": "${service_type}", - "vnf-name": "${vf_module_name}", - "vnf-type": "${vf_module_type}", - "generic-vnf-name": "${generic_vnf_name}", - "generic-vnf-type": "${generic_vnf_type}" - }, - "vnf-assignments": { - "availability-zones": [], - "vnf-networks": [], - "vnf-vms": [] - }, - "vnf-parameters": ${vnf_parameters} - }, - "request-information": { - "request-id": "robot12", - "order-version": "1", - "notification-url": "openecomp.org", - "order-number": "1", - "request-action": "PreloadVNFRequest" - }, - "sdnc-request-header": { - "svc-request-id": "robot12", - "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify", - "svc-action": "reserve" - } - } -}
\ No newline at end of file + "input": { + "request-information": { + "notification-url": "openecomp.org", + "order-number": "1", + "order-version": "1", + "request-action": "PreloadVNFRequest", + "request-id": "robot12" + }, + "sdnc-request-header": { + "svc-action": "reserve", + "svc-notification-url": "http:\/\/openecomp.org:8080\/adapters\/rest\/SDNCNotify", + "svc-request-id": "robot12" + }, + "vnf-topology-information": { + "vnf-assignments": { + "availability-zones": [], + "vnf-networks": [], + "vnf-vms": [] + }, + "vnf-parameters": + ${vnf_parameters} + , + "vnf-topology-identifier": { + "generic-vnf-name": "${generic_vnf_name}", + "generic-vnf-type": "${generic_vnf_type}", + "vnf-name": "${vf_module_name}", + "vnf-type": "${vf_module_type}", + "service-type": "${service_type}" + } + } + } +} diff --git a/robot/assets/templates/web/index.html.template b/robot/assets/templates/web/index.html.template index 4853fc72..029471c8 100644 --- a/robot/assets/templates/web/index.html.template +++ b/robot/assets/templates/web/index.html.template @@ -9,7 +9,7 @@ The portal can be found at:<p> - <a href="http://portal.api.simpledemo.openecomp.org:8989/ECOMPPORTAL/login.htm">Portal</a> + <a href="http://portal.api.simpledemo.onap.org:8989/ONAPPORTAL/login.htm">Portal</a> <p> One requires role based user names and passwords to receive the full portal functionality. In the demo setup we pre provisioned: <p> @@ -25,15 +25,86 @@ <p> the password for all of them is: demo123456! + <h3>/etc/hosts or C:\Windows\system32\drivers\etc\hosts</h> + <pre> + +${portal} portal portal.api.simpledemo.onap.org +${sdc} sdc sdc.api.simpledemo.onap.org +${vid} vid vid.api.simpledemo.onap.org +${policy} policy policy.api.simpledemo.onap.org +${aai1} aai1 aai.api.simpledemo.onap.org + +${robot} robot +${appc} appc +${mso} so +${sdnc} sdnc +${openo} multi-service +${dcae_controller} dcae +${aai2} aai2 +${message_router} message-router +${clamp} clamp + +${portal} ${prefix}-portal +${sdc} ${prefix}-sdc +${vid} ${prefix}-vid +${policy} ${prefix}-policy +${aai1} ${prefix}-aai1 +${robot} ${prefix}-robot +${appc} ${prefix}-appc +${mso} ${prefix}-so +${sdnc} ${prefix}-sdnc +${openo} ${prefix}-multi-service +${dcae_controller} ${prefix}-dcae +${aai2} ${prefix}-aai2 +${message_router} ${prefix}-message-router +${clamp} ${prefix}-clamp + + </pre> + <h1> The Reality </h1> As everything should go through the portal there are many subsystems which have there own GUI or API which come in very handy when debugging things. Here the most important once. <h2> Testing </h2> - <b> Not working. </b> : - - <a href="http://${robot}:88/report.html"> Test Report </a> + <h3>Robot Logs</h3> + + <a href="http://${robot}:88/logs/"> Robot Logs </a> + + <h3>Robot vm_properties.py for local testing</h3> + <pre> +GLOBAL_INJECTED_ARTIFACTS_VERSION = "${GLOBAL_INJECTED_ARTIFACTS_VERSION}" +GLOBAL_INJECTED_GITLAB_PASSWORD = "password" +GLOBAL_INJECTED_GITLAB_USERNAME = "username" +GLOBAL_INJECTED_NETWORK = "${GLOBAL_INJECTED_NETWORK}" +GLOBAL_INJECTED_NEXUS_DOCKER_REPO = "${GLOBAL_INJECTED_NEXUS_DOCKER_REPO}" +GLOBAL_INJECTED_NEXUS_PASSWORD = "password" +GLOBAL_INJECTED_NEXUS_REPO = "${GLOBAL_INJECTED_NEXUS_REPO}" +GLOBAL_INJECTED_NEXUS_USERNAME = "docker" +GLOBAL_INJECTED_OPENSTACK_API_KEY = "openstackapikey" +GLOBAL_INJECTED_OPENSTACK_PASSWORD = "openstackpass" +GLOBAL_INJECTED_OPENSTACK_USERNAME = "openstackuser" +GLOBAL_INJECTED_OPENSTACK_TENANT_ID = "${GLOBAL_INJECTED_OPENSTACK_TENANT_ID}" +GLOBAL_INJECTED_REGION = "${GLOBAL_INJECTED_REGION}" +GLOBAL_INJECTED_KEYSTONE = "${GLOBAL_INJECTED_KEYSTONE}" +GLOBAL_INJECTED_AAI1_IP_ADDR = "${aai1}" +GLOBAL_INJECTED_AAI2_IP_ADDR = "${aai2}" +GLOBAL_INJECTED_APPC_IP_ADDR = "${appc}" +GLOBAL_INJECTED_DCAE_IP_ADDR = "${dcae_controller}" +GLOBAL_INJECTED_SO_IP_ADDR = "${mso}" +GLOBAL_INJECTED_MR_IP_ADDR = "${message_router}" +GLOBAL_INJECTED_POLICY_IP_ADDR = "${policy}" +GLOBAL_INJECTED_PORTAL_IP_ADDR = "${portal}" +GLOBAL_INJECTED_SDC_IP_ADDR = "${sdc}" +GLOBAL_INJECTED_SDNC_IP_ADDR = "${sdnc}" +GLOBAL_INJECTED_VID_IP_ADDR = "${vid}" +GLOBAL_INJECTED_OPENO_IP_ADDR = "${openo}" +GLOBAL_INJECTED_CLAMP_IP_ADDR = "${clamp}" +GLOBAL_INJECTED_VM_FLAVOR = "${GLOBAL_INJECTED_VM_FLAVOR}" +GLOBAL_INJECTED_VM_IMAGE_NAME = "${GLOBAL_INJECTED_VM_IMAGE_NAME}" +GLOBAL_INJECTED_PUBLIC_NET_ID = "${GLOBAL_INJECTED_PUBLIC_NET_ID}" + + </pre> <h2> SDN-C </h2> @@ -99,7 +170,8 @@ The following links will open a shell and ssh to the various running VMs (at least on a Mac). It assumes that the .ssh/config file has been set appropriately and /etc/hosts has been updated to the running instance.<p> - <a href="ssh://${aai}"> AAI </a><p> + <a href="ssh://${aai1}"> AAI1 </a><p> + <a href="ssh://${aai2}"> AAI2 </a><p> <a href="ssh://${policy}"> Policy </a><p> <a href="ssh://${sdc}"> SDC </a><p> <a href="ssh://${portal}"> Portal </a><p> diff --git a/robot/resources/aaf_interface.robot b/robot/resources/aaf_interface.robot index 57d4aabc..c9245913 100644 --- a/robot/resources/aaf_interface.robot +++ b/robot/resources/aaf_interface.robot @@ -21,6 +21,7 @@ Run AAF Get Request [Arguments] ${data_path} ${auth}= Create List ${GLOBAL_AAF_USERNAME} ${GLOBAL_AAF_PASSWORD} ${session}= Create Session aaf ${GLOBAL_AAF_SERVER} auth=${auth} + ${session_client}= Add Client Cert ${session} cert ${uuid}= Generate UUID ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} ${resp}= Get Request aaf ${data_path} headers=${headers} diff --git a/robot/resources/aai/aai_interface.robot b/robot/resources/aai/aai_interface.robot index 790fa66f..b72103d0 100644 --- a/robot/resources/aai/aai_interface.robot +++ b/robot/resources/aai/aai_interface.robot @@ -7,7 +7,7 @@ Resource ../global_properties.robot *** Variables *** ${AAI_HEALTH_PATH} /aai/util/echo?action=long -${VERSIONED_INDEX_PATH} /aai/v8 +${VERSIONED_INDEX_PATH} /aai/v11 ${AAI_FRONTEND_ENDPOINT} ${GLOBAL_AAI_SERVER_PROTOCOL}://${GLOBAL_INJECTED_AAI1_IP_ADDR}:${GLOBAL_AAI_SERVER_PORT} diff --git a/robot/resources/aai/create_complex.robot b/robot/resources/aai/create_complex.robot new file mode 100644 index 00000000..e1cc2271 --- /dev/null +++ b/robot/resources/aai/create_complex.robot @@ -0,0 +1,71 @@ +*** Settings *** +Documentation Create A&AI Customer API. +... +... Create A&AI Customer API + +Resource ../json_templater.robot +Resource aai_interface.robot +Library OperatingSystem +Library Collections + + + +*** Variables *** +${COMPLEX_INDEX_PATH} /aai/v11 +${ROOT_COMPLEXES_PATH} /cloud-infrastructure/complexes +${ROOT_COMPLEX_PATH} /cloud-infrastructure/complexes/complex + +${SYSTEM USER} robot-ete +${AAI_ADD_COMPLEX_BODY}= robot/assets/templates/aai/add_complex_body.template + +*** Keywords *** +Inventory Complex If Not Exists + [Documentation] Creates a service in A&AI if it doesn't exist + [Arguments] ${complex_name} ${physical_location_id} ${cloud_owner} ${region} ${owner_defined_type} + ${get_resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} + Return From Keyword If '${get_resp.status_code}' == '200' + Inventory Complex ${complex_name} ${physical_location_id} ${cloud_owner} ${region} ${owner_defined_type} + +Inventory Complex + [Documentation] Inventorys a COmplex in A&AI + [Arguments] ${complex_name} ${physical_location_id} ${cloud_owner} ${region} ${owner_defined_type} + ${arguments}= Create Dictionary complex_name=${complex_name} + Set To Dictionary ${arguments} physical_location_id=${physical_location_id} + Set To Dictionary ${arguments} cloud_owner=${cloud_owner} + Set To Dictionary ${arguments} region=${region} + Set To Dictionary ${arguments} owner_defined_type=${owner_defined_type} + ${data}= Fill JSON Template File ${AAI_ADD_COMPLEX_BODY} ${arguments} + ${put_resp}= Run A&AI Put Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${data} + ${status_string}= Convert To String ${put_resp.status_code} + Should Match Regexp ${status_string} ^(201|200)$ + +Delete Complex If Exists + [Documentation] Removes a complex + [Arguments] ${physical_location_id} + ${get_resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} + Run Keyword If '${get_resp.status_code}' == '200' Delete Zone Exists ${physical_location_id} ${get_resp.json()} + +Delete Complex + [Arguments] ${physical_location_id} ${json} + ${resource_version}= Catenate ${json['resource-version']} + ${put_resp}= Run A&AI Delete Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} ${resource_version} + Should Be Equal As Strings ${put_resp.status_code} 204 + +Get Complex + [Documentation] Return a complex + [Arguments] ${physical_location_id} + ${resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEX_PATH}/${physical_location_id} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + +Get Complexes + [Documentation] Return all complexes + [Arguments] + ${resp}= Run A&AI Get Request ${COMPLEX_INDEX_PATH}${ROOT_COMPLEXES_PATH} + Should Be Equal As Strings ${resp.status_code} 200 + Log ${resp.json()} + [Return] ${resp.json()} + + + + diff --git a/robot/resources/aai/create_customer.robot b/robot/resources/aai/create_customer.robot index 7ebda39d..fec58843 100644 --- a/robot/resources/aai/create_customer.robot +++ b/robot/resources/aai/create_customer.robot @@ -10,32 +10,32 @@ Library OperatingSystem *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${ROOT_CUSTOMER_PATH} /business/customers/customer/ ${SYSTEM USER} robot-ete ${A&AI ADD CUSTOMER BODY} robot/assets/templates/aai/add_customer.template -*** Keywords *** +*** Keywords *** Create Customer - [Documentation] Creates a customer in A&AI - [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${clouder_owner} ${cloud_region_id} ${tenant_id} - ${data_template}= OperatingSystem.Get File ${A&AI ADD CUSTOMER BODY} - ${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner1=${clouder_owner} cloud_region_id1=${cloud_region_id} tenant_id1=${tenant_id} service1=${service_type} - ${data}= Fill JSON Template ${data_template} ${arguments} + [Documentation] Creates a customer in A&AI + [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${clouder_owner} ${cloud_region_id} ${tenant_id} + ${data_template}= OperatingSystem.Get File ${A&AI ADD CUSTOMER BODY} + ${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner1=${clouder_owner} cloud_region_id1=${cloud_region_id} tenant_id1=${tenant_id} service1=${service_type} + ${data}= Fill JSON Template ${data_template} ${arguments} ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data} Should Be Equal As Strings ${put_resp.status_code} 201 [Return] ${put_resp.status_code} -*** Keywords *** +*** Keywords *** Delete Customer - [Documentation] Deletes a customer in A&AI + [Documentation] Deletes a customer in A&AI [Arguments] ${customer_id} - ${get_resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} + ${get_resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} Run Keyword If '${get_resp.status_code}' == '200' Delete Customer Exists ${customer_id} ${get_resp.json()['resource-version']} - -*** Keywords *** + +*** Keywords *** Delete Customer Exists - [Documentation] Deletes a customer in A&AI - [Arguments] ${customer_id} ${resource_version_id} + [Documentation] Deletes a customer in A&AI + [Arguments] ${customer_id} ${resource_version_id} ${put_resp}= Run A&AI Delete Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${resource_version_id} - Should Be Equal As Strings ${put_resp.status_code} 204 + Should Be Equal As Strings ${put_resp.status_code} 204 diff --git a/robot/resources/aai/create_service.robot b/robot/resources/aai/create_service.robot index 38aef3f6..bcf14e3d 100644 --- a/robot/resources/aai/create_service.robot +++ b/robot/resources/aai/create_service.robot @@ -12,56 +12,56 @@ Library UUID *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${ROOT_SERVICE_PATH} /service-design-and-creation/services ${SYSTEM USER} robot-ete ${AAI_ADD_SERVICE_BODY}= robot/assets/templates/aai/add_service_body.template -*** Keywords *** +*** Keywords *** Create Service If Not Exists - [Documentation] Creates a service in A&AI if it doesn't exist + [Documentation] Creates a service in A&AI if it doesn't exist [Arguments] ${service_type} ${dict}= Get Services - ${status} ${value}= Run Keyword And Ignore Error Dictionary Should Contain Key ${dict} ${service_type} + ${status} ${value}= Run Keyword And Ignore Error Dictionary Should Contain Key ${dict} ${service_type} Run Keyword If '${status}' == 'FAIL' Create Service ${service_type} - + Create Service - [Documentation] Creates a service in A&AI + [Documentation] Creates a service in A&AI [Arguments] ${service_type} - ${uuid}= Generate UUID - ${data_template}= OperatingSystem.Get File ${AAI_ADD_SERVICE_BODY} - ${arguments}= Create Dictionary service_type=${service_type} UUID=${uuid} + ${uuid}= Generate UUID + ${data_template}= OperatingSystem.Get File ${AAI_ADD_SERVICE_BODY} + ${arguments}= Create Dictionary service_type=${service_type} UUID=${uuid} ${data}= Fill JSON Template ${data_template} ${arguments} ${fullpath}= Catenate ${INDEX PATH}${ROOT_SERVICE_PATH}/service/${uuid} ${put_resp}= Run A&AI Put Request ${fullpath} ${data} Should Be Equal As Strings ${put_resp.status_code} 201 [Return] ${put_resp.status_code} - + Delete Service If Exists - [Documentation] Deletes a service in A&AI if it exists + [Documentation] Deletes a service in A&AI if it exists [Arguments] ${service_type} ${dict}= Get Services - ${status} ${value}= Run Keyword And Ignore Error Dictionary Should Contain Key ${dict} ${service_type} + ${status} ${value}= Run Keyword And Ignore Error Dictionary Should Contain Key ${dict} ${service_type} Run Keyword If '${status}' == 'PASS' Delete Service ${dict['${service_type}']} Delete Service - [Documentation] Delete passed service in A&AI + [Documentation] Delete passed service in A&AI [Arguments] ${dict} - ${uuid}= Get From Dictionary ${dict} service-id + ${uuid}= Get From Dictionary ${dict} service-id ${resource_version}= Get From Dictionary ${dict} resource-version ${fullpath}= Catenate ${INDEX PATH}${ROOT_SERVICE_PATH}/service/${uuid} - ${resp}= Run A&AI Delete Request ${fullpath} ${resource_version} + ${resp}= Run A&AI Delete Request ${fullpath} ${resource_version} Should Be Equal As Strings ${resp.status_code} 204 - + Get Services - [Documentation] Creates a service in A&AI + [Documentation] Creates a service in A&AI ${resp}= Run A&AI Get Request ${INDEX PATH}${ROOT_SERVICE_PATH} - ${dict}= Create Dictionary + ${dict}= Create Dictionary ${status} ${value}= Run Keyword And Ignore Error Should Be Equal As Strings ${resp.status_code} 200 - Run Keyword If '${status}' == 'PASS' Update Service Dictionary ${dict} ${resp.json()} + Run Keyword If '${status}' == 'PASS' Update Service Dictionary ${dict} ${resp.json()} [Return] ${dict} Update Service Dictionary @@ -69,7 +69,7 @@ Update Service Dictionary ${list}= Evaluate ${json}['service'] :for ${map} in @{list} \ ${status} ${service_type}= Run Keyword And Ignore Error Get From Dictionary ${map} service-description - \ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${service_type}=${map} + \ Run Keyword If '${status}' == 'PASS' Set To Dictionary ${dict} ${service_type}=${map} Log ${dict} diff --git a/robot/resources/aai/create_tenant.robot b/robot/resources/aai/create_tenant.robot index 756882e7..95f1c25a 100644 --- a/robot/resources/aai/create_tenant.robot +++ b/robot/resources/aai/create_tenant.robot @@ -11,7 +11,7 @@ Library Collections *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${ROOT_TENANT_PATH} /cloud-infrastructure/cloud-regions/cloud-region/ ${SYSTEM USER} robot-ete diff --git a/robot/resources/aai/create_zone.robot b/robot/resources/aai/create_zone.robot new file mode 100644 index 00000000..09d6ea6e --- /dev/null +++ b/robot/resources/aai/create_zone.robot @@ -0,0 +1,59 @@ +*** Settings *** +Documentation Create A&AI Customer API. +... +... Create A&AI Customer API + +Resource ../json_templater.robot +Resource aai_interface.robot +Library OperatingSystem +Library Collections + + + +*** Variables *** +${ZONE_INDEX_PATH} /aai/v11 +${ROOT_ZONE_PATH} /network/zones/zone + +${SYSTEM USER} robot-ete +${AAI_ADD_ZONE_BODY}= robot/assets/templates/aai/add_zone_body.template + +*** Keywords *** +Inventory Zone If Not Exists + [Documentation] Creates a service in A&AI if it doesn't exist + [Arguments] ${zone_id}=${GLOBAL_AAI_ZONE_ID} ${zone_name}=${GLOBAL_AAI_ZONE_NAME} ${design_type}=${GLOBAL_AAI_DESIGN_TYPE} ${zone_context}=${GLOBAL_AAI_ZONE_CONTEXT} + ${get_resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} + Return From Keyword If '${get_resp.status_code}' == '200' + Inventory Zone ${zone_id} ${zone_name} ${design_type} ${zone_context} + +Inventory Zone + [Documentation] Inventorys a Tenant in A&AI + [Arguments] ${zone_id} ${zone_name} ${design_type} ${zone_context} + ${arguments}= Create Dictionary zone_id=${zone_id} zone_name=${zone_name} design_type=${design_type} zone_context=${zone_context} + ${data}= Fill JSON Template File ${AAI_ADD_ZONE_BODY} ${arguments} + ${put_resp}= Run A&AI Put Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${data} + ${status_string}= Convert To String ${put_resp.status_code} + Should Match Regexp ${status_string} ^(201|200)$ + +Delete Zone + [Documentation] Removes both Tenant + [Arguments] ${zone_id}=${GLOBAL_AAI_ZONE_ID} + ${get_resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} + Run Keyword If '${get_resp.status_code}' == '200' Delete Zone Exists ${zone_id} ${get_resp.json()} + +Delete Zone Exists + [Arguments] ${zone_id} ${json} + ${resource_version}= Catenate ${json['resource-version']} + ${put_resp}= Run A&AI Delete Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} ${resource_version} + Should Be Equal As Strings ${put_resp.status_code} 204 + +Get Zone + [Documentation] Return zone + [Arguments] ${zone_id} + ${resp}= Run A&AI Get Request ${ZONE_INDEX_PATH}${ROOT_ZONE_PATH}/${zone_id} + Should Be Equal As Strings ${resp.status_code} 200 + [Return] ${resp.json()} + + + + + diff --git a/robot/resources/aai/network.robot b/robot/resources/aai/network.robot index a42461e2..6bda4e27 100644 --- a/robot/resources/aai/network.robot +++ b/robot/resources/aai/network.robot @@ -13,30 +13,29 @@ Library HttpLibrary.HTTP Resource ../json_templater.robot *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${GENERIC_QUERY_PATH} /search/generic-query? ${SYSTEM USER} robot-ete ${CUSTOMER SPEC PATH} /business/customers/customer/ ${SERVICE SUBSCRIPTIONS} /service-subscriptions/service-subscription/ ${SERVICE INSTANCE} /service-instances?service-instance-name= -${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template +${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template -*** Keywords *** +*** Keywords *** Validate Network - [Documentation] Query and Validates A&AI Service Instance - [Arguments] ${service_instance_name} ${service_type} ${customer_id} + [Documentation] Query and Validates A&AI Service Instance + [Arguments] ${service_instance_name} ${service_type} ${customer_id} ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name} Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name} - - -*** Keywords *** + + +*** Keywords *** Create Network - [Documentation] Query and Validates A&AI Service Instance - [Arguments] ${CUSTOMER ID} + [Documentation] Query and Validates A&AI Service Instance + [Arguments] ${CUSTOMER ID} ${json_string}= Catenate { "service-type": "VDNS" , "service-subscriptions":[{"service-instance-id":"instanceid123","service-instance-name":"VDNS"}]} ${put_resp}= Run A&AI Put Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}/VDNS ${json_string} Should Be Equal As Strings ${put_resp.status_code} 201 - [Return] ${put_resp.status_code} - -
\ No newline at end of file + [Return] ${put_resp.status_code} + diff --git a/robot/resources/aai/service_instance.robot b/robot/resources/aai/service_instance.robot index f2cf7d80..31a4a610 100644 --- a/robot/resources/aai/service_instance.robot +++ b/robot/resources/aai/service_instance.robot @@ -17,7 +17,7 @@ Resource ../stack_validation/validate_vvg.robot Resource ../aai/aai_interface.robot *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${GENERIC_QUERY_PATH} /search/generic-query? ${SYSTEM USER} robot-ete ${CUSTOMER SPEC PATH} /business/customers/customer/ @@ -50,6 +50,8 @@ Validate Generic VNF Dictionary Should Contain Value ${generic_vnf.json()} ${vnf_name} ${returned_vnf_type}= Get From Dictionary ${generic_vnf.json()} vnf-type Should Contain ${returned_vnf_type} ${vnf_type} + ${vnf_id}= Get From Dictionary ${generic_vnf.json()} vnf-id + ${generic_vnf}= Run A&AI Get Request ${INDEX PATH}/network/generic-vnfs/generic-vnf/${vnf_id}?depth=all [Return] ${generic_vnf.json()} VLB Closed Loop Hack diff --git a/robot/resources/aai/volume_group.robot b/robot/resources/aai/volume_group.robot index 95822011..40674a5e 100644 --- a/robot/resources/aai/volume_group.robot +++ b/robot/resources/aai/volume_group.robot @@ -13,19 +13,18 @@ Library HttpLibrary.HTTP Resource ../json_templater.robot *** Variables *** -${INDEX PATH} /aai/v8 +${INDEX PATH} /aai/v11 ${GENERIC_QUERY_PATH} /search/generic-query? ${SYSTEM USER} robot-ete ${CUSTOMER SPEC PATH} /business/customers/customer/ ${SERVICE SUBSCRIPTIONS} /service-subscriptions/service-subscription/ ${SERVICE INSTANCE} /service-instances?service-instance-name= -${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template +${SERVCE INSTANCE TEMPLATE} robot/assets/templates/aai/service_subscription.template -*** Keywords *** -Validate Volume Group - [Arguments] ${service_instance_name} ${service_type} ${customer_id} +*** Keywords *** +Validate Volume Group + [Arguments] ${service_instance_name} ${service_type} ${customer_id} ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${CUSTOMER ID}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_name} Dictionary Should Contain Value ${resp.json()['service-instance'][0]} ${service_instance_name} - -
\ No newline at end of file + diff --git a/robot/resources/appc_interface.robot b/robot/resources/appc_interface.robot index 289d1d7c..5cebd9ab 100644 --- a/robot/resources/appc_interface.robot +++ b/robot/resources/appc_interface.robot @@ -1,7 +1,7 @@ *** Settings *** Documentation The main interface for interacting with APP-C. It handles low level stuff like managing the http request library and APP-C required fields Library RequestsLibrary -Library UUID +Library UUID Library OperatingSystem Library StringTemplater Resource global_properties.robot @@ -19,7 +19,7 @@ Run APPC Health Check [Documentation] Runs an APPC healthcheck ${resp}= Run APPC Post Request ${APPC_INDEX PATH}${APPC_HEALTHCHECK_OPERATION_PATH} ${None} Should Be Equal As Strings ${resp.status_code} 200 - Should Be Equal As Strings ${resp.json()['output']['response-code']} 200 + Should Be Equal As Strings ${resp.json()['output']['response-code']} 200 Run APPC Post Request [Documentation] Runs an APPC post request @@ -44,13 +44,13 @@ Run APPC Put Request ${resp}= Put Request appc ${data_path} data=${data} headers=${headers} Log Received response from appc ${resp.text} [Return] ${resp} - + Create Mount Point In APPC [Documentation] Go tell APPC about the PGN we just spun up... [Arguments] ${nodeid} ${host} ${port}=${GLOBAL_PGN_PORT} ${username}=admin ${password}=admin ${dict}= Create Dictionary nodeid=${nodeid} host=${host} port=${port} username=${username} password=${password} ${template}= OperatingSystem.Get File ${APPC_MOUNT_XML} - ${data}= Template String ${template} ${dict} + ${data}= Template String ${template} ${dict} ${resp}= Run APPC Put Request ${APPC_INDEX PATH}${APPC_CREATE_MOUNTPOINT_PATH}${nodeid} ${data} - Should Be Equal As Strings ${resp.status_code} 200 - [Return] ${resp}
\ No newline at end of file + Should Be Equal As Strings ${resp.status_code} 201 + [Return] ${resp}
\ No newline at end of file diff --git a/robot/resources/asdc_interface.robot b/robot/resources/asdc_interface.robot index 5ba0e48d..76496cc6 100644 --- a/robot/resources/asdc_interface.robot +++ b/robot/resources/asdc_interface.robot @@ -53,11 +53,13 @@ Distribute Model From ASDC [Arguments] ${model_zip_path} ${catalog_service_name}= ${catalog_service_id}= Add ASDC Catalog Service ${catalog_service_name} ${catalog_resource_ids}= Create List + ${catalog_resources}= Create Dictionary : FOR ${zip} IN @{model_zip_path} \ ${loop_catalog_resource_id}= Setup ASDC Catalog Resource ${zip} \ Append To List ${catalog_resource_ids} ${loop_catalog_resource_id} \ ${loop_catalog_resource_resp}= Get ASDC Catalog Resource ${loop_catalog_resource_id} \ Add ASDC Resource Instance ${catalog_service_id} ${loop_catalog_resource_id} ${loop_catalog_resource_resp['name']} + \ Set To Dictionary ${catalog_resources} ${loop_catalog_resource_id}=${loop_catalog_resource_resp} ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} Checkin ASDC Catalog Service ${catalog_service_id} Request Certify ASDC Catalog Service ${catalog_service_id} @@ -68,8 +70,9 @@ Distribute Model From ASDC Distribute ASDC Catalog Service ${catalog_service_id} ${catalog_service_resp}= Get ASDC Catalog Service ${catalog_service_id} ${vf_module}= Find Element In Array ${loop_catalog_resource_resp['groups']} type org.openecomp.groups.VfModule - [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} Check Catalog Service Distributed ${catalog_service_resp['uuid']} + [Return] ${catalog_service_resp['name']} ${loop_catalog_resource_resp['name']} ${vf_module} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} + Setup ASDC Catalog Resource [Documentation] Creates all the steps a vf needs for an asdc catalog resource and returns the id [Arguments] ${model_zip_path} @@ -289,13 +292,15 @@ Certify ASDC Catalog Resource ${resp}= Run ASDC Post Request ${ASDC_CATALOG_RESOURCES_PATH}/${catalog_resource_id}${ASDC_CATALOG_LIFECYCLE_PATH}/certify ${data} ${ASDC_TESTER_USER_ID} Should Be Equal As Strings ${resp.status_code} 200 [Return] ${resp.json()['uniqueId']} + Upload ASDC Heat Package - [Documentation] Creates an asdc Software Product and returns its id - [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 - ${file}= Get Binary File ${file_path} - ${files}= Create Dictionary upload=${file} - ${resp}= Run ASDC Post Files Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID} - Should Be Equal As Strings ${resp.status_code} 200 + [Documentation] Creates an asdc Software Product and returns its id + [Arguments] ${software_product_id} ${file_path} ${version_id}=0.1 + ${files}= Create Dictionary + Create Multi Part ${files} upload ${file_path} contentType=application/zip + ${resp}= Run ASDC Post Files Request ${ASDC_VENDOR_SOFTWARE_PRODUCT_PATH}/${software_product_id}/versions/${version_id}${ASDC_VENDOR_SOFTWARE_UPLOAD_PATH} ${files} ${ASDC_DESIGNER_USER_ID} + Should Be Equal As Strings ${resp.status_code} 200 + Add ASDC Catalog Service [Documentation] Creates an asdc Catalog Service and returns its id [Arguments] ${catalog_service_name} @@ -431,6 +436,7 @@ Run ASDC Put Request ${resp}= Put Request asdc ${data_path} data=${data} headers=${headers} Log Received response from asdc ${resp.text} [Return] ${resp} + Run ASDC Post Files Request [Documentation] Runs an ASDC post request [Arguments] ${data_path} ${files} ${user}=${ASDC_DESIGNER_USER_ID} @@ -442,6 +448,7 @@ Run ASDC Post Files Request ${resp}= Post Request asdc ${data_path} files=${files} headers=${headers} Log Received response from asdc ${resp.text} [Return] ${resp} + Run ASDC Post Request [Documentation] Runs an ASDC post request [Arguments] ${data_path} ${data} ${user}=${ASDC_DESIGNER_USER_ID} @@ -471,9 +478,17 @@ Open ASDC GUI ##Setup Browser Go To ${ASDC_FE_ENDPOINT}${PATH} Maximize Browser Window - Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} + Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} Log Logging in to ${ASDC_FE_ENDPOINT}${PATH} Title Should Be ASDC Wait Until Page Contains Element xpath=//div/a[text()='SDC'] ${GLOBAL_SELENIUM_BROWSER_WAIT_TIMEOUT} Log Logged in to ${ASDC_FE_ENDPOINT}${PATH} + + +Create Multi Part + [Arguments] ${addTo} ${partName} ${filePath} ${contentType}=${None} + ${fileData}= Get Binary File ${filePath} + ${fileDir} ${fileName}= Split Path ${filePath} + ${partData}= Create List ${fileName} ${fileData} ${contentType} + Set To Dictionary ${addTo} ${partName}=${partData} diff --git a/robot/resources/clamp_interface.robot b/robot/resources/clamp_interface.robot new file mode 100644 index 00000000..85a8c9e9 --- /dev/null +++ b/robot/resources/clamp_interface.robot @@ -0,0 +1,25 @@ +*** Settings *** +Documentation The main interface for interacting with Microservice Bus. +Library RequestsLibrary + +Resource global_properties.robot + +*** Variables *** +${CLAMP_HEALTH_CHECK_PATH} /restservices/clds/v1/clds/healthcheck +${CLAMP_ENDPOINT} ${GLOBAL_CLAMP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_CLAMP_IP_ADDR}:${GLOBAL_CLAMP_SERVER_PORT} + + +*** Keywords *** +Run CLAMP Health Check + [Documentation] Runs CLAMP Health check + ${resp}= Run CLAMP Get Request ${CLAMP_HEALTH_CHECK_PATH} + Should Be Equal As Integers ${resp.status_code} 200 + +Run CLAMP Get Request + [Documentation] Runs CLAMP Get request + [Arguments] ${data_path} + ${session}= Create Session session ${CLAMP_ENDPOINT} + ${resp}= Get Request session ${data_path} + Should Be Equal As Integers ${resp.status_code} 200 + Log Received response from CLAMP ${resp.text} + [Return] ${resp} diff --git a/robot/resources/dcae_interface.robot b/robot/resources/dcae_interface.robot index 392a2b04..fafa57ab 100644 --- a/robot/resources/dcae_interface.robot +++ b/robot/resources/dcae_interface.robot @@ -7,8 +7,7 @@ Library Collections Resource global_properties.robot *** Variables *** -${DCAE_HEALTH_CHECK_BODY} robot/assets/dcae/dcae_healthcheck.json -${DCAE_HEALTH_CHECK_PATH} /gui +${DCAE_HEALTH_CHECK_PATH} /healthcheck ${DCAE_ENDPOINT} ${GLOBAL_DCAE_SERVER_PROTOCOL}://${GLOBAL_INJECTED_DCAE_IP_ADDR}:${GLOBAL_DCAE_SERVER_PORT} *** Keywords *** @@ -18,9 +17,8 @@ Run DCAE Health Check Log Creating session ${DCAE_ENDPOINT} ${session}= Create Session dcae ${DCAE_ENDPOINT} auth=${auth} ${uuid}= Generate UUID - ${data}= OperatingSystem.Get File ${DCAE_HEALTH_CHECK_BODY} ${headers}= Create Dictionary X-ECOMP-Client-Version=ONAP-R2 action=getTable Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} - ${resp}= Put Request dcae ${DCAE_HEALTH_CHECK_PATH} data=${data} headers=${headers} + ${resp}= Get Request dcae ${DCAE_HEALTH_CHECK_PATH} headers=${headers} Log Received response from dcae ${resp.json()} Should Be Equal As Strings ${resp.status_code} 200 Check DCAE Results ${resp.json()} @@ -28,53 +26,21 @@ Run DCAE Health Check Check DCAE Results [Documentation] Parse DCAE JSON response and make sure all rows have healthTestStatus=GREEN (except for the exceptions ;-) [Arguments] ${json} - @{rows}= Get From Dictionary ${json['returns']} rows - @{headers}= Get From Dictionary ${json['returns']} columns + # ${service_names} to contain only the names of services that are passing + ${service_names}= Evaluate map( lambda s: s['ServiceName'], filter(lambda s: s['Status'] == 'passing', ${json} )) + Should Contain Match ${service_names} cdap + Should Contain Match ${service_names} cdap_broker + Should Contain Match ${service_names} config_binding_service + Should Contain Match ${service_names} deployment_handler + Should Contain Match ${service_names} inventory + Should Contain Match ${service_names} service-change-handler + # Should Contain Match ${service_names} policy_handler + Should Contain Match ${service_names} platform_dockerhost + Should Contain Match ${service_names} component_dockerhost + Should Contain Match ${service_names} cloudify_manager + Should Contain Match ${service_names} regexp=.*dcaegen2-collectors-ves + Should Contain Match ${service_names} regexp=.*cdap_app_cdap_app_tca + Should Contain Match ${service_names} regexp=.*dcae-analytics-holmes-rule-management + Should Contain Match ${service_names} regexp=.*dcae-analytics-holmes-engine-management + [Return] ${service_names} - # Retrieve column names from headers - ${columns}= Create List - :for ${header} in @{headers} - \ ${colName}= Get From Dictionary ${header} colName - \ Append To List ${columns} ${colName} - - # Process each row making sure status=GREEN - :for ${row} in @{rows} - \ ${cells}= Get From Dictionary ${row} cells - \ ${dict}= Make A Dictionary ${cells} ${columns} - \ Is DCAE Status Valid ${dict} - -Is DCAE Status Valid - [Arguments] ${dict} - # If it is GREEN we are done. - ${status} ${value}= Run Keyword And Ignore Error Dictionary Should Contain Item ${dict} healthTestStatus GREEN - Return From Keyword If '${status}' == 'PASS' - - # Check for Exceptions - # Only 1 so far - ${status} ${value}= Run Keyword And Ignore Error Check For Exception ${dict} vm-controller UNDEPLOYED YELLOW - Return From Keyword If '${status}' == 'PASS' - - # Status not GREEN or is not an exception - Fail Health check failed ${dict} - -Check for Exception - [Arguments] ${dict} ${service} ${status} ${healthTestStatus} - # Test the significant attributes to see if this is a legit exception - ${exception}= Copy Dictionary ${dict} - Set To Dictionary ${exception} service=${service} status=${status} healthTestStatus=${healthTestStatus} - Dictionaries Should Be Equal ${dict} ${exception} - - - -Make A Dictionary - [Documentation] Given a list of column names and a list of dictionaries, map columname=value - [Arguments] ${columns} ${names} ${valuename}=value - ${dict}= Create Dictionary - ${collength}= Get Length ${columns} - ${namelength}= Get Length ${names} - :for ${index} in range 0 ${collength} - \ ${name}= Evaluate ${names}[${index}] - \ ${valued}= Evaluate ${columns}[${index}] - \ ${value}= Get From Dictionary ${valued} ${valueName} - \ Set To Dictionary ${dict} ${name} ${value} - [Return] ${dict}
\ No newline at end of file diff --git a/robot/resources/demo_preload.robot b/robot/resources/demo_preload.robot index cb41c573..406f8f0e 100644 --- a/robot/resources/demo_preload.robot +++ b/robot/resources/demo_preload.robot @@ -19,6 +19,8 @@ ${ADD_DEMO_CUSTOMER_BODY} robot/assets/templates/aai/add_demo_customer.templat ${AAI_INDEX_PATH} /aai/v8 ${VF_MODULES_NAME} _Demo_VFModules.json ${FILE_CACHE} /share/ +${DEMO_PREFIX} demo + *** Keywords *** Load Customer And Models @@ -39,8 +41,10 @@ Load Models [Documentation] Use openECOMP to Orchestrate a service. [Arguments] ${customer_name} Set Test Variable ${CUSTOMER_NAME} ${customer_name} - ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFW demoVFW - ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB demoVLB + ${status} ${value}= Run Keyword And Ignore Error Distribute Model vFWCL ${DEMO_PREFIX}VFWCL + ${status} ${value}= Run Keyword And Ignore Error Distribute Model vLB ${DEMO_PREFIX}VLB + ${status} ${value}= Run Keyword And Ignore Error Distribute Model vCPE ${DEMO_PREFIX}VCPE + ##${status} ${value}= Run Keyword And Ignore Error Distribute Model vIMS ${DEMO_PREFIX}VIMS Distribute Model [Arguments] ${service} ${modelName} @@ -49,15 +53,17 @@ Distribute Model Create Customer For VNF Demo [Documentation] Create demo customer for the demo [Arguments] ${customer_name} ${customer_id} ${customer_type} ${clouder_owner} ${cloud_region_id} ${tenant_id} + Create Service If Not Exists vFWCL + Create Service If Not Exists vLB + Create Service If Not Exists vCPE + Create Service If Not Exists vIMS ${data_template}= OperatingSystem.Get File ${ADD_DEMO_CUSTOMER_BODY} ${arguments}= Create Dictionary subscriber_name=${customer_name} global_customer_id=${customer_id} subscriber_type=${customer_type} cloud_owner=${clouder_owner} cloud_region_id=${cloud_region_id} tenant_id=${tenant_id} - Set To Dictionary ${arguments} service1=vFW service2=vLB + Set To Dictionary ${arguments} service1=vFWCL service2=vLB service3=vCPE service4=vIMS ${data}= Fill JSON Template ${data_template} ${arguments} ${put_resp}= Run A&AI Put Request ${INDEX PATH}${ROOT_CUSTOMER_PATH}${customer_id} ${data} ${status_string}= Convert To String ${put_resp.status_code} - Should Match Regexp ${status_string} ^(201|412)$ - Create Service If Not Exists vFW - Create Service If Not Exists vLB + Should Match Regexp ${status_string} ^(200|201|412)$ Preload User Model [Documentation] Preload the demo data for the passed VNF with the passed module name @@ -102,7 +108,7 @@ Get Persona Model Id [Documentation] Query and Validates A&AI Service Instance [Arguments] ${service_instance_id} ${service_type} ${customer_id} ${resp}= Run A&AI Get Request ${INDEX PATH}${CUSTOMER SPEC PATH}${customer_id}${SERVICE SUBSCRIPTIONS}${service_type}${SERVICE INSTANCE}${service_instance_id} - ${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} persona-model-id + ${persona_model_id}= Get From DIctionary ${resp.json()['service-instance'][0]} model-invariant-id [Return] ${persona_model_id} APPC Mount Point diff --git a/robot/resources/global_properties.robot b/robot/resources/global_properties.robot index 871f9929..ac91d24b 100644 --- a/robot/resources/global_properties.robot +++ b/robot/resources/global_properties.robot @@ -19,9 +19,16 @@ ${GLOBAL_OPENSTACK_NEUTRON_SERVICE_TYPE} network ${GLOBAL_OPENSTACK_GLANCE_SERVICE_TYPE} image ${GLOBAL_OPENSTACK_KEYSTONE_SERVICE_TYPE} identity ${GLOBAL_OPENSTACK_STACK_DEPLOYMENT_TIMEOUT} 600s -${GLOBAL_AAI_CLOUD_OWNER} Rackspace +${GLOBAL_AAI_CLOUD_OWNER} CloudOwner +${GLOBAL_AAI_CLOUD_OWNER_DEFINED_TYPE} OwnerType +${GLOBAL_AAI_COMPLEX_NAME} clli1 +${GLOBAL_AAI_PHYSICAL_LOCATION_ID} clli1 ${GLOBAL_BUILD_NUMBER} 0 ${GLOBAL_VID_UI_TIMEOUT_SHORT} 20s ${GLOBAL_VID_UI_TIMEOUT_MEDIUM} 60s ${GLOBAL_VID_UI_TIMEOUT_LONG} 120s -${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt
\ No newline at end of file +${GLOBAL_VM_PRIVATE_KEY} ${EXECDIR}/robot/assets/keys/robot_ssh_private_key.pvt +${GLOBAL_AAI_ZONE_ID} nova1 +${GLOBAL_AAI_ZONE_NAME} nova +${GLOBAL_AAI_DESIGN_TYPE} integration +${GLOBAL_AAI_ZONE_CONTEXT} labs
\ No newline at end of file diff --git a/robot/resources/heatbridge.robot b/robot/resources/heatbridge.robot index c96ee410..515ae391 100644 --- a/robot/resources/heatbridge.robot +++ b/robot/resources/heatbridge.robot @@ -38,7 +38,8 @@ Execute Heatbridge ${stack_id}= Get From Dictionary ${stack_info} id ${tenant_id}= Get From Dictionary ${stack_info} OS::project_id ${vnf_id}= Get From Dictionary ${stack_info} vnf_id - ${openstack_identity_url}= Catenate ${GLOBAL_INJECTED_KEYSTONE}/v2.0 + ${url} ${path}= Get Keystone Url And Path + ${openstack_identity_url}= Catenate ${url}${path} ${region}= Get Openstack Region ${user} ${pass}= Get Openstack Credentials Init Bridge ${openstack_identity_url} ${user} ${pass} ${tenant_id} ${region} ${GLOBAL_AAI_CLOUD_OWNER} diff --git a/robot/resources/msb_interface.robot b/robot/resources/msb_interface.robot new file mode 100644 index 00000000..53b67da6 --- /dev/null +++ b/robot/resources/msb_interface.robot @@ -0,0 +1,25 @@ +*** Settings *** +Documentation The main interface for interacting with Microservice Bus. +Library RequestsLibrary + +Resource global_properties.robot + +*** Variables *** +${MSB_HEALTH_CHECK_PATH} /iui/microservices/default.html +${MSB_ENDPOINT} ${GLOBAL_MSB_SERVER_PROTOCOL}://${GLOBAL_INJECTED_OPENO_IP_ADDR}:${GLOBAL_MSB_SERVER_PORT} + + +*** Keywords *** +Run MSB Health Check + [Documentation] Runs MSB Health check + ${resp}= Run MSB Get Request ${MSB_HEALTH_CHECK_PATH} + Should Be Equal As Integers ${resp.status_code} 200 + +Run MSB Get Request + [Documentation] Runs MSB Get request + [Arguments] ${data_path} + ${session}= Create Session msb ${MSB_ENDPOINT} + ${resp}= Get Request msb ${data_path} + Should Be Equal As Integers ${resp.status_code} 200 + Log Received response from MSB ${resp.text} + [Return] ${resp} diff --git a/robot/resources/openstack/keystone_interface.robot b/robot/resources/openstack/keystone_interface.robot index 3c3de90c..e51e3db8 100644 --- a/robot/resources/openstack/keystone_interface.robot +++ b/robot/resources/openstack/keystone_interface.robot @@ -2,6 +2,7 @@ Documentation The main interface for interacting with Openstack Keystone API. It handles low level stuff like managing the authtoken and Openstack required fields Library OpenstackLibrary Library RequestsLibrary +Library HTTPUtils Library UUID Library Collections Library OperatingSystem @@ -20,12 +21,13 @@ Run Openstack Auth Request [Documentation] Runs an Openstack Auth Request and returns the token and service catalog. you need to include the token in future request's x-auth-token headers. Service catalog describes what can be called [Arguments] ${alias} ${username}= ${password}= ${username} ${password}= Set Openstack Credentials ${username} ${password} - ${session}= Create Session keystone ${GLOBAL_INJECTED_KEYSTONE} verify=True + ${url} ${path}= Get Keystone Url And Path + ${session}= Create Session keystone ${url} verify=True ${uuid}= Generate UUID ${data_template}= OperatingSystem.Get File ${OPENSTACK_KEYSTONE_AUTH_BODY_FILE} ${arguments}= Create Dictionary username=${username} password=${password} tenantId=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} ${data}= Fill JSON Template ${data_template} ${arguments} - ${data_path}= Catenate ${OPENSTACK_KEYSTONE_API_VERSION}${OPENSTACK_KEYSTONE_AUTH_PATH} + ${data_path}= Catenate ${path}${OPENSTACK_KEYSTONE_AUTH_PATH} ${headers}= Create Dictionary Accept=application/json Content-Type=application/json X-TransactionId=${GLOBAL_APPLICATION_ID}-${uuid} X-FromAppId=${GLOBAL_APPLICATION_ID} Log Sending authenticate post request ${data_path} with headers ${headers} and data ${data} ${resp}= Post Request keystone ${data_path} data=${data} headers=${headers} @@ -53,3 +55,12 @@ Set Openstack Credentials Get Openstack Credentials [Return] ${GLOBAL_INJECTED_OPENSTACK_USERNAME} ${GLOBAL_INJECTED_OPENSTACK_PASSWORD} + +Get Keystone Url And Path + [Documentation] Handle arbitrary keystone identiit url. Add v2.0 if not present. + ${pieces}= URL Parse ${GLOBAL_INJECTED_KEYSTONE} + ${url}= Catenate ${pieces.scheme}://${pieces.netloc} + ${version}= Evaluate '' + ${version}= Set Variable If '${OPENSTACK_KEYSTONE_API_VERSION}' not in '${pieces.path}' ${OPENSTACK_KEYSTONE_API_VERSION} ${version} + ${path}= Catenate ${pieces.path}${version} + [Return] ${url} ${path}
\ No newline at end of file diff --git a/robot/resources/openstack/nova_interface.robot b/robot/resources/openstack/nova_interface.robot index b36d09f1..2c9ec4c5 100644 --- a/robot/resources/openstack/nova_interface.robot +++ b/robot/resources/openstack/nova_interface.robot @@ -92,14 +92,14 @@ Add Server Add Server For Image Name [Documentation] Adds a server for the passed if - [Arguments] ${alias} ${name} ${imageName} ${flavorName} + [Arguments] ${alias} ${name} ${imageName} ${flavorName} ${public_net_id} ${images}= Get Openstack Images ${alias} ${flavors}= Get Openstack Flavors ${alias} ${images}= Get From Dictionary ${images} images ${flavors}= Get From Dictionary ${flavors} flavors ${imageRef}= Get Id For Name ${images} ${imageName} ${flavorRef}= Get Id For Name ${flavors} ${flavorName} - ${dict}= Create Dictionary name=${name} imageRef=${imageRef} flavorRef=${flavorRef} + ${dict}= Create Dictionary name=${name} imageRef=${imageRef} flavorRef=${flavorRef} public_net_id=${public_net_id} ${data}= Fill JSON Template File ${OPENSTACK_NOVA_SERVER_ADD_BODY_FILE} ${dict} ${resp}= Internal Post Openstack ${alias} ${GLOBAL_OPENSTACK_NOVA_SERVICE_TYPE} ${OPENSTACK_NOVA_SERVERS_PATH} data_path= data=${data} ${status_string}= Convert To String ${resp.status_code} diff --git a/robot/resources/portal_interface.robot b/robot/resources/portal_interface.robot index 29205292..e0049345 100644 --- a/robot/resources/portal_interface.robot +++ b/robot/resources/portal_interface.robot @@ -7,7 +7,7 @@ Library UUID Resource global_properties.robot *** Variables *** -${PORTAL_HEALTH_CHECK_PATH} /ECOMPPORTAL/portalApi/healthCheck +${PORTAL_HEALTH_CHECK_PATH} /ONAPPORTAL/portalApi/healthCheck ${PORTAL_ENDPOINT} ${GLOBAL_PORTAL_SERVER_PROTOCOL}://${GLOBAL_INJECTED_PORTAL_IP_ADDR}:${GLOBAL_PORTAL_SERVER_PORT} *** Keywords *** diff --git a/robot/resources/sdngc_interface.robot b/robot/resources/sdngc_interface.robot index d3606c17..50286444 100644 --- a/robot/resources/sdngc_interface.robot +++ b/robot/resources/sdngc_interface.robot @@ -83,7 +83,7 @@ Run SDNGC Delete Request Preload Vnf [Arguments] ${service_type_uuid} ${generic_vnf_name} ${generic_vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} - ${base_vf_module_type}= Catenate '' + ${base_vf_module_type}= Catenate ${closedloop_vf_module}= Create Dictionary ${templates}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${service} :for ${vf_module} in @{vf_modules} @@ -118,7 +118,7 @@ Preload One Vnf Topology Return From Keyword If '${filename}' == '' ${data_template}= OperatingSystem.Get File ${PRELOAD_VNF_TOPOLOGY_OPERATION_BODY}/preload.template ${parameters}= Get Template Parameters ${filename} ${uuid} - Set To Dictionary ${parameters} generic_vnf_name=${generic_vnf_name} generic_vnf_type=${generic_vnf_type} service_type=${service_type_uuid} vf_module_name=${vf_module_name} vf_module_type=${vf_module_type} uuid=${uuid} + Set To Dictionary ${parameters} generic_vnf_name=${generic_vnf_name} generic_vnf_type=${generic_vnf_type} service_type=${service_type_uuid} vf_module_name=${vf_module_name} vf_module_type=${vf_module_type} ${data}= Fill JSON Template ${data_template} ${parameters} ${put_resp}= Run SDNGC Post Request ${SDNGC_INDEX_PATH}${PRELOAD_VNF_TOPOLOGY_OPERATION_PATH} ${data} Should Be Equal As Strings ${put_resp.json()['output']['response-code']} 200 @@ -130,21 +130,44 @@ Get Template Parameters ${rest} ${suite}= Split String From Right ${SUITE NAME} . 1 ${uuid}= Catenate ${uuid} ${hostid}= Get Substring ${uuid} -4 - ${ecompnet}= Evaluate ${GLOBAL_BUILD_NUMBER}%255 + ${ecompnet}= Evaluate (${GLOBAL_BUILD_NUMBER}%128)+128 + + # Initialize the value map with the properties generated from the Robot VM /opt/config folder - ${valuemap}= Create Dictionary + ${valuemap}= Copy Dictionary ${GLOBAL_INJECTED_PROPERTIES} + + # These should be deprecated by the above.... Set To Dictionary ${valuemap} artifacts_version=${GLOBAL_INJECTED_ARTIFACTS_VERSION} Set To Dictionary ${valuemap} network=${GLOBAL_INJECTED_NETWORK} + Set To Dictionary ${valuemap} public_net_id=${GLOBAL_INJECTED_PUBLIC_NET_ID} + Set To Dictionary ${valuemap} cloud_env=${GLOBAL_INJECTED_CLOUD_ENV} + Set To Dictionary ${valuemap} install_script_version=${GLOBAL_INJECTED_SCRIPT_VERSION} + Set To Dictionary ${valuemap} vm_image_name=${GLOBAL_INJECTED_VM_IMAGE_NAME} + Set To Dictionary ${valuemap} vm_flavor_name=${GLOBAL_INJECTED_VM_FLAVOR} + + # update the value map with unique values. Set To Dictionary ${valuemap} uuid=${uuid} hostid=${hostid} ecompnet=${ecompnet} - ${parameters}= Create Dictionary - ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults - Resolve Values Into Dictionary ${valuemap} ${defaults} ${parameters} + + # + # Mash together the defaults dict with the test case dict to create the set of + # preload parameters + # ${suite_templates}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} ${suite} ${template}= Get From Dictionary ${suite_templates} ${template} - ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template} ${parameters} + ${defaults}= Get From Dictionary ${GLOBAL_PRELOAD_PARAMETERS} defaults + # add all of the defaults to template... + @{keys}= Get Dictionary Keys ${defaults} + :for ${key} in @{keys} + \ ${value}= Get From Dictionary ${defaults} ${key} + \ Set To Dictionary ${template} ${key} ${value} + + # + # Get the vnf_parameters to preload + # + ${vnf_parameters}= Resolve VNF Parameters Into Array ${valuemap} ${template} ${vnf_parameters_json}= Evaluate json.dumps(${vnf_parameters}) json - Set To Dictionary ${parameters} vnf_parameters=${vnf_parameters_json} + ${parameters}= Create Dictionary vnf_parameters=${vnf_parameters_json} [Return] ${parameters} Resolve Values Into Dictionary @@ -156,7 +179,7 @@ Resolve Values Into Dictionary \ Set To Dictionary ${to} ${key} ${value} Resolve VNF Parameters Into Array - [Arguments] ${valuemap} ${from} ${to} + [Arguments] ${valuemap} ${from} ${vnf_parameters}= Create List ${keys}= Get Dictionary Keys ${from} :for ${key} in @{keys} @@ -196,7 +219,7 @@ Login To SDNGC Admin GUI ## Setup Browser is now being managed by the test case ## Setup Browser Go To ${SDNGC_ADMIN_SIGNUP_URL} - Maximize Browser Window + ##Maximize Browser Window Set Selenium Speed ${GLOBAL_SELENIUM_DELAY} Set Browser Implicit Wait ${GLOBAL_SELENIUM_BROWSER_IMPLICIT_WAIT} Log Logging in to ${SDNGC_ADMIN_LOGIN_URL} diff --git a/robot/resources/stack_validation/validate_common.robot b/robot/resources/stack_validation/validate_common.robot index 24f9fe33..6c97fac1 100644 --- a/robot/resources/stack_validation/validate_common.robot +++ b/robot/resources/stack_validation/validate_common.robot @@ -32,7 +32,7 @@ Get Server Ip ${server_name}= Get From Dictionary ${stack_info} ${key_name} ${server}= Get From Dictionary ${server_list} ${server_name} Log Entering Get Openstack Server Ip - ${ip}= Get Openstack Server Ip ${server} network_name=${network_name} + ${ip}= Search Addresses ${server} ${network_name} Log Returned Get Openstack Server Ip [Return] ${ip} @@ -45,3 +45,58 @@ Find And Reboot The Server Reboot Server auth ${vfw_server_id} +Search Addresses + [Arguments] ${server} ${network_name} + ${addresses} Get From Dictionary ${server} addresses + ${status} ${server_ip}= Run Keyword And Ignore Error Find Rackspace ${addresses} ${network_name} + Return From Keyword If '${status}'=='PASS' ${server_ip} + ${status} ${server_ip}= Run Keyword And Ignore Error Find Openstack ${addresses} ${network_name} + Return From Keyword If '${status}'=='PASS' ${server_ip} + ${status} ${server_ip}= Run Keyword And Ignore Error Find Openstack 2 ${addresses} ${network_name} + Return From Keyword If '${status}'=='PASS' ${server_ip} + Fail ${server}/${network_name} Not Found + +Find Rackspace + [Arguments] ${addresses} ${network_name} + ${ips} Get From Dictionary ${addresses} ${network_name} + ${ip}= Get V4 IP ${ips} + [Return] ${ip} + +Find Openstack + [Arguments] ${addresses} ${network_name} + ${network_name}= Set Variable If '${network_name}' == 'public' external ${network_name} + ${ip}= Get V4 IP Openstack ${addresses} ${network_name} + [Return] ${ip} + +Find Openstack 2 + [Arguments] ${addresses} ${network_name} + ${network_name}= Set Variable If '${network_name}' == 'public' floating ${network_name} + ${ipmaps}= Get From Dictionary ${addresses} ${GLOBAL_INJECTED_NETWORK} + ${ip}= Get V4 IP Openstack 2 ${ipmaps} ${network_name} + [Return] ${ip} + +Get V4 IP + [Arguments] ${ipmaps} + :for ${ipmap} in @{ipmaps} + \ ${ip} Get From Dictionary ${ipmap} addr + \ ${version} Get From Dictionary ${ipmap} version + \ Return from Keyword if '${version}' == '4' ${ip} + Fail No Version 4 IP + +Get V4 IP Openstack + [Arguments] ${addresses} ${testtype} + ${ipmaps}= Get From Dictionary ${addresses} ${testtype} + :for ${ipmap} in @{ipmaps} + \ ${ip} Get From Dictionary ${ipmap} addr + \ ${version} Get From Dictionary ${ipmap} version + \ Return from Keyword if '${version}'=='4' ${ip} + Fail No Version 4 IP + +Get V4 IP Openstack 2 + [Arguments] ${ipmaps} ${testtype} + :for ${ipmap} in @{ipmaps} + \ ${type} Get From Dictionary ${ipmap} OS-EXT-IPS:type + \ ${ip} Get From Dictionary ${ipmap} addr + \ ${version} Get From Dictionary ${ipmap} version + \ Return from Keyword if '${version}'=='4' and '${type}'=='${testtype}' ${ip} + Fail No Version 4 IP diff --git a/robot/resources/stack_validation/validate_vfw.robot b/robot/resources/stack_validation/validate_vfw.robot index b0d591fb..e1627202 100644 --- a/robot/resources/stack_validation/validate_vfw.robot +++ b/robot/resources/stack_validation/validate_vfw.robot @@ -60,18 +60,18 @@ Wait For Packets Wait For Firewall [Documentation] Wait for the defined firewall processes to come up [Arguments] ${ip} - Wait for Process on Host ./vpp_measurement_reporter ${ip} + ##Wait for Process on Host ./vpp_measurement_reporter ${ip} Wait for Process on Host vpp -c /etc/vpp/startup.conf ${ip} Wait For Packet Generator [Documentation] Wait for the defined packet generator processes to come up [Arguments] ${ip} Wait for Process on Host vpp -c /etc/vpp/startup.conf ${ip} - Wait Until Keyword Succeeds 180s 5s Tail File on Host Until ${ip} Honeycomb /var/log/honeycomb/honeycomb.log - Honeycomb initialized options=-c +0 timeout=120s + ##Wait Until Keyword Succeeds 180s 5s Tail File on Host Until ${ip} Honeycomb /var/log/honeycomb/honeycomb.log - Honeycomb initialized options=-c +0 timeout=120s Run Keyword And Ignore Error Wait for Process on Host run_traffic_fw_demo.sh ${ip} timeout=60s Pkill Process On Host "/bin/bash ./run_traffic_fw_demo.sh" ${ip} Wait For Packet Sink [Documentation] Wait for the defined packet sink processes to come up [Arguments] ${ip} - Log noting to check on ${ip} + Wait for Process on Host /usr/sbin/darkstat ${ip} diff --git a/robot/resources/test_templates/closedloop_test_template.robot b/robot/resources/test_templates/closedloop_test_template.robot index 6930e56d..1a136130 100644 --- a/robot/resources/test_templates/closedloop_test_template.robot +++ b/robot/resources/test_templates/closedloop_test_template.robot @@ -192,7 +192,7 @@ Orchestrate VNF vFW closedloop [Documentation] VNF Orchestration for vFW Log VNF Orchestration flow TEST NAME=${TEST NAME} Setup Orchestrate VNF ${GLOBAL_AAI_CLOUD_OWNER} SharedNode OwnerType v1 CloudZone - ${stack_name} ${service}= Orchestrate VNF ETE_CLP vFW vFW ${TENANT_NAME} + ${stack_name} ${service}= Orchestrate VNF ETE_CLP vFWCL vFWCL ${TENANT_NAME} [Return] ${stack_name} Orchestrate VNF vDNS closedloop diff --git a/robot/resources/test_templates/model_test_template.robot b/robot/resources/test_templates/model_test_template.robot index c27b3014..98b3b1cf 100644 --- a/robot/resources/test_templates/model_test_template.robot +++ b/robot/resources/test_templates/model_test_template.robot @@ -3,6 +3,7 @@ Documentation The main interface for interacting with ASDC. It handles low l Library OperatingSystem Library ArchiveLibrary Library Collections +Library String Resource ../asdc_interface.robot Variables ../../assets/service_mappings.py @@ -10,7 +11,7 @@ Variables ../../assets/service_mappings.py *** Variables *** ${ASDC_BASE_PATH} /sdc1 ${ASDC_DESIGNER_PATH} /proxy-designer1#/dashboard -${ASDC_ASSETS_DIRECTORY} robot/assets/asdc +${ASDC_ASSETS_DIRECTORY} ${GLOBAL_HEAT_TEMPLATES_FOLDER} ${ASDC_ZIP_DIRECTORY} ${ASDC_ASSETS_DIRECTORY}/temp #***************** Test Case Variables ********************* @@ -24,15 +25,17 @@ Model Distribution For Directory ${directory_list}= Get From Dictionary ${GLOBAL_SERVICE_FOLDER_MAPPING} ${service} ${ziplist}= Create List :for ${directory} in @{directory_list} - \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${directory}.zip + \ ${zipname}= Replace String ${directory} / _ + \ ${zip}= Catenate ${ASDC_ZIP_DIRECTORY}/${zipname}.zip \ ${folder}= Catenate ${ASDC_ASSETS_DIRECTORY}/${directory} \ OperatingSystem.Create Directory ${ASDC_ASSETS_DIRECTORY}/temp \ Create Zip From Files In Directory ${folder} ${zip} \ Append To List ${ziplist} ${zip} - ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} Distribute Model From ASDC ${ziplist} ${catalog_service_name} + ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resource_ids} ${catalog_service_id} ${catalog_resources} Distribute Model From ASDC ${ziplist} ${catalog_service_name} Set Test Variable ${CATALOG_RESOURCE_IDS} ${catalog_resource_ids} Set Test Variable ${CATALOG_SERVICE_ID} ${catalog_service_id} - [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} + Set Test Variable ${CATALOG_RESOURCES} ${catalog_resources} + [Return] ${catalog_service_name} ${catalog_resource_name} ${vf_modules} ${catalog_resources} diff --git a/robot/resources/test_templates/vnf_orchestration_test_template.robot b/robot/resources/test_templates/vnf_orchestration_test_template.robot index ed847c21..807647db 100644 --- a/robot/resources/test_templates/vnf_orchestration_test_template.robot +++ b/robot/resources/test_templates/vnf_orchestration_test_template.robot @@ -9,7 +9,9 @@ Resource ../vid/teardown_vid.robot Resource ../sdngc_interface.robot Resource model_test_template.robot +Resource ../aai/create_zone.robot Resource ../aai/create_customer.robot +Resource ../aai/create_complex.robot Resource ../aai/create_tenant.robot Resource ../aai/create_service.robot Resource ../openstack/neutron_interface.robot @@ -31,6 +33,7 @@ ${TENANT_ID} ${REGIONS} ${CUSTOMER_NAME} ${STACK_NAME} +${STACK_NAMES} ${SERVICE} ${VVG_SERVER_ID} ${SERVICE_INSTANCE_ID} @@ -49,37 +52,82 @@ Orchestrate VNF ${uuid}= Generate UUID Set Test Variable ${CUSTOMER_NAME} ${customer_name}_${uuid} Set Test Variable ${SERVICE} ${service} - ${vnf_name}= Catenate Vnf_Ete_Name${uuid} + ${list}= Create List + Set Test Variable ${STACK_NAMES} ${list} ${service_name}= Catenate Service_Ete_Name${uuid} ${service_type}= Set Variable ${service} - ${vf_module_name}= Catenate Vfmodule_Ete_Name${uuid} - ${service_model_type} ${vnf_type} ${vf_modules} = Model Distribution For Directory ${service} + ${service_model_type} ${vnf_type} ${vf_modules} ${catalog_resources}= Model Distribution For Directory ${service} Run Keyword If '${service}' == 'vVG' Create VVG Server ${uuid} Create Customer For VNF ${CUSTOMER_NAME} ${CUSTOMER_NAME} INFRA ${service_type} ${GLOBAL_AAI_CLOUD_OWNER} Setup Browser Login To VID GUI - ${service_instance_id}= Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} + ${service_instance_id}= Wait Until Keyword Succeeds 300s 5s Create VID Service Instance ${customer_name} ${service_model_type} ${service} ${service_name} Set Test Variable ${SERVICE_INSTANCE_ID} ${service_instance_id} Validate Service Instance ${service_instance_id} ${service} ${customer_name} - Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} - ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_modules} ${service} ${uuid} - ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant} ${vf_module_type} - ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id} - VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module} - Set Test Variable ${STACK_NAME} ${vf_module_name} - Execute Heatbridge ${vf_module_name} ${service_instance_id} ${service} - Validate VF Module ${vf_module_name} ${service} + ${vnflist}= Get From Dictionary ${GLOBAL_SERVICE_VNF_MAPPING} ${service} + :for ${vnf} in @{vnflist} + \ ${vnf_name}= Catenate Ete_${vnf}_${uuid} + \ ${vf_module_name}= Catenate Vfmodule_Ete_${vnf}_${uuid} + \ ${vnf_type}= Get VNF Type ${catalog_resources} ${vnf} + \ ${vf_module}= Get VF Module ${catalog_resources} ${vnf} + \ Append To List ${STACK_NAMES} ${vf_module_name} + \ Wait Until Keyword Succeeds 300s 5s Create VID VNF ${service_instance_id} ${vnf_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${CUSTOMER_NAME} + \ ${vf_module_type} ${closedloop_vf_module}= Preload Vnf ${service_instance_id} ${vnf_name} ${vnf_type} ${vf_module_name} ${vf_module} ${vnf} ${uuid} + \ ${vf_module_id}= Create VID VNF module ${service_instance_id} ${vf_module_name} ${lcp_region} ${tenant} ${vf_module_type} ${CUSTOMER_NAME} ${vnf_name} + \ ${generic_vnf}= Validate Generic VNF ${vnf_name} ${vnf_type} ${service_instance_id} + \ VLB Closed Loop Hack ${service} ${generic_vnf} ${closedloop_vf_module} + \ Set Test Variable ${STACK_NAME} ${vf_module_name} + \ Append To List ${STACK_NAMES} ${STACK_NAME} + \ Execute Heatbridge ${vf_module_name} ${service_instance_id} ${vnf} + \ Validate VF Module ${vf_module_name} ${vnf} [Return] ${vf_module_name} ${service} +Get VNF Type + [Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI + [Arguments] ${resources} ${vnf} + ${cr}= Get Catalog Resource ${resources} ${vnf} + ${vnf_type}= Get From Dictionary ${cr} name + [Return] ${vnf_type} + +Get VF Module + [Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI + [Arguments] ${resources} ${vnf} + ${cr}= Get Catalog Resource ${resources} ${vnf} + ${vf_module}= Find Element In Array ${cr['groups']} type org.openecomp.groups.VfModule + [Return] ${vf_module} + +Get Catalog Resource + [Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI + [Arguments] ${resources} ${vnf} + + ${base_name}= Get Name Pattern ${vnf} + ${keys}= Get Dictionary Keys ${resources} + + :for ${key} in @{keys} + \ ${cr}= Get From Dictionary ${resources} ${key} + \ Return From Keyword If '${base_name}' in '${cr['allArtifacts']['heat1']['artifactDisplayName']}' ${cr} + Fail Unable to find catalog resource for ${vnf} ${base_name} + +Get Name Pattern + [Documentation] To support services with multiple VNFs, we need to dig the vnf type out of the SDC catalog resources to select in the VID UI + [Arguments] ${vnf} + ${list}= Get From Dictionary ${GLOBAL_SERVICE_TEMPLATE_MAPPING} ${vnf} + :for ${dict} in @{list} + \ ${base_name}= Get From Dictionary ${dict} name_pattern + \ Return From Keyword If '${dict['isBase']}' == 'true' ${base_name} + Fail Unable to locate base name pattern + + + Create Customer For VNF [Documentation] VNF Orchestration Test setup.... ... Create Tenant if not exists, Create Customer, Create Service and related relationships [Arguments] ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id}= Get Openstack Region + Create Service If Not Exists ${service_type} ${resp}= Create Customer ${customer_name} ${customer_id} ${customer_type} ${service_type} ${cloud_owner} ${cloud_region_id} ${TENANT_ID} Should Be Equal As Strings ${resp} 201 - Create Service If Not Exists ${service_type} Setup Orchestrate VNF [Documentation] Called before each test case to ensure tenant and region data @@ -89,6 +137,8 @@ Setup Orchestrate VNF Initialize Regions From Openstack :FOR ${region} IN @{REGIONS} \ Inventory Tenant If Not Exists ${cloud_owner} ${region} ${cloud_type} ${owner_defined_type} ${cloud_region_version} ${cloud_zone} ${TENANT_ID} ${TENANT_NAME} + Inventory Zone If Not Exists + Inventory Complex If Not Exists ${GLOBAL_AAI_COMPLEX_NAME} ${GLOBAL_AAI_PHYSICAL_LOCATION_ID} ${GLOBAL_AAI_CLOUD_OWNER} ${GLOBAL_INJECTED_REGION} ${GLOBAL_AAI_CLOUD_OWNER_DEFINED_TYPE} Log Orchestrate VNF setup complete Initialize Tenant From Openstack @@ -111,7 +161,7 @@ Create VVG Server [Arguments] ${uuid} Run Openstack Auth Request auth ${vvg_server_name}= Catenate vVG_${uuid} - ${server}= Add Server For Image Name auth ${vvg_server_name} ${GLOBAL_VVGSERVER_IMAGE} ${GLOBAL_VVGSERVER_FLAVOR} + ${server}= Add Server For Image Name auth ${vvg_server_name} ${GLOBAL_INJECTED_VM_IMAGE_NAME} ${GLOBAL_INJECTED_VM_FLAVOR} ${GLOBAL_INJECTED_PUBLIC_NET_ID} ${server}= Get From Dictionary ${server} server ${server_id}= Get From Dictionary ${server} id Set Test Variable ${VVG_SERVER_ID} ${server_id} @@ -131,7 +181,7 @@ Delete VNF ${lcp_region}= Get Openstack Region Teardown VVG Server Teardown VLB Closed Loop Hack - Teardown VID ${SERVICE_INSTANCE_ID} ${lcp_region} ${TENANT_ID} + Teardown VID ${SERVICE_INSTANCE_ID} ${lcp_region} ${TENANT_NAME} ${CUSTOMER_NAME} Log VNF Deleted Teardown VNF diff --git a/robot/resources/vid/create_service_instance.robot b/robot/resources/vid/create_service_instance.robot index 6c7f8a03..00fafeac 100644 --- a/robot/resources/vid/create_service_instance.robot +++ b/robot/resources/vid/create_service_instance.robot @@ -22,11 +22,12 @@ Create VID Service Instance Wait Until Page Contains Element xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} Wait Until Element Is Visible xpath=//input[@parameter-name='Instance Name'] ${GLOBAL_VID_UI_TIMEOUT_LONG} Xpath Should Match X Times //input[@parameter-name='Instance Name'] 1 - Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} - Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} + Wait Until Keyword Succeeds 120s 5s Input Text When Enabled //input[@parameter-name='Instance Name'] ${service_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + Select From List When Enabled //select[@prompt='Select Subscriber Name'] ${customer_name} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Select From List WHen Enabled //select[@prompt='Select Service Type'] ${service_type} timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Confirm'] - Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + Page Should Contain "requestState": "COMPLETE" ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Click On Button When Enabled //div[@class = 'buttonRow']/button[text() = 'Close'] ${request_id}= Parse Request Id ${response text} diff --git a/robot/resources/vid/create_vid_vnf.robot b/robot/resources/vid/create_vid_vnf.robot index 2db24219..41737627 100644 --- a/robot/resources/vid/create_vid_vnf.robot +++ b/robot/resources/vid/create_vid_vnf.robot @@ -14,22 +14,24 @@ Resource vid_interface.robot Create VID VNF [Documentation] Creates a VNF instance using VID for passed instance id with the passed service instance name - [Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} + [Arguments] ${service_instance_id} ${service_instance_name} ${product_family} ${lcp_region} ${tenant} ${vnf_type} ${customer} Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) - Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} - Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id + #Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} + #Select From List By Label //select[@ng-model='selectedserviceinstancetype'] Service Instance Id + Select From List By Label //select[@ng-model='selectedCustomer'] ${customer} Click Button button=Submit Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element xpath=//a[contains(text(), 'View/Edit')] Wait Until Page Contains View/Edit Service Instance timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element button=Add VNF - + #01681d02-2304-4c91-ab2d 0 # This is where firefox breaks. Th elink never becomes visible when run with the script. - Click Element link=${vnf_type} + ${dataTestsId}= Catenate AddVNFOption-${vnf_type} + Click Element xpath=//a[contains(text(), '${vnf_type}')] Wait Until Page Contains Element xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} Wait Until Element Is Enabled xpath=//input[@parameter-id='instanceName'] ${GLOBAL_VID_UI_TIMEOUT_SHORT} @@ -41,7 +43,7 @@ Create VID VNF Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} Click Element button=Confirm - Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Status: OK (200) timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} + Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestState timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] Should Not Contain ${response text} FAILED Click Element button=Close @@ -79,14 +81,15 @@ Delete VID VNF Poll MSO Get Request ${GLOBAL_MSO_STATUS_PATH}${request_id} COMPLETE Create VID VNF module - [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} + [Arguments] ${service_instance_id} ${vf_module_name} ${lcp_region} ${TENANT} ${VNF_TYPE} ${customer} ${vnf_name} Go To VID HOME Click Link xpath=//div[@heading = 'Search for Existing Service Instances']/a Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Wait Until Page Contains Element xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) - Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} + Select From List By Label //select[@ng-model='selectedCustomer'] ${customer} + ###Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} Click Button button=Submit Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Click Element link=View/Edit @@ -95,7 +98,7 @@ Create VID VNF module #Wait Until Page Contains Element xpath=//div[@class='statusLine'] timeout=120s #Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=120s #Wait Until Element Is Visible button=Add VF-Module timeout=120s - Click Element button=Add VF-Module + Click Element xpath=//div[contains(.,'${vnf_name}')]/div/button[contains(.,'Add VF-Module')] # This is where firefox breaks. Th elink never becomes visible when run with the script. Click Element link=${vnf_type} @@ -108,6 +111,7 @@ Create VID VNF module Input Text xpath=//input[@parameter-id='instanceName'] ${vf_module_name} Select From List By Label xpath=//select[@parameter-id='lcpRegion'] ${lcp_region} Select From List By Label xpath=//select[@parameter-id='tenant'] ${tenant} + Select Checkbox xpath=//input[@parameter-id='sdncPreload'] Click Element button=Confirm Wait Until Element Contains xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] requestId timeout=${GLOBAL_VID_UI_TIMEOUT_LONG} ${response text}= Get Text xpath=//div[@ng-controller= 'msoCommitController']/pre[@class = 'log ng-binding'] diff --git a/robot/resources/vid/teardown_vid.robot b/robot/resources/vid/teardown_vid.robot index df40b9ea..3a0697ec 100644 --- a/robot/resources/vid/teardown_vid.robot +++ b/robot/resources/vid/teardown_vid.robot @@ -12,24 +12,29 @@ Resource create_service_instance.robot *** Variables *** ${VID_ENV} /vid ${VID_SERVICE_MODELS_SEARCH_URL} ${GLOBAL_VID_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VID_IP_ADDR}:${GLOBAL_VID_SERVER_PORT}${VID_ENV}/serviceModels.htm#/instances/services +${TEARDOWN_STATUS} FAIL + *** Keywords *** Teardown VID [Documentation] Teardown the VID This assumes that the any runnign stacks have been torn down - [Arguments] ${service_instance_id} ${lcp_region} ${tenant} + [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer} Return From Keyword If len('${service_instance_id}') == 0 # Keep going to the VID service instance until we get the pop-up alert that there is no service instance - Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant} + Set Test Variable ${TEARDOWN_STATUS} FAIL + Wait Until Keyword Succeeds 300s 1s Delete VID ${service_instance_id} ${lcp_region} ${tenant} ${customer} + Return From Keyword If '${TEARDOWN_STATUS}' == 'PASS' + Fail ${TEARDOWN_STATUS} Delete VID [Documentation] Teardown the next VID entity that has a Remove icon. - [Arguments] ${service_instance_id} ${lcp_region} ${tenant} + [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${customer} # For vLB closed loop, we may have 2 vf modules and the vDNS one needs to be removed first. ${remove_order}= Create List vDNS_Ete Vfmodule_Ete # FAIL status is returned in ${vfmodule} because FAIL are ignored during teardown - ${status} ${vfmodule}= Run Keyword and Ignore Error Delete Next VID Entity ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} + ${status} ${vfmodule}= Run Keyword and Ignore Error Delete Next VID Entity ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} ${customer} Return From Keyword If '${status}' == 'FAIL' Return From Keyword If '${vfmodule}' == 'FAIL' # After tearing down a VF module, execute the reverse HB for it to remove the references from A&AI @@ -38,7 +43,7 @@ Delete VID Delete Next VID Entity [Documentation] Teardown the next VID entity that has a Remove icon. - [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} + [Arguments] ${service_instance_id} ${lcp_region} ${tenant} ${remove_order} ${customer} ${vfmodule}= Catenate Go To ${VID_SERVICE_MODELS_SEARCH_URL} Wait Until Page Contains Please search by timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} @@ -46,14 +51,17 @@ Delete Next VID Entity Wait Until Element Is Not Visible xpath=//div[@class='statusLine aaiHidden'] timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} # If we don't wait for this control to be enabled, the submit results in a 'not found' pop-up (UnexpectedAlertPresentException) - Input Text When Enabled //input[@name='selectedServiceInstance'] ${service_instance_id} + Select From List By Label //select[@ng-model='selectedCustomer'] ${customer} + Click Button button=Submit # When Handle alert detects a pop-up. it will return FAIL and we are done # Return from Keyword is required because FAIL is inored during teardown + Set Test Variable ${TEARDOWN_STATUS} PASS ${status} ${value} Run Keyword And Ignore Error Handle Alert Return From Keyword If '${status}' == 'FAIL' ${status} ${status} ${value} Run Keyword And Ignore Error Wait Until Page Contains Element link=View/Edit timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM} Return From Keyword If '${status}' == 'FAIL' ${status} + Set Test Variable ${TEARDOWN_STATUS} FAIL Click Element link=View/Edit diff --git a/robot/testsuites/demo.robot b/robot/testsuites/demo.robot index 74a78d45..4c99f451 100644 --- a/robot/testsuites/demo.robot +++ b/robot/testsuites/demo.robot @@ -2,12 +2,18 @@ Documentation Executes the VNF Orchestration Test cases including setup and teardown ... Library Collections +Library HTTPUtils Resource ../resources/demo_preload.robot *** Variables *** ${VNF_NAME} DemoVNF ${MODULE_NAME} DemoModuleName +${HB_STACK} +${HB_SERVICE_INSTANCE_ID} +${HB_SERVICE} + + *** Test Cases *** Initialize Customer And Models [Tags] InitDemo @@ -42,3 +48,9 @@ Delete Instantiated VNF Delete VNF [Teardown] Teardown VNF +Run Heatbridge + [Documentation] + ... Try to run heatbridge + [Tags] heatbridge + Execute Heatbridge ${HB_STACK} ${HB_SERVICE_INSTANCE_ID} ${HB_SERVICE} + diff --git a/robot/testsuites/health-check.robot b/robot/testsuites/health-check.robot index d27c38e5..ec0748ec 100644 --- a/robot/testsuites/health-check.robot +++ b/robot/testsuites/health-check.robot @@ -14,6 +14,8 @@ Resource ../resources/appc_interface.robot Resource ../resources/portal_interface.robot Resource ../resources/mr_interface.robot Resource ../resources/aaf_interface.robot +Resource ../resources/msb_interface.robot +Resource ../resources/clamp_interface.robot *** Test Cases *** Basic DCAE Health Check @@ -55,3 +57,83 @@ Basic Message Router Health Check Basic VID Health Check [Tags] health Run VID Health Check + +Basic Microservice Bus Health Check + [Tags] health + Run MSB Health Check + +Basic CLAMP Health Check + [Tags] health + Run CLAMP Health Check + +catalog API Health Check + [Tags] health + Run MSB Get Request /api/catalog/v1/swagger.json + +emsdriver API Health Check + [Tags] health + Run MSB Get Request /api/emsdriver/v1/swagger.json + +gvnfmdriver API Health Check + [Tags] health + Run MSB Get Request /api/gvnfmdriver/v1/swagger.json + +huaweivnfmdriver API Health Check + [Tags] health + Run MSB Get Request /api/huaweivnfmdriver/v1/swagger.json + +multicloud API Health Check + [Tags] health + Run MSB Get Request /api/multicloud/v0/swagger.json + +multicloud-ocata API Health Check + [Tags] health + Run MSB Get Request /api/multicloud-ocata/v0/swagger.json + +multicloud-titanium_cloud API Health Check + [Tags] health + Run MSB Get Request /api/multicloud-titanium_cloud/v0/swagger.json + +multicloud-vio API Health Check + [Tags] health + Run MSB Get Request /api/multicloud-vio/v0/swagger.json + +nokiavnfmdriver API Health Check + [Tags] health + Run MSB Get Request /api/nokiavnfmdriver/v1/swagger.json + +nslcm API Health Check + [Tags] health + Run MSB Get Request /api/nslcm/v1/swagger.json + +resmgr API Health Check + [Tags] health + Run MSB Get Request /api/resmgr/v1/swagger.json + +usecaseui-gui API Health Check + [Tags] health + Run MSB Get Request /iui/usecase-ui/ + +vnflcm API Health Check + [Tags] health + Run MSB Get Request /api/vnflcm/v1/swagger.json + +vnfmgr API Health Check + [Tags] health + Run MSB Get Request /api/vnfmgr/v1/swagger.json + +vnfres API Health Check + [Tags] health + Run MSB Get Request /api/vnfres/v1/swagger.json + +workflow API Health Check + [Tags] health + Run MSB Get Request /api/workflow/v1/swagger.json + +ztesdncdriver API Health Check + [Tags] health + Run MSB Get Request /api/ztesdncdriver/v1/swagger.json + +ztevmanagerdriver API Health Check + [Tags] health + Run MSB Get Request /api/ztevmanagerdriver/v1/swagger.json diff --git a/robot/testsuites/model-distribution.robot b/robot/testsuites/model-distribution.robot index 5f0c597d..ad51202d 100644 --- a/robot/testsuites/model-distribution.robot +++ b/robot/testsuites/model-distribution.robot @@ -18,7 +18,5 @@ Distribute vFW Model vFW [Tags] ete distribute Distribute vVG Model vVG [Tags] ete distribute -Distribute vIMS Model vIMS - [Tags] ete distribute Distribute vCPE Model vCPE [Tags] ete distribute
\ No newline at end of file diff --git a/robot/testsuites/update_onap_page.robot b/robot/testsuites/update_onap_page.robot index d4eb6162..b7c3b285 100644 --- a/robot/testsuites/update_onap_page.robot +++ b/robot/testsuites/update_onap_page.robot @@ -8,12 +8,12 @@ Resource ../resources/openstack/keystone_interface.robot Resource ../resources/openstack/nova_interface.robot -Test Timeout 1 minutes +Test Timeout 5 minutes *** Variables *** ${URLS_HTML_TEMPLATE} robot/assets/templates/web/index.html.template - +${HOSTS_PREFIX} vm ${WEB_USER} test ${WEB_PASSWORD} @@ -29,19 +29,22 @@ Update ONAP Page ${server_map}= Get Openstack Servers auth ${oam_ip_map}= Create Dictionary Set To Dictionary ${oam_ip_map} 10.0.0.1=onapdns - Set To Dictionary ${oam_ip_map} 10.0.1.1=aai - Set To Dictionary ${oam_ip_map} 10.0.2.1=appc - Set To Dictionary ${oam_ip_map} 10.0.3.1=sdc - Set To Dictionary ${oam_ip_map} 10.0.4.1=dcae_controller + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_AAI1_IP_ADDR}=aai1 + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_AAI2_IP_ADDR}=aai2 + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_APPC_IP_ADDR}=appc + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_DCAE_IP_ADDR}=dcae_controller + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_SO_IP_ADDR}=mso + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_MR_IP_ADDR}=message_router + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_POLICY_IP_ADDR}=policy + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_PORTAL_IP_ADDR}=portal + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_SDC_IP_ADDR}=sdc + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_SDNC_IP_ADDR}=sdnc + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_OPENO_IP_ADDR}=openo + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_CLAMP_IP_ADDR}=clamp + Set To Dictionary ${oam_ip_map} ${GLOBAL_INJECTED_VID_IP_ADDR}=vid Set To Dictionary ${oam_ip_map} 10.0.4.105=dcae_cdap Set To Dictionary ${oam_ip_map} 10.0.4.102=dcae_coll - Set To Dictionary ${oam_ip_map} 10.0.5.1=mso - Set To Dictionary ${oam_ip_map} 10.0.6.1=policy - Set To Dictionary ${oam_ip_map} 10.0.7.1=sdnc - Set To Dictionary ${oam_ip_map} 10.0.8.1=vid - Set To Dictionary ${oam_ip_map} 10.0.9.1=portal Set To Dictionary ${oam_ip_map} 10.0.10.1=robot - Set To Dictionary ${oam_ip_map} 10.0.11.1=message_router ${values}= Create Dictionary ${keys}= Get Dictionary Keys ${oam_ip_map} @@ -50,6 +53,17 @@ Update ONAP Page \ Set Public Ip ${server_map} ${oam_ip} ${value_name} ${values} Log ${values} Run Keyword If '${WEB_PASSWORD}' != '' Create File ${CREDENTIALS_FILE} ${WEB_USER}:${WEB_PASSWORD} + Set To Dictionary ${values} GLOBAL_INJECTED_ARTIFACTS_VERSION=${GLOBAL_INJECTED_ARTIFACTS_VERSION} + Set To Dictionary ${values} GLOBAL_INJECTED_NETWORK=${GLOBAL_INJECTED_NETWORK} + Set To Dictionary ${values} GLOBAL_INJECTED_NEXUS_DOCKER_REPO=${GLOBAL_INJECTED_NEXUS_DOCKER_REPO} + Set To Dictionary ${values} GLOBAL_INJECTED_NEXUS_REPO=${GLOBAL_INJECTED_NEXUS_REPO} + Set To Dictionary ${values} GLOBAL_INJECTED_OPENSTACK_TENANT_ID=${GLOBAL_INJECTED_OPENSTACK_TENANT_ID} + Set To Dictionary ${values} GLOBAL_INJECTED_REGION=${GLOBAL_INJECTED_REGION} + Set To Dictionary ${values} GLOBAL_INJECTED_KEYSTONE=${GLOBAL_INJECTED_KEYSTONE} + Set To Dictionary ${values} GLOBAL_INJECTED_VM_FLAVOR=${GLOBAL_INJECTED_VM_FLAVOR} + Set To Dictionary ${values} GLOBAL_INJECTED_VM_IMAGE_NAME=${GLOBAL_INJECTED_VM_IMAGE_NAME} + Set To Dictionary ${values} GLOBAL_INJECTED_PUBLIC_NET_ID=${GLOBAL_INJECTED_PUBLIC_NET_ID} + Set To Dictionary ${values} prefix=${HOSTS_PREFIX} Create File From Template ${URLS_HTML_TEMPLATE} ${URLS_HTML} ${values} *** Keywords *** @@ -70,12 +84,22 @@ Get Public Ip ${servers} Get Dictionary Values ${server_map} :for ${server} in @{servers} \ ${status} ${public_ip} Run Keyword And Ignore Error Search Addresses ${server} ${oam_ip} - \ Return From Keyword If '${status}' == 'PASS' ${public_ip} + \ Return From Keyword If '${status}'=='PASS' ${public_ip} Fail ${oam_ip} Server Not Found Search Addresses [Arguments] ${server} ${oam_ip} ${addresses} Get From Dictionary ${server} addresses + ${status} ${public_ip}= Run Keyword And Ignore Error Find Rackspace ${addresses} ${oam_ip} + Return From Keyword If '${status}'=='PASS' ${public_ip} + ${status} ${public_ip}= Run Keyword And Ignore Error Find Openstack ${addresses} ${oam_ip} + Return From Keyword If '${status}'=='PASS' ${public_ip} + ${status} ${public_ip}= Run Keyword And Ignore Error Find Openstack 2 ${addresses} ${oam_ip} + Return From Keyword If '${status}'=='PASS' ${public_ip} + Fail ${oam_ip} Server Not Found + +Find Rackspace + [Arguments] ${addresses} ${oam_ip} ${public_ips} Get From Dictionary ${addresses} public ${public_ip}= Get V4 IP ${public_ips} ${oam_ips} Get From Dictionary ${addresses} ${GLOBAL_INJECTED_NETWORK} @@ -83,10 +107,43 @@ Search Addresses Return From Keyword If '${this_oam_ip}' == '${oam_ip}' ${public_ip} Fail ${oam_ip} Server Not Found +Find Openstack + [Arguments] ${addresses} ${oam_ip} + ${public_ip}= Get V4 IP Openstack ${addresses} external + ${this_oam_ip}= Get V4 IP Openstack ${addresses} ${GLOBAL_INJECTED_NETWORK} + Return From Keyword If '${this_oam_ip}'=='${oam_ip}' ${public_ip} + Fail ${oam_ip} Server Not Found + +Find Openstack 2 + [Arguments] ${addresses} ${oam_ip} + ${ipmaps}= Get From DIctionary ${addresses} ${GLOBAL_INJECTED_NETWORK} + ${public_ip}= Get V4 IP Openstack 2 ${ipmaps} floating + ${this_oam_ip}= Get V4 IP Openstack 2 ${ipmaps} fixed + Return From Keyword If '${this_oam_ip}'=='${oam_ip}' ${public_ip} + Fail ${oam_ip} Server Not Found + Get V4 IP [Arguments] ${ipmaps} :for ${ipmap} in @{ipmaps} \ ${ip} Get From Dictionary ${ipmap} addr \ ${version} Get From Dictionary ${ipmap} version \ Return from Keyword if '${version}' == '4' ${ip} + Fail No Version 4 IP + +Get V4 IP Openstack + [Arguments] ${addresses} ${testtype} + ${ipmaps}= Get From Dictionary ${addresses} ${testtype} + :for ${ipmap} in @{ipmaps} + \ ${ip} Get From Dictionary ${ipmap} addr + \ ${version} Get From Dictionary ${ipmap} version + \ Return from Keyword if '${version}'=='4' ${ip} + Fail No Version 4 IP + +Get V4 IP Openstack 2 + [Arguments] ${ipmaps} ${testtype} + :for ${ipmap} in @{ipmaps} + \ ${type} Get From Dictionary ${ipmap} OS-EXT-IPS:type + \ ${ip} Get From Dictionary ${ipmap} addr + \ ${version} Get From Dictionary ${ipmap} version + \ Return from Keyword if '${version}'=='4' and '${type}'=='${testtype}' ${ip} Fail No Version 4 IP
\ No newline at end of file diff --git a/robot/testsuites/vnf-orchestration.robot b/robot/testsuites/vnf-orchestration.robot index d7ae16fa..2c340a39 100644 --- a/robot/testsuites/vnf-orchestration.robot +++ b/robot/testsuites/vnf-orchestration.robot @@ -9,12 +9,13 @@ Test Template Orchestrate VNF Template Test Teardown Teardown VNF *** Test Cases *** CUSTOMER SERVICE PRODUCT_FAMILY TENANT -Instantiate Virtual Firewall ETE_Customer vFW vFW ${TENANT_NAME} - [Tags] ete instantiate Instantiate Virtual DNS ETE_Customer vLB vLB ${TENANT_NAME} [Tags] ete instantiate Instantiate Virtual Volume Group ETE_Customer vVG vVG ${TENANT_NAME} [Tags] ete instantiate +Instantiate Virtual FirewallCL ETE_Customer vFWCL vFWCL ${TENANT_NAME} + [Tags] ete instantiate +Instantiate Virtual Firewall ETE_Customer vFW vFW ${TENANT_NAME} |