#NEWLINE# def _sync_vsm( self , vsm_ip ) : #NEWLINE# #INDENT# self . _md5_hash_comparison ( vsm_ip ) #NEWLINE# if ( self . need_sync or self . sync_bds [ vsm_ip ] ) : #NEWLINE# #INDENT# LOG . debug ( ( 'Sync started for VSM %s.' % vsm_ip ) ) #NEWLINE# self . n1kvclient . send_sync_notification ( n1kv_const . SYNC_START , vsm_ip = vsm_ip ) #NEWLINE# if self . need_sync : #NEWLINE# #INDENT# create_res_order = [ n1kv_const . NETWORK_PROFILES , n1kv_const . NETWORKS , n1kv_const . SUBNETS , n1kv_const . PORTS ] #NEWLINE# vsm_neutron_res_combined = self . _get_vsm_neutron_resources ( create_res_order , vsm_ip = vsm_ip ) #NEWLINE# self . _sync_resources ( reversed ( create_res_order ) , vsm_neutron_res_combined , 'delete' , vsm_ip ) #NEWLINE# self . _sync_resources ( create_res_order , vsm_neutron_res_combined , 'create' , vsm_ip ) #NEWLINE# #UNINDENT# if self . sync_bds [ vsm_ip ] : #NEWLINE# #INDENT# LOG . debug ( ( 'Syncing bridge domains for VSM %s.' % vsm_ip ) ) #NEWLINE# vsm_bds = set ( self . _get_vsm_resource ( n1kv_const . BRIDGE_DOMAINS , vsm_ip = vsm_ip ) . keys ( ) ) #NEWLINE# neutron_vxlan_nets = n1kv_db . get_vxlan_networks ( ) #NEWLINE# self . _sync_bridge_domains ( ( vsm_bds , neutron_vxlan_nets ) , vsm_ip = vsm_ip ) #NEWLINE# #UNINDENT# self . n1kvclient . send_sync_notification ( n1kv_const . SYNC_END , vsm_ip = vsm_ip ) #NEWLINE# LOG . debug ( ( 'Sync completed for VSM %s.' % vsm_ip ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . n1kvclient . send_sync_notification ( n1kv_const . SYNC_NO_CHANGE , vsm_ip = vsm_ip )