NSX|V: add context to missing configure_router_edge
Commit fe72c1bd0c98bc5c403e867a4c284f8e66a4d10d added context to the method above. Here we do 2 things: 1. add in the missing context to method calls 2. ensure that context is the first parameter to be consistant Change-Id: Iad7f575a3a212f123ecdf7a4827e2ab61993a49b
This commit is contained in:
parent
954feb1f6f
commit
1dec3bb2ae
@ -470,7 +470,8 @@ class RouterDistributedDriver(router_driver.RouterBaseDriver):
|
||||
md_proxy_handler = (
|
||||
self.plugin.metadata_proxy_handler)
|
||||
if md_proxy_handler:
|
||||
md_proxy_handler.configure_router_edge(dhcp_id)
|
||||
md_proxy_handler.configure_router_edge(
|
||||
context, dhcp_id)
|
||||
|
||||
def _update_edge_router(self, context, router_id):
|
||||
router = self.plugin._get_router(context.elevated(), router_id)
|
||||
|
@ -42,7 +42,7 @@ class RouterExclusiveDriver(router_driver.RouterBaseDriver):
|
||||
availability_zone=availability_zone)
|
||||
if allow_metadata:
|
||||
self.plugin.metadata_proxy_handler.configure_router_edge(
|
||||
lrouter['id'], context)
|
||||
context, lrouter['id'])
|
||||
|
||||
def update_router(self, context, router_id, router):
|
||||
r = router['router']
|
||||
|
@ -584,8 +584,8 @@ class RouterSharedDriver(router_driver.RouterBaseDriver):
|
||||
# configure metadata service on the router.
|
||||
metadata_proxy_handler = self.plugin.metadata_proxy_handler
|
||||
if metadata_proxy_handler and new:
|
||||
metadata_proxy_handler.configure_router_edge(router_id,
|
||||
context)
|
||||
metadata_proxy_handler.configure_router_edge(context,
|
||||
router_id)
|
||||
edge_id = edge_utils.get_router_edge_id(context, router_id)
|
||||
with locking.LockManager.get_lock(str(edge_id)):
|
||||
# add all internal interfaces of the router on edge
|
||||
|
@ -647,7 +647,7 @@ class NsxVMetadataProxyHandler(object):
|
||||
|
||||
lb_obj.submit_to_backend(self.nsxv_plugin.nsx_v.vcns, edge_id)
|
||||
|
||||
def configure_router_edge(self, rtr_id, context):
|
||||
def configure_router_edge(self, context, rtr_id):
|
||||
ctx = context.elevated()
|
||||
# Connect router interface to inter-edge network
|
||||
port_data = {
|
||||
|
@ -2102,7 +2102,7 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
||||
LOG.debug('Update metadata for resource %s',
|
||||
resource_id)
|
||||
self.metadata_proxy_handler.configure_router_edge(
|
||||
resource_id, context)
|
||||
context, resource_id)
|
||||
|
||||
self.setup_dhcp_edge_fw_rules(context, self,
|
||||
resource_id)
|
||||
|
@ -1301,7 +1301,7 @@ class EdgeManager(object):
|
||||
context, network_id, resource_id, availability_zone)
|
||||
|
||||
self.plugin.metadata_proxy_handler.configure_router_edge(
|
||||
resource_id, context)
|
||||
context, resource_id)
|
||||
self.plugin.setup_dhcp_edge_fw_rules(
|
||||
context, self.plugin, resource_id)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user