From a5c556141ec9123422a5f372545219b5bb0a59ee Mon Sep 17 00:00:00 2001 From: spisarski Date: Thu, 3 Aug 2017 10:57:49 -0600 Subject: Refactored port retrieval to include PortSettigs. Refactored neutron_utils#get_port_by_name to get_port while adding in a port_settings object for more robust query options. JIRA: SNAPS-162 Change-Id: I01222ad344224db94615859448ad05d8d5bc0c30 Signed-off-by: spisarski --- snaps/openstack/utils/nova_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'snaps/openstack/utils/nova_utils.py') diff --git a/snaps/openstack/utils/nova_utils.py b/snaps/openstack/utils/nova_utils.py index a0c028a..d6a8e02 100644 --- a/snaps/openstack/utils/nova_utils.py +++ b/snaps/openstack/utils/nova_utils.py @@ -65,8 +65,8 @@ def create_server(nova, neutron, glance, instance_settings, image_settings, ports = list() for port_setting in instance_settings.port_settings: - ports.append(neutron_utils.get_port_by_name( - neutron, port_setting.name)) + ports.append(neutron_utils.get_port( + neutron, port_settings=port_setting)) nics = [] for port in ports: kv = dict() -- cgit 1.2.3-korg