NSX|V: only update NSX if neceesary for router update

A name/description update does not requre an update to the NSX.

Change-Id: If926968362f65051d54369343414cb28c86ff004
This commit is contained in:
Gary Kotton 2016-05-23 06:17:59 -07:00
parent 7f3e8f1961
commit e4d3a200ae

View File

@ -56,6 +56,13 @@ class RouterSharedDriver(router_driver.RouterBaseDriver):
def update_router(self, context, router_id, router):
r = router['router']
self._validate_no_routes(r)
# If only the name and or description are updated. We do not need to
# update the backend.
if set(['name', 'description']) >= set(r.keys()):
return super(nsx_v.NsxVPluginV2, self.plugin).update_router(
context, router_id, router)
edge_id = edge_utils.get_router_edge_id(context, router_id)
if not edge_id:
return super(nsx_v.NsxVPluginV2, self.plugin).update_router(