The vmware_nsx.common.sync Module¶
-
class
vmware_nsx.common.sync.NsxCache¶ Bases:
objectA simple Cache for NSX resources.
Associates resource id with resource hash to rapidly identify updated resources. Each entry in the cache also stores the following information: - changed: the resource in the cache has been altered following
an update or a delete- hit: the resource has been visited during an update (and possibly left unchanged)
- data: current resource data
- data_bk: backup of resource data prior to its removal
-
get_lrouters(changed_only=False)¶
-
get_lswitches(changed_only=False)¶
-
get_lswitchports(changed_only=False)¶
-
process_deletes()¶
-
process_updates(lswitches=None, lrouters=None, lswitchports=None)¶
-
update_lrouter(lrouter)¶
-
update_lswitch(lswitch)¶
-
update_lswitchport(lswitchport)¶
-
class
vmware_nsx.common.sync.NsxSynchronizer(plugin, cluster, state_sync_interval, req_delay, min_chunk_size, max_rand_delay=0, initial_delay=5)¶ Bases:
object-
LP_URI= '/ws.v1/lswitch/*/lport?fields=uuid,tags,fabric_status_up&relations=LogicalPortStatus'¶
-
LR_URI= '/ws.v1/lrouter?fields=uuid,tags,fabric_status&relations=LogicalRouterStatus'¶
-
LS_URI= '/ws.v1/lswitch?fields=uuid,tags,fabric_status&relations=LogicalSwitchStatus'¶
-
synchronize_network(context, neutron_network_data, lswitches=None)¶ Synchronize a Neutron network with its NSX counterpart.
This routine synchronizes a set of switches when a Neutron network is mapped to multiple lswitches.
-
synchronize_port(context, neutron_port_data, lswitchport=None, ext_networks=None)¶ Synchronize a Neutron port with its NSX counterpart.
-
synchronize_router(context, neutron_router_data, lrouter=None)¶ Synchronize a neutron router with its NSX counterpart.
-
-
class
vmware_nsx.common.sync.SyncParameters(min_chunk_size)¶ Bases:
objectDefines attributes used by the synchronization procedure.
chunk_size: Actual chunk size extra_chunk_size: Additional data to fetch because of chunk size
adjustmentcurrent_chunk: Counter of the current data chunk being synchronized Page cursors: markers for the next resource to fetch.
‘start’ means page cursor unset for fetching 1st pageinit_sync_performed: True if the initial synchronization concluded