def process_bulk_vm_event(self, msg, phy_uplink):
        """Process the VM bulk event usually after a restart. """
        LOG.info("In processing Bulk VM Event status %s", msg)
        time.sleep(3)
        if (not self.uplink_det_compl or
                phy_uplink not in self.ovs_vdp_obj_dict):
            # This condition shouldn't be hit as only when uplink is obtained,
            # save_uplink is called and that in turns calls this process_bulk.
            LOG.error("Uplink Port Event not received,"
                      "yet in bulk process")
            return
        ovs_vdp_obj = self.ovs_vdp_obj_dict[phy_uplink]
        for vm_dict in msg.msg_dict.get('vm_bulk_list'):
            if vm_dict['status'] == 'down':
                ovs_vdp_obj.pop_local_cache(vm_dict['port_uuid'],
                                            vm_dict['vm_mac'],
                                            vm_dict['net_uuid'],
                                            vm_dict['local_vlan'],
                                            vm_dict['vdp_vlan'],
                                            vm_dict['segmentation_id'])
            vm_msg = VdpQueMsg(constants.VM_MSG_TYPE,
                               port_uuid=vm_dict['port_uuid'],
                               vm_mac=vm_dict['vm_mac'],
                               net_uuid=vm_dict['net_uuid'],
                               segmentation_id=vm_dict['segmentation_id'],
                               status=vm_dict['status'],
                               oui=vm_dict['oui'],
                               phy_uplink=phy_uplink)
            self.process_vm_event(vm_msg, phy_uplink)
def process_bulk_vm_event ( self , msg , phy_uplink ) : LOG . info ( "In processing Bulk VM Event status %s" , msg ) time . sleep ( 3 ) if ( not self . uplink_det_compl or phy_uplink not in self . ovs_vdp_obj_dict ) : LOG . error ( "Uplink Port Event not received," "yet in bulk process" ) return ovs_vdp_obj = self . ovs_vdp_obj_dict [ phy_uplink ] for vm_dict in msg . msg_dict . get ( 'vm_bulk_list' ) : if vm_dict [ 'status' ] == 'down' : ovs_vdp_obj . pop_local_cache ( vm_dict [ 'port_uuid' ] , vm_dict [ 'vm_mac' ] , vm_dict [ 'net_uuid' ] , vm_dict [ 'local_vlan' ] , vm_dict [ 'vdp_vlan' ] , vm_dict [ 'segmentation_id' ] ) vm_msg = VdpQueMsg ( constants . VM_MSG_TYPE , port_uuid = vm_dict [ 'port_uuid' ] , vm_mac = vm_dict [ 'vm_mac' ] , net_uuid = vm_dict [ 'net_uuid' ] , segmentation_id = vm_dict [ 'segmentation_id' ] , status = vm_dict [ 'status' ] , oui = vm_dict [ 'oui' ] , phy_uplink = phy_uplink ) self . process_vm_event ( vm_msg , phy_uplink )
Process the VM bulk event usually after a restart.