aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2018-03-05 13:06:56 +0100
committerManuel Buil <mbuil@suse.com>2018-03-05 14:57:14 +0100
commitdd7c0aad5848ff7f53392923b368a611ece47852 (patch)
tree82163608c634da7f35f7d7ab73c80bf927e1869f
parent1fbd7bfcf3af86719721add8b8ca1f04dc0beb48 (diff)
Update SNAPs usage of library
JIRA:SFC-120 Snaps updated two methods which now require more parameters: https://github.com/opnfv/snaps/blob/master/snaps/openstack/utils/heat_utils.py#L260 https://github.com/opnfv/snaps/blob/master/snaps/openstack/create_instance.py#L781 Change-Id: I164c51298afd7b80ee88312f3a09abe7f09282a0 Signed-off-by: Manuel Buil <mbuil@suse.com>
-rw-r--r--sfc/lib/openstack_utils.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sfc/lib/openstack_utils.py b/sfc/lib/openstack_utils.py
index 35e667ae..2752ba5d 100644
--- a/sfc/lib/openstack_utils.py
+++ b/sfc/lib/openstack_utils.py
@@ -45,6 +45,7 @@ class OpenStackSFC:
self.nova = nova_utils.nova_client(self.os_creds)
self.neutron = neutron_utils.neutron_client(self.os_creds)
self.heat = heat_utils.heat_client(self.os_creds)
+ self.keystone = keystone_utils.keystone_client(self.os_creds)
def register_glance_image(self, name, url, img_format, public):
image_settings = ImageConfig(name=name, img_format=img_format, url=url,
@@ -186,14 +187,18 @@ class OpenStackSFC:
'''
stacks = self.heat.stacks.list()
fips = []
+ project_name = 'admin'
for stack in stacks:
servers = heat_utils.get_stack_servers(self.heat,
self.nova,
self.neutron,
- stack)
+ self.keystone,
+ stack,
+ project_name)
sf_creator = cr_inst.generate_creator(self.os_creds,
servers[0],
- self.image_settings)
+ self.image_settings,
+ project_name)
port_name = servers[0].ports[0].name
name = servers[0].name + "-float"
float_ip = FloatingIpConfig(name=name,