From 994a29db7a227e56a0575b72e8107df5505a4e57 Mon Sep 17 00:00:00 2001 From: montesmoreno Date: Tue, 22 Aug 2017 11:23:06 +0200 Subject: [PATCH] Additional check to avoid error message in openstack when tag is used in network interfaces using an older microversion than 2.32 Change-Id: Ifa980814cf853dfe7d1423b4b6c33ea6bcb1cb2c Signed-off-by: montesmoreno --- osm_ro/vimconn_openstack.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osm_ro/vimconn_openstack.py b/osm_ro/vimconn_openstack.py index 7e640128..6c610ca8 100644 --- a/osm_ro/vimconn_openstack.py +++ b/osm_ro/vimconn_openstack.py @@ -765,7 +765,11 @@ class vimconnector(vimconn.vimconnector): net["ip"] = fixed_ips[0].get("ip_address") else: net["ip"] = None - net_list_vim.append({"port-id": new_port["port"]["id"], "tag": new_port["port"]["name"]}) + + port = {"port-id": new_port["port"]["id"]} + if float(self.nova.api_version.get_string()) >= 2.32: + port["tag"] = new_port["port"]["name"] + net_list_vim.append(port) if net.get('floating_ip', False): net['exit_on_floating_ip_error'] = True -- 2.25.1