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


Python GuiOps.attach_volume_from_instance_detail_page方法代码示例

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


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

示例1: VolumeOperationsSequence

# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import attach_volume_from_instance_detail_page [as 别名]
class VolumeOperationsSequence(GuiOps):

    def __init__(self):
        parser = Option_parser()
        self.console_url = parser.parse_options()['console_url']
        self.webdriver_url = parser.parse_options()['web_driver']
        self.account = parser.parse_options()['account']
        self.user = parser.parse_options()['user_name']
        self.password = parser.parse_options()['password']
        self.sauce = parser.parse_options()['sauce']
        self.browser = parser.parse_options()['browser']
        self.version = parser.parse_options()['version']
        self.platform = parser.parse_options()['platform']
        self.tester = GuiOps(console_url=self.console_url, webdriver_url=self.webdriver_url,
                             sauce=self.sauce, browser=self.browser, version=self.version, platform=self.platform)

    def volume_ops_test(self):
        self.tester.login(self.account, self.user, self.password)
        volume1_name = self.id_generator()+"-volume"
        volume1 = self.tester.create_volume_from_view_page(volume1_name, volume_size=2, availability_zone="one")
        volume1_id = volume1.get("volume_id")
        instance1 = self.tester.launch_instance_from_dashboard(availability_zone="one", timeout_in_seconds=400)
        instance1_id = instance1.get("instance_id")
        self.tester.verify_attach_notice_on_volume_monitoring_page(volume1_id)
        self.tester.attach_volume_from_instance_detail_page(volume1_id, instance1_id, timeout_in_seconds=400)
        self.tester.verify_charts_on_volume_monitoring_page(volume1_id)
        self.tester.detach_volume_from_volumes_lp(volume1_id, timeout_in_seconds=800)
        self.tester.attach_volume_from_instance_lp(volume1_id, instance1_id, timeout_in_seconds=800)
        self.tester.detach_volume_from_volumes_lp(volume1_id, timeout_in_seconds=800)
        self.tester.attach_volume_from_volume_detail_page(instance1_id, volume1_id, device="/dev/vdd",
                                                          timeout_in_seconds=800)
        self.tester.detach_volume_from_volumes_lp(volume1_id, timeout_in_seconds=800)
        self.tester.attach_volume_from_volume_lp(instance1_id, volume1_id, timeout_in_seconds=800)
        self.tester.terminate_instance_from_view_page(instance1_id)
        self.tester.delete_volume_from_view_page(volume1_id)
        volume2 = self.tester.create_volume_from_dashboard(volume_size=3, availability_zone="two")
        volume2_id = volume2.get("volume_id")
        self.tester.delete_volume_from_detail_page(volume2_id)
        self.sortable_volumes_tables_test()
        self.tester.logout()
        self.tester.exit_browser()

    def sortable_volumes_tables_test(self):
        volume1_name = "!!!!"+self.id_generator()+"-volume"
        volume1 = self.tester.create_volume_from_view_page(volume1_name, volume_size=1, availability_zone="one")
        volume1_id = volume1.get("volume_id")
        volume2_name = "~~~~"+self.id_generator()+"-volume"
        volume2 = self.tester.create_volume_from_dashboard(volume2_name, volume_size=1, availability_zone="one")
        volume2_id = volume2.get("volume_id")
        # Test ascending sort by name column
        self.tester.click_sortable_column_header_on_volumes_landing_page(column_name='name')
        self.tester.verify_sort_position_for_volume(volume1_id, position=1)
        # Test descending sort by name column (second click sorts descending)
        self.tester.click_sortable_column_header_on_volumes_landing_page(column_name='name')
        self.tester.verify_sort_position_for_volume(volume2_id, position=1)
        # Cleanup volumes
        self.tester.delete_volume_from_view_page(volume1_id)
        self.tester.delete_volume_from_view_page(volume2_id)
开发者ID:datatonic,项目名称:eucaconsole,代码行数:60,代码来源:volumes.py

示例2: Volume_operations_sequence

# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import attach_volume_from_instance_detail_page [as 别名]
class Volume_operations_sequence(GuiOps):

    def __init__(self):
        parser = Option_parser()
        self.console_url = parser.parse_options()['console_url']
        self.webdriver_url = parser.parse_options()['web_driver']
        self.account = parser.parse_options()['account']
        self.user = parser.parse_options()['user_name']
        self.password = parser.parse_options()['password']
        self.sauce = parser.parse_options()['sauce']
        self.browser = parser.parse_options()['browser']
        self.version = parser.parse_options()['version']
        self.platform = parser.parse_options()['platform']
        self.tester = GuiOps(console_url=self.console_url, webdriver_url=self.webdriver_url, sauce=self.sauce, browser=self.browser, version=self.version, platform=self.platform)

    def id_generator(self, size = 6, chars=string.ascii_uppercase + string.digits):
        return ''.join(random.choice(chars) for j in range(size))

    def volume_ops_test(self):
        self.tester.login(self.account, self.user, self.password)
        volume1_name = self.id_generator()+"-volume"
        volume1 = self.tester.create_volume_from_view_page(volume1_name, volume_size=2, availability_zone="one")
        volume1_id = volume1.get("volume_id")
        instance1=self.tester.launch_instance_from_dashboard(availability_zone="one", timeout_in_seconds=400)
        instance1_id=instance1.get("instance_id")
        self.tester.attach_volume_from_instance_detail_page(volume1_id, instance1_id,timeout_in_seconds=400)
        self.tester.detach_volume_from_volumes_lp(volume1_id,timeout_in_seconds=400)
        self.tester.attach_volume_from_instance_lp(volume1_id, instance1_id,timeout_in_seconds=400)
        self.tester.detach_volume_from_volumes_lp(volume1_id, timeout_in_seconds=400)
        self.tester.attach_volume_from_volume_detail_page(instance1_id, volume1_id, device="/dev/vdd", timeout_in_seconds=400)
        self.tester.detach_volume_from_volumes_lp(volume1_id, timeout_in_seconds=400)
        self.tester.attach_volume_from_volume_lp(instance1_id, volume1_id, timeout_in_seconds=400)
        self.tester.terminate_instance_from_view_page(instance1_id)
        self.tester.delete_volume_from_view_page(volume1_id)
        volume2=self.tester.create_volume_from_dashboard(volume_size=3, availability_zone="two")
        volume2_id=volume2.get("volume_id")
        self.tester.delete_volume_from_detail_page(volume2_id)
        self.tester.logout()
        self.tester.exit_browser()
开发者ID:mbacchi,项目名称:eucaconsole,代码行数:41,代码来源:volumes.py


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