aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack
diff options
context:
space:
mode:
authorCatalina Focsa <catalina.focsa@enea.com>2017-08-28 14:31:12 +0200
committerCatalina Focsa <catalina.focsa@enea.com>2017-09-01 14:21:37 +0200
commitc25140b27229ce85ecbcabfe5af84622b36f0209 (patch)
tree27e45ec96d0ef168354e60e9bbcf42b7e31467e0 /functest/opnfv_tests/openstack
parentd20297e509ad127b237a90ba5cedbc2500bae753 (diff)
Add UEFI support in functest
Add extra properties to the cirros image for ARM architecture. In the glanceclient repository, the create method expects **kwargs as parameters, thus an extra_properties variable containing a dictionary of property-value pairs can be added (if given) to the image to be created. If the properties do not appear, the call should not affect the image properties because the dictionary is initialized as empty. Change-Id: I690da90e6c6f250bd0a3d99cce39aa250e19b9c2 Signed-off-by: Catalina Focsa <catalina.focsa@enea.com>
Diffstat (limited to 'functest/opnfv_tests/openstack')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index fdef8bed..2042b2d1 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -42,6 +42,10 @@ class RallyBase(testcase.OSGCTestCase):
CONST.__getattribute__('dir_functest_images'),
GLANCE_IMAGE_FILENAME)
GLANCE_IMAGE_FORMAT = CONST.__getattribute__('openstack_image_disk_format')
+ GLANCE_IMAGE_EXTRA_PROPERTIES = {}
+ if hasattr(CONST, 'openstack_extra_properties'):
+ GLANCE_IMAGE_EXTRA_PROPERTIES = CONST.__getattribute__(
+ 'openstack_extra_properties')
FLAVOR_NAME = "m1.tiny"
RALLY_DIR = pkg_resources.resource_filename(
@@ -462,7 +466,8 @@ class RallyBase(testcase.OSGCTestCase):
self.image_exists, self.image_id = os_utils.get_or_create_image(
self.GLANCE_IMAGE_NAME,
self.GLANCE_IMAGE_PATH,
- self.GLANCE_IMAGE_FORMAT)
+ self.GLANCE_IMAGE_FORMAT,
+ self.GLANCE_IMAGE_EXTRA_PROPERTIES)
if self.image_id is None:
raise Exception("Failed to get or create image '%s'" %
self.GLANCE_IMAGE_NAME)
t: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
From: Bartosz Kupidura <bkupidura@mirantis.com>
Date: Mon, 27 Jun 2016 13:12:29 +0200
Subject: [PATCH] Set net.ipv4.ip_nonlocal_bind=1 for vrouter namespace

Change-Id: I123af7e3b53f9a53fcd9d2818640c0bd4699e024
Closes-Bug: #1595957
(cherry picked from commit 244456a3b77074a6cd85fa9d33ebb03ac25decf8)
---
 files/fuel-ha-utils/ocf/ns_dns     | 3 ++-
 files/fuel-ha-utils/ocf/ns_vrouter | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/files/fuel-ha-utils/ocf/ns_dns b/files/fuel-ha-utils/ocf/ns_dns
index cdd814c..49cbd17 100644
--- a/files/fuel-ha-utils/ocf/ns_dns
+++ b/files/fuel-ha-utils/ocf/ns_dns
@@ -140,7 +140,7 @@ exit $OCF_SUCCESS
 
 check_ns() {
   local ns=`ip netns list | grep "$OCF_RESKEY_ns"`
-  [ $ns != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC
+  [ "$ns" != $OCF_RESKEY_ns ] && return $OCF_ERR_GENERIC
   return $OCF_SUCCESS
 }
 
@@ -150,6 +150,7 @@ get_ns() {
 
   ocf_run ip netns add $OCF_RESKEY_ns
   rc=$?
+  ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1
   ocf_run $RUN_IN_NS ip link set up dev lo
 
   return $rc
diff --git a/files/fuel-ha-utils/ocf/ns_vrouter b/files/fuel-ha-utils/ocf/ns_vrouter
index a65e9cf..5cc6c98 100644
--- a/files/fuel-ha-utils/ocf/ns_vrouter
+++ b/files/fuel-ha-utils/ocf/ns_vrouter
@@ -186,7 +186,7 @@ check_ns() {
   local LH="${LL} check_ns():"
   local ns=`ip netns list | grep "$OCF_RESKEY_ns"`
   ocf_log debug "${LH} recieved netns list: ${ns}"
-  [[ $ns != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC
+  [[ "$ns" != $OCF_RESKEY_ns ]] && return $OCF_ERR_GENERIC
   return $OCF_SUCCESS
 }
 
@@ -197,6 +197,7 @@ get_ns() {
 
   ocf_run ip netns add $OCF_RESKEY_ns
   rc=$?
+  ocf_run $RUN_IN_NS /sbin/sysctl -w net.ipv4.ip_nonlocal_bind=1
   ocf_run $RUN_IN_NS ip link set up dev lo
   ocf_log debug "${LH} added netns ${OCF_RESKEY_ns} and set up lo"