summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLingxian Kong <anlin.kong@gmail.com>2020-12-08 21:58:38 +1300
committerLingxian Kong <anlin.kong@gmail.com>2020-12-09 11:01:57 +0000
commit73978a9b978788817ee98ef6970a35f9121a2dc9 (patch)
tree3293c16ba01e5db654c6948fb422751fd91d2172
parent3639befa7ef1c1e66d3c0a2960846dbe405f3b99 (diff)
downloadtrove-73978a9b978788817ee98ef6970a35f9121a2dc9.tar.gz
Do not rely on description for checking port type
Use port network ID is more reasonable. Change-Id: I219bf3db15124e67cd65c7d7f686ba73573e2761 (cherry picked from commit 9a6d41633c1231dd58bce36c06ad0223865441b2)
-rwxr-xr-xtrove/taskmanager/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/trove/taskmanager/models.py b/trove/taskmanager/models.py
index 9cae2af9..386c7aa6 100755
--- a/trove/taskmanager/models.py
+++ b/trove/taskmanager/models.py
@@ -1388,7 +1388,7 @@ class BuiltInstanceTasks(BuiltInstance, NotifyMixin, ConfigurationMixin):
if is_public != new_is_public:
for port in ports:
- if 'User port' in port['description']:
+ if port['network_id'] not in CONF.management_networks:
LOG.debug(f"Updating port {port['id']}, is_public: "
f"{new_is_public}")
neutron.ensure_port_access(self.neutron_client, port['id'],