From 9a6d41633c1231dd58bce36c06ad0223865441b2 Mon Sep 17 00:00:00 2001 From: Lingxian Kong Date: Tue, 8 Dec 2020 21:58:38 +1300 Subject: [PATCH] Do not rely on description for checking port type Use port network ID is more reasonable. Change-Id: I219bf3db15124e67cd65c7d7f686ba73573e2761 --- trove/taskmanager/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trove/taskmanager/models.py b/trove/taskmanager/models.py index 585e6da3fa..e5e0026f63 100755 --- a/trove/taskmanager/models.py +++ b/trove/taskmanager/models.py @@ -1392,7 +1392,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'],