Browse Source

[nsx_v3] Register security group resources at startup

This will avoid an error from the quota manager while trying
to create security group rules for the default security group.

Change-Id: I85a46931a96f90a084af10e85f9155c8ed850195
changes/20/785120/1
Salvatore Orlando 4 months ago
committed by Salvatore Orlando
parent
commit
182cfc2524
  1. 5
      vmware_nsx/plugins/nsx_v3/plugin.py

5
vmware_nsx/plugins/nsx_v3/plugin.py

@ -172,6 +172,11 @@ class NsxV3Plugin(nsx_plugin_common.NsxPluginV3Base,
router=l3_db_models.Router,
floatingip=l3_db_models.FloatingIP)
def __init__(self):
# Register these resources before the relevant extensiosn are loaded
# to prevent failures due to QuotaResourceUnknown error while creating
# default security group
resource_registry.register_resource_by_name('security_group')
resource_registry.register_resource_by_name('security_group_rule')
self.fwaas_callbacks = None
self._is_sub_plugin = tvd_utils.is_tvd_core_plugin()
self.init_is_complete = False

Loading…
Cancel
Save