当前位置: 首页>>代码示例>>Python>>正文


Python General.get_mountpoints方法代码示例

本文整理汇总了Python中ci.tests.general.general.General.get_mountpoints方法的典型用法代码示例。如果您正苦于以下问题:Python General.get_mountpoints方法的具体用法?Python General.get_mountpoints怎么用?Python General.get_mountpoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ci.tests.general.general.General的用法示例。


在下文中一共展示了General.get_mountpoints方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: shrink_vpool

# 需要导入模块: from ci.tests.general.general import General [as 别名]
# 或者: from ci.tests.general.general.General import get_mountpoints [as 别名]
 def shrink_vpool(storage_driver):
     """
     Remove a Storage Driver from a vPool
     :param storage_driver: Storage Driver to remove from the vPool
     :return: None
     """
     vpool = storage_driver.vpool
     if GeneralHypervisor.get_hypervisor_type() == "VMWARE":
         root_client = SSHClient(storage_driver.storagerouter, username="root")
         if storage_driver.mountpoint in General.get_mountpoints(root_client):
             root_client.run(["umount", "storage_driver.mountpoint"])
     task_result = GeneralVPool.api.execute_post_action(
         component="vpools",
         guid=vpool.guid,
         action="shrink_vpool",
         data={"storagerouter_guid": storage_driver.storagerouter.guid},
         wait=True,
         timeout=GeneralVPool.TIMEOUT_ADD_VPOOL,
     )
     if task_result[0] is not True:
         raise RuntimeError(
             "Storage Driver with ID {0} was not successfully removed from vPool {1}".format(
                 storage_driver.storagedriver_id, vpool.name
             ),
             task_result,
         )
     return GeneralVPool.get_vpool_by_name(vpool_name=vpool.name)
开发者ID:openvstorage,项目名称:integrationtests,代码行数:29,代码来源:general_vpool.py

示例2: unmount_vpool

# 需要导入模块: from ci.tests.general.general import General [as 别名]
# 或者: from ci.tests.general.general.General import get_mountpoints [as 别名]
 def unmount_vpool(vpool, root_client):
     """
     Umount the vPool
     :param vpool: vPool to umount
     :param root_client: SSHClient object
     :return: None
     """
     mountpoint = '/mnt/{0}'.format(vpool.name)
     if mountpoint in General.get_mountpoints(root_client):
         root_client.run('umount {0}'.format(mountpoint))
开发者ID:DarumasLegs,项目名称:integrationtests,代码行数:12,代码来源:general_vpool.py

示例3: mount_vpool

# 需要导入模块: from ci.tests.general.general import General [as 别名]
# 或者: from ci.tests.general.general.General import get_mountpoints [as 别名]
 def mount_vpool(vpool, root_client):
     """
     Mount the vPool locally
     :param vpool: vPool to mount locally
     :param root_client: SSHClient object
     :return: None
     """
     mountpoint = '/mnt/{0}'.format(vpool.name)
     if mountpoint not in General.get_mountpoints(root_client):
         root_client.run('mount 127.0.0.1:{0} {0}'.format(mountpoint))
开发者ID:DarumasLegs,项目名称:integrationtests,代码行数:12,代码来源:general_vpool.py

示例4: mount_vpool

# 需要导入模块: from ci.tests.general.general import General [as 别名]
# 或者: from ci.tests.general.general.General import get_mountpoints [as 别名]
 def mount_vpool(vpool, root_client):
     """
     Mount the vPool locally
     :param vpool: vPool to mount locally
     :param root_client: SSHClient object
     :return: None
     """
     mountpoint = "/mnt/{0}".format(vpool.name)
     if mountpoint not in General.get_mountpoints(root_client):
         root_client.run(["mount", "127.0.0.1:" + mountpoint, mountpoint])
开发者ID:openvstorage,项目名称:integrationtests,代码行数:12,代码来源:general_vpool.py

示例5: shrink_vpool

# 需要导入模块: from ci.tests.general.general import General [as 别名]
# 或者: from ci.tests.general.general.General import get_mountpoints [as 别名]
 def shrink_vpool(storage_driver):
     """
     Remove a Storage Driver from a vPool
     :param storage_driver: Storage Driver to remove from the vPool
     :return: None
     """
     vpool = storage_driver.vpool
     if storage_driver.storagerouter.pmachine.hvtype == 'VMWARE':
         root_client = SSHClient(storage_driver.storagerouter, username='root')
         if storage_driver.mountpoint in General.get_mountpoints(root_client):
             root_client.run('umount {0}'.format(storage_driver.mountpoint))
     task_result = GeneralVPool.api.execute_post_action(component='vpools',
                                                        guid=vpool.guid,
                                                        action='shrink_vpool',
                                                        data={'storagerouter_guid': storage_driver.storagerouter.guid},
                                                        wait=True,
                                                        timeout=500)
     if task_result[0] is not True:
         raise RuntimeError('Storage Driver with ID {0} was not successfully removed from vPool {1}'.format(storage_driver.storagedriver_id, vpool.name))
     return GeneralVPool.get_vpool_by_name(vpool_name=vpool.name)
开发者ID:DarumasLegs,项目名称:integrationtests,代码行数:22,代码来源:general_vpool.py


注:本文中的ci.tests.general.general.General.get_mountpoints方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。