NSX: port status must reflect fabric, not link status

This patch ensures the status attribute for the port resource is
semantically consistent with the reference plugin when using the
NSX plugin.

Change-Id: Ifb9c7664da926d3e6d5c6ec7c0e375b53a97582a
Closes-Bug: 1285426
This commit is contained in:
Salvatore Orlando 2014-02-26 16:43:59 -08:00
parent 39ffd5c88f
commit 67aae42411

View File

@ -203,7 +203,7 @@ class NvpSynchronizer():
LP_URI = nvplib._build_uri_path(
nvplib.LSWITCHPORT_RESOURCE,
parent_resource_id='*',
fields='uuid,tags,fabric_status,link_status_up',
fields='uuid,tags,fabric_status_up',
relations='LogicalPortStatus')
def __init__(self, plugin, cluster, state_sync_interval,
@ -423,7 +423,7 @@ class NvpSynchronizer():
if lswitchport:
lp_status = (lswitchport['_relations']
['LogicalPortStatus']
['link_status_up'])
['fabric_status_up'])
status = (lp_status and
constants.PORT_STATUS_ACTIVE
or constants.PORT_STATUS_DOWN)