Update test/deploy scripts 52/68452/2
authorKaspars Skels <kaspars.skels@att.com>
Fri, 6 Sep 2019 22:52:10 +0000 (17:52 -0500)
committerKaspars Skels <kaspars.skels@att.com>
Fri, 6 Sep 2019 22:56:40 +0000 (17:56 -0500)
Change-Id: Ia53ec842c5b56f9cc9e42f88ceaf7b45171dd8e6
Signed-off-by: Kaspars Skels <kaspars.skels@att.com>
tools/deploy.sh
tools/files/heat-public-net-deployment.yaml [new file with mode: 0644]
tools/test.sh

index aa04b2c..f1c96a1 100755 (executable)
@@ -139,6 +139,12 @@ site_action() {
   sudo -E treasuremap/tools/gate/wait-for-shipyard.sh
 }
 
+create_public_network() {
+  export OS_AUTH_URL=${OS_AUTH_URL:-http://identity-airship.intel-pod17.opnfv.org:80/v3}
+  sudo -E treasuremap/tools/openstack stack create --wait \
+    -t /target/airship/tools/files/heat-public-net-deployment.yaml \
+    public-network
+}
 
 case "$1" in
 'deploy_site')
@@ -148,6 +154,7 @@ case "$1" in
   promenade_bundle
   genesis_deploy
   site_action $1
+  create_public_network
   ;;
 'update_site')
   clone_repos
diff --git a/tools/files/heat-public-net-deployment.yaml b/tools/files/heat-public-net-deployment.yaml
new file mode 100644 (file)
index 0000000..5309d1a
--- /dev/null
@@ -0,0 +1,70 @@
+heat_template_version: ocata
+
+parameters:
+  network_name:
+    type: string
+    default: public
+
+  physical_network_name:
+    type: string
+    default: public
+
+  physical_network_interface:
+    type: string
+    default: external
+
+  subnet_name:
+    type: string
+    default: public
+
+  subnet_cidr:
+    type: string
+    default: 10.10.175.0/24
+
+  subnet_gateway:
+    type: string
+    default: 10.10.175.1
+
+  subnet_pool_start:
+    type: string
+    default: 10.10.175.11
+
+  subnet_pool_end:
+    type: string
+    default: 10.10.175.99
+
+resources:
+  public_net:
+    type: OS::Neutron::ProviderNet
+    properties:
+      admin_state_up: true
+      name:
+        get_param: network_name
+      network_type: flat
+      physical_network:
+        get_param: physical_network_interface
+      port_security_enabled: true
+      router_external: true
+      shared: true
+
+  private_subnet:
+    type: OS::Neutron::Subnet
+    properties:
+      name:
+        get_param: subnet_name
+      network:
+        get_resource: public_net
+      cidr:
+        get_param: subnet_cidr
+      gateway_ip:
+        get_param: subnet_gateway
+      enable_dhcp: true
+      allocation_pools:
+        - start:
+            get_param: subnet_pool_start
+          end:
+            get_param: subnet_pool_end
+      dns_nameservers:
+        - 8.8.8.8
+        - 8.8.4.4
+
index 256c82f..213d46a 100755 (executable)
@@ -34,31 +34,30 @@ fi
 
 
 help() {
-  echo "Usage: $0 <healthcheck|smoke>"
+  echo "Usage: $0 <healthcheck|smoke|vnf>"
 }
 
 
-run_healthcheck_tests() {
-  sudo docker run --env-file env \
-      -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
-      -v ${FUNCTEST_CACHE}/images:/home/opnfv/functest/images \
-      opnfv/functest-healthcheck:hunter
-}
+run_tests() {
+
+  rm -rf ${FUNCTEST_CACHE}/results && mkdir ${FUNCTEST_CACHE}/results
 
-run_smoke_tests() {
   sudo docker run --env-file env \
       -v $(pwd)/openstack.creds:/home/opnfv/functest/conf/env_file \
       -v ${FUNCTEST_CACHE}/images:/home/opnfv/functest/images \
-      opnfv/functest-smoke:hunter
+      -v ${FUNCTEST_CACHE}/results:/home/opnfv/functest/results \
+      opnfv/functest-${1}:hunter
 }
 
-
 case "$1" in
 'healthcheck')
-  run_healthcheck_tests
+  run_tests $1
   ;;
 'smoke')
-  run_smoke_tests
+  run_tests $1
+  ;;
+'vnf')
+  run_tests $1
   ;;
 *) help
    exit 1