aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-20 14:53:38 -0700
committerRoss Brattain <ross.b.brattain@intel.com>2017-09-20 14:54:13 -0700
commit6624f127c526ac0010b1482c9280bc2af1d5c2b1 (patch)
tree96aa55e8a8346d7d6dc60cb3a0ad3f4f6c14850e
parentd374dc8ca09e7d6e08a531e68a21a8b107af21d0 (diff)
heat: fixup unittest block with pkey
get pkey after we have found the node Change-Id: I0e67834b87ed5ba268ea9cb5cffb6c214aedeebb Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
-rw-r--r--yardstick/benchmark/contexts/heat.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index f93dfac28..9a7b3817f 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -413,10 +413,6 @@ class HeatContext(Context):
attr_name: either a name for a server created by yardstick or a dict
with attribute name mapping when using external heat templates
"""
- pkey = pkg_resources.resource_string(
- 'yardstick.resources',
- h_join('files/yardstick_key', get_short_key_uuid(self.key_uuid))).decode('utf-8')
-
if isinstance(attr_name, collections.Mapping):
node_name, cname = self.split_name(attr_name['name'])
if cname is None or cname != self.name:
@@ -434,6 +430,10 @@ class HeatContext(Context):
if server is None:
return None
+ pkey = pkg_resources.resource_string(
+ 'yardstick.resources',
+ h_join('files/yardstick_key', get_short_key_uuid(self.key_uuid))).decode('utf-8')
+
result = {
"user": server.context.user,
"pkey": pkey,