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


Python GuiOps.create_stack_from_dashboard方法代码示例

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


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

示例1: Stack_operations_sequence

# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import create_stack_from_dashboard [as 别名]
class Stack_operations_sequence(GuiOps):
    TEMPLATE_URL = 'https://raw.githubusercontent.com/eucalyptus/eucaconsole/19b2a55ce33e0d76567bff9541319bb7b51e18d4/eucaconsole/cf-templates/Euca%20Stacks/Basic%20Instance.json'

    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)
        self.tester.zoom_out()

    def stack_ops_test(self):
        self.tester.login(self.account, self.user, self.password)
        keypair_name = self.id_generator()+"-keypair"
        self.tester.create_keypair_from_dashboard(keypair_name)

        # test stack from sample
        stack1_name = "test-" + self.id_generator() + "-stack"
        self.tester.create_stack_from_dashboard(stack1_name)
        stack2_name = "test-" + self.id_generator() + "-stack"
        self.tester.create_stack_from_lp(stack2_name)
        # update a stack
        self.tester.update_stack_from_lp(stack2_name)
        # delete the stacks
        self.tester.delete_stack_from_lp(stack1_name)
        self.tester.delete_stack_from_detail_page(stack2_name)

        #test stack from uploaded template
        stack3_name = "test-" + self.id_generator() + "-stack"
        self.tester.create_stack_from_dashboard(stack3_name, template_url=self.TEMPLATE_URL)
        self.tester.delete_stack_from_lp(stack3_name)

        self.tester.delete_keypair_from_detail_page(keypair_name)
        self.tester.logout()
        self.tester.exit_browser()
开发者ID:,项目名称:,代码行数:43,代码来源:


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