From 54eae8aa5db86a983d721f08dd12d7f187af1a09 Mon Sep 17 00:00:00 2001 From: Akos Farago Date: Mon, 30 May 2016 06:41:06 -0700 Subject: Change floating ip association method Change-Id: I694fbce4470a14893310334a39e15b61fbe8905a Signed-off-by: Akos Farago --- yardstick/benchmark/contexts/model.py | 2 +- yardstick/orchestrator/heat.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'yardstick') diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py index 80abb9df3..2cf31f6ea 100644 --- a/yardstick/benchmark/contexts/model.py +++ b/yardstick/benchmark/contexts/model.py @@ -206,7 +206,7 @@ class Server(Object): template.add_floating_ip_association( self.floating_ip_assoc["stack_name"], self.floating_ip["stack_name"], - server_name) + port_name) template.add_server(server_name, self.image, self.flavor, ports=port_name_list, diff --git a/yardstick/orchestrator/heat.py b/yardstick/orchestrator/heat.py index 294eebbca..f3a191503 100644 --- a/yardstick/orchestrator/heat.py +++ b/yardstick/orchestrator/heat.py @@ -297,18 +297,18 @@ class HeatTemplate(HeatObject): 'value': {'get_attr': [name, 'ip']} } - def add_floating_ip_association(self, name, floating_ip_name, server_name): + def add_floating_ip_association(self, name, floating_ip_name, port_name): '''add to the template a Nova FloatingIP Association resource ''' log.debug("adding Nova::FloatingIPAssociation '%s', server '%s', " - "floating_ip '%s'", name, server_name, floating_ip_name) + "floating_ip '%s'", name, port_name, floating_ip_name) self.resources[name] = { - 'type': 'OS::Nova::FloatingIPAssociation', - 'depends_on': [server_name], + 'type': 'OS::Neutron::FloatingIPAssociation', + 'depends_on': [port_name], 'properties': { - 'floating_ip': {'get_resource': floating_ip_name}, - 'server_id': {'get_resource': server_name} + 'floatingip_id': {'get_resource': floating_ip_name}, + 'port_id': {'get_resource': port_name} } } -- cgit 1.2.3-korg