當前位置: 首頁>>代碼示例>>Python>>正文


Python MDSServiceController.mds_checkup方法代碼示例

本文整理匯總了Python中ovs.lib.mdsservice.MDSServiceController.mds_checkup方法的典型用法代碼示例。如果您正苦於以下問題:Python MDSServiceController.mds_checkup方法的具體用法?Python MDSServiceController.mds_checkup怎麽用?Python MDSServiceController.mds_checkup使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ovs.lib.mdsservice.MDSServiceController的用法示例。


在下文中一共展示了MDSServiceController.mds_checkup方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: migrate_from_voldrv

# 需要導入模塊: from ovs.lib.mdsservice import MDSServiceController [as 別名]
# 或者: from ovs.lib.mdsservice.MDSServiceController import mds_checkup [as 別名]
    def migrate_from_voldrv(volume_id, new_owner_id):
        """
        Triggered when volume has changed owner (Clean migration or stolen due to other reason)
        Triggered by volumedriver messages

        :param volume_id:    Volume ID of the disk
        :type volume_id:     unicode

        :param new_owner_id: ID of the storage driver the volume migrated to
        :type new_owner_id:  unicode

        :returns:            None
        """
        sd = StorageDriverList.get_by_storagedriver_id(storagedriver_id=new_owner_id)
        vdisk = VDiskList.get_vdisk_by_volume_id(volume_id=volume_id)
        if vdisk is not None:
            logger.info('Migration - Guid {0} - ID {1} - Detected migration for virtual disk {2}'.format(vdisk.guid, vdisk.volume_id, vdisk.name))
            if sd is not None:
                logger.info('Migration - Guid {0} - ID {1} - Storage Router {2} is the new owner of virtual disk {3}'.format(vdisk.guid, vdisk.volume_id, sd.storagerouter.name, vdisk.name))
            MDSServiceController.mds_checkup()
            VDiskController.dtl_checkup(vdisk_guid=vdisk.guid)
開發者ID:jamie-liu,項目名稱:openvstorage,代碼行數:23,代碼來源:vdisk.py


注:本文中的ovs.lib.mdsservice.MDSServiceController.mds_checkup方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。