本文整理汇总了Python中guiops.guiops.GuiOps.verify_scaling_history方法的典型用法代码示例。如果您正苦于以下问题:Python GuiOps.verify_scaling_history方法的具体用法?Python GuiOps.verify_scaling_history怎么用?Python GuiOps.verify_scaling_history使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类guiops.guiops.GuiOps
的用法示例。
在下文中一共展示了GuiOps.verify_scaling_history方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: AutoScalingOperationsSequence
# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import verify_scaling_history [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)
示例2: ASG_operations_sequence
# 需要导入模块: from guiops.guiops import GuiOps [as 别名]
# 或者: from guiops.guiops.GuiOps import verify_scaling_history [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()