From 0d9ee77c16feb08151c30efec6899eaf21fbaae7 Mon Sep 17 00:00:00 2001 From: Vasyl Saienko Date: Fri, 20 May 2016 15:51:22 +0300 Subject: [PATCH] Keep backward compatibility for openstack port create openstack port create was introduced in Newton. Keep backwards compatibility in places that are used on Mitaka code during upgrades. Change-Id: I32da9f291bdfa18038a9f5412a06476b5da29f08 --- devstack/lib/ironic | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/devstack/lib/ironic b/devstack/lib/ironic index 1cd180da8f..33785786f7 100644 --- a/devstack/lib/ironic +++ b/devstack/lib/ironic @@ -673,7 +673,11 @@ function create_ovs_taps { # need to create one in Neutron to know what netns to tap into prior to the # first node booting. local port_id - port_id=$(openstack port create --network ${ironic_net_id} temp_port -c id -f value) + port_id=$(neutron port-create ${ironic_net_id} | grep " id " | get_field 2) + # NOTE(vsaienko) openstack port create was introduced in Newton. + # Since the function is used during upgrade, it should be backward compatible with Mitaka. + # Switch to openstack port create in Ocata release. + #port_id=$(openstack port create --network ${ironic_net_id} temp_port -c id -f value) die_if_not_set $LINENO port_id "Failed to create neutron port" # intentional sleep to make sure the tag has been set to port