diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-04-26 15:24:44 +0100 |
---|---|---|
committer | Emma Foley <emma.l.foley@intel.com> | 2018-06-28 08:20:25 +0000 |
commit | 8b7e3af001b997f34e6a19b510e9c86e8d8d39d5 (patch) | |
tree | f3184e3ccb486dd9085da57a0164ff2608b91875 /yardstick/benchmark | |
parent | 405385acf890856390eb321cd1fc96c19ebfda0d (diff) |
Add "os_cloud_config" as a new context flag parameter
This new parameter will contain the OpenStack cloud specific configuration
used by Shade client. This new flag is used only in Heat context.
By default, this new parameter (dict) will contain this content:
'os_cloud_config': {'verify': False}
This field will be used by HeatStack [1] to create a Shade cloud. Shade
retrieves, if not defined, the OpenStack configuration from
"os_client_config". This configuration is used to generate the cloud
configuration, which is the description of the OpenStackCloud returned.
The default parameter defined, "verify", refers to the related bug. By
default, in case of using SSL certificate it will not be verified.
[1] https://github.com/opnfv/yardstick/blob/b338d3091bb0beb89d4ad9f7c144f43a31a19a74/yardstick/orchestrator/heat.py#L47
JIRA: YARDSTICK-1139
Change-Id: I875a7018401b84e51dab775b8194174645d27e06
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
(cherry picked from commit 9ae331e1aa1081c3e821512d1940846dfb4063ec)
Diffstat (limited to 'yardstick/benchmark')
-rw-r--r-- | yardstick/benchmark/contexts/base.py | 7 | ||||
-rw-r--r-- | yardstick/benchmark/contexts/heat.py | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/yardstick/benchmark/contexts/base.py b/yardstick/benchmark/contexts/base.py index 0707c1c5b..64cee8376 100644 --- a/yardstick/benchmark/contexts/base.py +++ b/yardstick/benchmark/contexts/base.py @@ -6,17 +6,20 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## + import abc import six -import yardstick.common.utils as utils +from yardstick.common import constants +from yardstick.common import utils class Flags(object): """Class to represent the status of the flags in a context""" _FLAGS = {'no_setup': False, - 'no_teardown': False} + 'no_teardown': False, + 'os_cloud_config': constants.OS_CLOUD_DEFAULT_CONFIG} def __init__(self, **kwargs): for name, value in self._FLAGS.items(): diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py index 3d8907bb5..cc87176d5 100644 --- a/yardstick/benchmark/contexts/heat.py +++ b/yardstick/benchmark/contexts/heat.py @@ -325,8 +325,10 @@ class HeatContext(Context): if not os.path.exists(self.key_filename): SSH.gen_keys(self.key_filename) - heat_template = HeatTemplate(self.name, self.template_file, - self.heat_parameters) + heat_template = HeatTemplate( + self.name, template_file=self.template_file, + heat_parameters=self.heat_parameters, + os_cloud_config=self._flags.os_cloud_config) if self.template_file is None: self._add_resources_to_template(heat_template) |