Browse Source

Fix broken code due to openstack updates

Stop using constant AUTO_DELETE_PORT_OWNERS
as Commit Iba02f5a2211b18c2deb9097daad6be5e7d21faf8 removed this

Cheery picked from commit I25ad6e1670d19fa3dcf8210eb4fd13aef6c3ad37

Change-Id: Ib4ede63f28757a3591b991b1293144e8ba08ad15
changes/70/741370/1
asarfaty 2 weeks ago
parent
commit
606dfa3cac
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      vmware_nsx/plugins/common_v3/plugin.py

+ 1
- 3
vmware_nsx/plugins/common_v3/plugin.py View File

@@ -33,7 +33,6 @@ from neutron.db import agents_db
from neutron.db import agentschedulers_db
from neutron.db import allowedaddresspairs_db as addr_pair_db
from neutron.db.availability_zone import router as router_az_db
from neutron.db import db_base_plugin_v2
from neutron.db import dns_db
from neutron.db import external_net_db
from neutron.db import extradhcpopt_db
@@ -2511,8 +2510,7 @@ class NsxPluginV3Base(agentschedulers_db.AZDhcpAgentSchedulerDbMixin,
def _has_active_port(self, context, network_id):
ports_in_use = context.session.query(models_v2.Port).filter_by(
network_id=network_id).all()
return not all([p.device_owner in
db_base_plugin_v2.AUTO_DELETE_PORT_OWNERS
return not all([p.device_owner == constants.DEVICE_OWNER_DHCP
for p in ports_in_use]) if ports_in_use else False

def _delete_network_disable_dhcp(self, context, network_id):


Loading…
Cancel
Save