NSX: Enable resource tracking in NSX plugins
Commit 0d7b5392ab05aa8842b42bbbe3adc19773925e67 added resource tracking. This patch is missing in the NSX plugins and caused the CI to become unstable. Change-Id: I6e6da4b8804382f7ed6c28f3139be5ac1da907f7 Closes-bug: #1558461
This commit is contained in:
parent
3d747bda7f
commit
b6ddab61e9
@ -25,6 +25,7 @@ from neutron.db import allowedaddresspairs_db as addr_pair_db
|
||||
from neutron.db import db_base_plugin_v2
|
||||
from neutron.db import external_net_db
|
||||
from neutron.db import l3_db
|
||||
from neutron.db import models_v2
|
||||
from neutron.db import portbindings_db
|
||||
from neutron.db import portsecurity_db
|
||||
from neutron.db import securitygroups_db
|
||||
@ -36,6 +37,7 @@ from neutron.extensions import providernet as pnet
|
||||
from neutron.extensions import securitygroup as ext_sg
|
||||
from neutron.plugins.common import constants
|
||||
from neutron.plugins.common import utils
|
||||
from neutron.quota import resource_registry
|
||||
from neutron_lib import exceptions as n_exc
|
||||
|
||||
import vmware_nsx
|
||||
@ -76,6 +78,13 @@ class NsxDvsV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
__native_pagination_support = True
|
||||
__native_sorting_support = True
|
||||
|
||||
@resource_registry.tracked_resources(
|
||||
network=models_v2.Network,
|
||||
port=models_v2.Port,
|
||||
subnet=models_v2.Subnet,
|
||||
subnetpool=models_v2.SubnetPool,
|
||||
security_group=securitygroups_db.SecurityGroup,
|
||||
security_group_rule=securitygroups_db.SecurityGroupRule)
|
||||
def __init__(self):
|
||||
super(NsxDvsV2, self).__init__()
|
||||
LOG.debug('Driver support: DVS: %s' % dvs_utils.dvs_is_enabled())
|
||||
|
@ -58,6 +58,7 @@ from neutron.extensions import providernet as pnet
|
||||
from neutron.extensions import securitygroup as ext_sg
|
||||
from neutron.plugins.common import constants as plugin_const
|
||||
from neutron.plugins.common import utils
|
||||
from neutron.quota import resource_registry
|
||||
|
||||
import vmware_nsx
|
||||
from vmware_nsx._i18n import _, _LE, _LI, _LW
|
||||
@ -133,6 +134,15 @@ class NsxPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
# Map nova zones to cluster for easy retrieval
|
||||
novazone_cluster_map = {}
|
||||
|
||||
@resource_registry.tracked_resources(
|
||||
network=models_v2.Network,
|
||||
port=models_v2.Port,
|
||||
subnet=models_v2.Subnet,
|
||||
subnetpool=models_v2.SubnetPool,
|
||||
security_group=securitygroups_db.SecurityGroup,
|
||||
security_group_rule=securitygroups_db.SecurityGroupRule,
|
||||
router=l3_db.Router,
|
||||
floatingip=l3_db.FloatingIP)
|
||||
def __init__(self):
|
||||
super(NsxPluginV2, self).__init__()
|
||||
# TODO(salv-orlando): Replace These dicts with
|
||||
|
@ -54,6 +54,7 @@ from neutron.extensions import providernet as pnet
|
||||
from neutron.extensions import securitygroup as ext_sg
|
||||
from neutron.plugins.common import constants as plugin_const
|
||||
from neutron.plugins.common import utils
|
||||
from neutron.quota import resource_registry
|
||||
|
||||
import vmware_nsx
|
||||
from vmware_nsx._i18n import _, _LE, _LI, _LW
|
||||
@ -130,6 +131,15 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
__native_pagination_support = True
|
||||
__native_sorting_support = True
|
||||
|
||||
@resource_registry.tracked_resources(
|
||||
network=models_v2.Network,
|
||||
port=models_v2.Port,
|
||||
subnet=models_v2.Subnet,
|
||||
subnetpool=models_v2.SubnetPool,
|
||||
security_group=securitygroups_db.SecurityGroup,
|
||||
security_group_rule=securitygroups_db.SecurityGroupRule,
|
||||
router=l3_db.Router,
|
||||
floatingip=l3_db.FloatingIP)
|
||||
def __init__(self):
|
||||
super(NsxVPluginV2, self).__init__()
|
||||
self.metadata_proxy_handler = None
|
||||
|
@ -51,6 +51,7 @@ from neutron.extensions import providernet as pnet
|
||||
from neutron.extensions import securitygroup as ext_sg
|
||||
from neutron.plugins.common import constants as plugin_const
|
||||
from neutron.plugins.common import utils as n_utils
|
||||
from neutron.quota import resource_registry
|
||||
from neutron_lib import constants as const
|
||||
from neutron_lib import exceptions as n_exc
|
||||
from oslo_config import cfg
|
||||
@ -115,6 +116,15 @@ class NsxV3Plugin(addr_pair_db.AllowedAddressPairsMixin,
|
||||
"network_availability_zone",
|
||||
"subnet_allocation"]
|
||||
|
||||
@resource_registry.tracked_resources(
|
||||
network=models_v2.Network,
|
||||
port=models_v2.Port,
|
||||
subnet=models_v2.Subnet,
|
||||
subnetpool=models_v2.SubnetPool,
|
||||
security_group=securitygroups_db.SecurityGroup,
|
||||
security_group_rule=securitygroups_db.SecurityGroupRule,
|
||||
router=l3_db.Router,
|
||||
floatingip=l3_db.FloatingIP)
|
||||
def __init__(self):
|
||||
super(NsxV3Plugin, self).__init__()
|
||||
LOG.info(_LI("Starting NsxV3Plugin"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user