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


Python GuiOps.create_launch_config_and_asg_from_lc_lp方法代码示例

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


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

示例1: AutoScalingOperationsSequence

# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import create_launch_config_and_asg_from_lc_lp [as 别名]
class AutoScalingOperationsSequence(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)
        logging.basicConfig(format='%(asctime)s %(message)s')
        self.tester.zoom_out()

    def asg_ops_test(self):
        self.tester.login(self.account, self.user, self.password)
        launchconfig1_name = self.id_generator() + "-launch-config"
        scalinggroup1_name = self.id_generator() + "-auto-scaling-group"
        self.tester.create_launch_config_and_asg_from_lc_lp(lc_name=launchconfig1_name, asg_name=scalinggroup1_name,
                                                            max_capacity=2, desired_capacity=1, min_cpapacity=0)
        self.tester.delete_asg_from_lp(scalinggroup1_name)
        scalinggroup2_name = self.id_generator() + "-auto-scaling-group"
        self.tester.create_asg_from_asg_lp(launch_config_name=launchconfig1_name, asg_name=scalinggroup2_name)
        self.tester.delete_asg_from_lp(scalinggroup2_name)
        self.tester.delete_launch_config_from_lp(launchconfig1_name)
        launchconfig2_name = self.id_generator() + "-launch-config"
        self.tester.create_launch_config_from_lc_lp(launchconfig2_name)
        self.tester.create_asg_from_dashboard(launch_config_name=launchconfig2_name, asg_name=scalinggroup2_name,
                                              min_capacity=1, desired_capacity=1, max_capacity=1)
        self.tester.verify_scaling_history(scalinggroup2_name)
        self.tester.set_scaling_group_capacity(scalinggroup2_name, 0, 0, 1)
        self.tester.delete_asg_from_lp(scalinggroup2_name)
        self.tester.delete_launch_config_from_lp(launchconfig2_name)
        self.test_scaling_group_monitoring_page_with_monitoring_enabled()
        self.tester.logout()
        self.tester.exit_browser()

    def test_scaling_group_monitoring_page_with_monitoring_enabled(self):
        """Scaling group monitoring page should display charts when metrics collection is enabled and
           its launch config has monitoring enabled"""
        launchconfig3_name = self.id_generator() + "-launch-config"
        scalinggroup3_name = self.id_generator() + "-auto-scaling-group"
        self.tester.create_launch_config_and_asg_from_lc_lp(
                lc_name=launchconfig3_name, asg_name=scalinggroup3_name, enable_monitoring=True)
        self.tester.enable_metrics_collection_for_auto_scaling_group(scalinggroup3_name)
        self.tester.verify_charts_on_scaling_group_monitoring_page(scalinggroup3_name)
        self.tester.delete_asg_from_lp(scalinggroup3_name)
        self.tester.delete_launch_config_from_lp(launchconfig3_name)
开发者ID:,项目名称:,代码行数:53,代码来源:

示例2: ASG_operations_sequence

# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import create_launch_config_and_asg_from_lc_lp [as 别名]
class ASG_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)
        logging.basicConfig(format='%(asctime)s %(message)s')


    def asg_ops_test(self):
        self.tester.login(self.account, self.user, self.password)
        LaunchConfig1_name = self.id_generator()+"-launch-config"
        ASG1_name = self.id_generator()+"-auto-scaling-group"
        self.tester.create_launch_config_and_asg_from_lc_lp(lc_name=LaunchConfig1_name, asg_name=ASG1_name)
        self.tester.delete_asg_from_lp(ASG1_name)
        ASG2_name = self.id_generator()+"-auto-scaling-group"
        self.tester.create_asg_from_asg_lp(launch_config_name=LaunchConfig1_name, asg_name=ASG2_name)
        self.tester.delete_asg_from_lp(ASG2_name)
        self.tester.delete_launch_config_from_lp(LaunchConfig1_name)
        LaunchConfig2_name = self.id_generator()+"-launch-config"
        self.tester.create_launch_config_from_lc_lp(LaunchConfig2_name)
        self.tester.create_asg_from_dashboard(launch_config_name=LaunchConfig2_name, asg_name=ASG2_name, min_capacity=1, desired_capacity=1, max_capacity=1)
        self.tester.verify_scaling_history(ASG2_name)
        self.tester.set_scaling_group_capacity(ASG2_name, 0, 0, 1)
        self.tester.delete_asg_from_lp(ASG2_name)
        self.tester.delete_launch_config_from_lp(LaunchConfig2_name)
        self.tester.logout()
        self.tester.exit_browser()
开发者ID:suwaji,项目名称:eucaconsole,代码行数:39,代码来源:autoscaling.py


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