Module Import alias ImportFrom alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad Num NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Num Assert CompareEq AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr body With Call AttributeLoad NameLoad attr body Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword TupleLoad Num NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword TupleLoad Num NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore NameStore body Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict Expr Call AttributeLoad NameLoad attr Str Str keyword Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str decorator_list FunctionDef arguments args defaults body Assert CompareEq Call AttributeLoad NameLoad attr Str Str Str decorator_list FunctionDef arguments args defaults body Assert CompareEq Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assert CompareEq Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Num Num Call AttributeLoad BinOpSub NameLoad Call NameLoad keyword Num attr Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults TupleLoad SubscriptLoad NameLoad Index SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleStore NameStore NameStore NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assert CompareEq Call AttributeLoad NameLoad attr Str Num Num Num Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num Num Num Num Num Assert CompareEq Call AttributeLoad NameLoad attr Str Num Num Num Num Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Str BinOpMod Str Call AttributeLoad NameLoad attr Str keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Dict Str Str Num Num With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleStore NameStore NameStore body Assert CompareEq Call AttributeLoad NameLoad attr keyword Num NameLoad Num Assert CompareEq Call AttributeLoad NameLoad attr keyword Num NameLoad Num Assert CompareEq Call AttributeLoad NameLoad attr keyword Num NameLoad Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assign NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Str Num Num Num Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleStore NameStore NameStore body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call AttributeLoad NameLoad attr Str Str keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assign NameStore Call AttributeLoad NameLoad attr keyword Dict Str Str Str Num Num Num Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Call AttributeLoad BinOpSub NameLoad Call NameLoad keyword Num attr Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults TupleLoad SubscriptLoad NameLoad Index SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleStore NameStore NameStore NameStore body Assign AttributeStore AttributeLoad NameLoad attr attr NameLoad Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad TupleLoad NameLoad Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr ListLoad Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Str Str keyword NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str keyword Str keyword ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Dict Str Str With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body Assert CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str keyword Str keyword ListLoad Num Assign NameStore Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Str With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body With Call NameLoad AttributeLoad NameLoad attr body Expr CompareEq Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict keyword Dict Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str Assign NameStore Dict Str Str Str Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults TupleLoad SubscriptLoad NameLoad Index SubscriptLoad Call AttributeLoad NameLoad attr Str Index Num NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr TupleStore NameStore NameStore body With Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad ListLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Num Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad keyword Num Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Num decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Num Num keyword Dict With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Num Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Str keyword NameLoad keyword Num Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore body Expr Call AttributeLoad NameLoad attr NameLoad ListLoad Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Str Num Num Str keyword Dict Assign NameStore ListLoad Dict Str Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad TupleLoad Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Dict Str Str Str Str Num Num Str Dict Str Str keyword Dict Assign NameStore ListLoad Dict Str Str Assign NameStore ListLoad Call AttributeLoad NameLoad attr keyword Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad keyword ListLoad TupleLoad Str Str Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad TupleStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore NameStore body Expr Call AttributeLoad NameLoad attr Assert UnaryOpNot AttributeLoad NameLoad attr decorator_list
N/A N/A contextlib datetime datetime datetime timedelta N/A mock kazoo.exceptions NoNodeError pytest raises paasta_tools autoscaling_lib paasta_tools marathon_tools test_get_zookeeper_instances N/A N/A N/A N/A N/A fake_marathon_config N/A N/A marathon_tools MarathonServiceConfig service service instance instance cluster cluster config_dict N/A instances max_instances 5 10 branch_dict N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_zk_client _ N/A N/A mock_zk_get N/A N/A mock Mock return_value N/A 7 None N/A N/A mock_zk_client return_value N/A N/A mock Mock get mock_zk_get N/A N/A N/A N/A fake_marathon_config get_instances 7 N/A N/A N/A mock_zk_get call_count 1 N/A test_zookeeper_pool N/A N/A N/A N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_zk_client _ N/A N/A zk_client N/A N/A mock Mock N/A N/A mock_zk_client return_value zk_client N/A N/A N/A autoscaling_lib ZookeeperPool N/A N/A N/A N/A autoscaling_lib ZookeeperPool N/A N/A N/A N/A N/A zk_client start call_count 1 N/A N/A N/A N/A zk_client stop call_count 0 N/A N/A N/A N/A zk_client stop call_count 1 N/A test_get_zookeeper_instances_defaults_to_config_no_zk_node N/A N/A N/A N/A N/A fake_marathon_config N/A N/A marathon_tools MarathonServiceConfig service service instance instance cluster cluster config_dict N/A min_instances max_instances 5 10 branch_dict N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_zk_client _ N/A N/A N/A mock_zk_client return_value N/A N/A mock Mock get N/A N/A mock Mock side_effect NoNodeError N/A N/A N/A N/A fake_marathon_config get_instances 5 N/A test_get_zookeeper_instances_defaults_to_config_out_of_bounds N/A N/A N/A N/A N/A fake_marathon_config N/A N/A marathon_tools MarathonServiceConfig service service instance instance cluster cluster config_dict N/A min_instances max_instances 5 10 branch_dict N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_zk_client _ N/A N/A N/A mock_zk_client return_value N/A N/A mock Mock get N/A N/A mock Mock return_value N/A 15 None N/A N/A N/A N/A fake_marathon_config get_instances 10 N/A N/A mock_zk_client return_value N/A N/A mock Mock get N/A N/A mock Mock return_value N/A 0 None N/A N/A N/A N/A fake_marathon_config get_instances 5 N/A test_update_instances_for_marathon_service N/A N/A N/A N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.marathon_tools.load_marathon_service_config autospec True N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True N/A mock_load_marathon_service_config mock_zk_client _ N/A N/A zk_client N/A N/A mock Mock get N/A N/A mock Mock side_effect NoNodeError N/A N/A mock_zk_client return_value zk_client N/A N/A mock_load_marathon_service_config return_value N/A N/A marathon_tools MarathonServiceConfig service service instance instance cluster cluster config_dict N/A min_instances max_instances 5 10 branch_dict N/A N/A N/A N/A autoscaling_lib set_instances_for_marathon_service service instance instance_count 8 N/A N/A N/A N/A zk_client set assert_called_once_with /autoscaling/service/instance/instances 8 N/A test_compose_autoscaling_zookeeper_root N/A N/A N/A N/A N/A N/A N/A N/A autoscaling_lib compose_autoscaling_zookeeper_root fake-service fake-instance /autoscaling/fake-service/fake-instance N/A test_get_service_metrics_provider N/A N/A N/A N/A N/A N/A N/A N/A autoscaling_lib get_service_metrics_provider mesos_cpu N/A autoscaling_lib mesos_cpu_metrics_provider N/A test_get_decision_policy N/A N/A N/A N/A N/A N/A N/A N/A autoscaling_lib get_decision_policy pid N/A autoscaling_lib pid_decision_policy N/A test_pid_decision_policy N/A N/A N/A N/A N/A current_time N/A N/A datetime now N/A zookeeper_get_payload N/A pid_iterm pid_last_error pid_last_time 0 0 N/A N/A N/A current_time N/A timedelta seconds 600 strftime %s N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True return_value N/A N/A mock Mock get N/A N/A mock Mock side_effect N/A N/A N/A x N/A N/A N/A zookeeper_get_payload N/A N/A N/A N/A x split / N/A -1 None N/A N/A mock patch paasta_tools.autoscaling_lib.datetime autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A mock_zk_client mock_datetime _ N/A N/A N/A N/A mock_datetime now return_value current_time N/A N/A N/A N/A autoscaling_lib pid_decision_policy /autoscaling/fake-service/fake-instance 10 1 100 0.0 0 N/A N/A N/A N/A autoscaling_lib pid_decision_policy /autoscaling/fake-service/fake-instance 10 1 100 0.2 1 N/A N/A N/A N/A autoscaling_lib pid_decision_policy /autoscaling/fake-service/fake-instance 10 1 100 -0.2 -1 N/A N/A N/A N/A N/A mock_zk_client return_value set assert_has_calls N/A N/A N/A mock call /autoscaling/fake-service/fake-instance/pid_iterm 0.0 N/A N/A mock call /autoscaling/fake-service/fake-instance/pid_last_error 0.0 N/A N/A mock call /autoscaling/fake-service/fake-instance/pid_last_time N/A %s N/A N/A current_time strftime %s any_order True N/A test_threshold_decision_policy N/A N/A N/A N/A N/A decision_policy_args N/A threshold current_instances 0.1 10 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.autoscaling_lib.datetime autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A mock_datetime _ N/A N/A N/A N/A N/A autoscaling_lib threshold_decision_policy error 0 decision_policy_args 0 N/A N/A N/A N/A autoscaling_lib threshold_decision_policy error 0.5 decision_policy_args 1 N/A N/A N/A N/A autoscaling_lib threshold_decision_policy error -0.5 decision_policy_args -1 N/A test_mesos_cpu_metrics_provider N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A branch_dict N/A N/A fake_mesos_task N/A N/A mock MagicMock stats N/A cpus_limit cpus_system_time_secs cpus_user_time_secs 1.1 240 240 N/A N/A N/A fake_mesos_task __getitem__ return_value fake-service.fake-instance N/A fake_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True return_value N/A N/A mock Mock get N/A N/A mock Mock side_effect NoNodeError N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A mock_zk_client _ N/A N/A N/A raises N/A autoscaling_lib MetricsProviderNoDataError N/A N/A N/A N/A autoscaling_lib mesos_cpu_metrics_provider fake_marathon_service_config fake_marathon_tasks N/A fake_mesos_task N/A N/A N/A N/A N/A mock_zk_client return_value set assert_has_calls N/A N/A N/A mock call /autoscaling/fake-service/fake-instance/cpu_data 480.0:fake-service.fake-instance any_order True N/A test_mesos_cpu_metrics_provider_no_previous_cpu_data N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A branch_dict N/A N/A fake_mesos_task N/A N/A mock MagicMock stats N/A cpus_limit cpus_system_time_secs cpus_user_time_secs 1.1 240 240 N/A N/A N/A fake_mesos_task __getitem__ return_value fake-service.fake-instance N/A fake_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance N/A current_time N/A N/A datetime now N/A zookeeper_get_payload N/A cpu_last_time cpu_data N/A N/A N/A current_time N/A timedelta seconds 600 strftime %s 0:fake-service.fake-instance N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True return_value N/A N/A mock Mock get N/A N/A mock Mock side_effect N/A N/A N/A x N/A N/A N/A zookeeper_get_payload N/A N/A N/A N/A x split / N/A -1 None N/A N/A mock patch paasta_tools.autoscaling_lib.datetime autospec True N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A mock_zk_client mock_datetime _ N/A N/A N/A N/A mock_datetime now return_value current_time N/A N/A N/A N/A autoscaling_lib mesos_cpu_metrics_provider fake_marathon_service_config fake_marathon_tasks N/A fake_mesos_task 0.8 N/A N/A N/A N/A N/A mock_zk_client return_value set assert_has_calls N/A N/A N/A mock call /autoscaling/fake-service/fake-instance/cpu_last_time N/A N/A current_time strftime %s N/A N/A mock call /autoscaling/fake-service/fake-instance/cpu_data 480.0:fake-service.fake-instance any_order True N/A test_http_metrics_provider N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A branch_dict N/A N/A fake_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance host fake_host ports N/A 30101 N/A mock_request_result N/A N/A mock Mock json N/A N/A mock Mock return_value N/A utilization 0.5 N/A N/A N/A mock patch paasta_tools.autoscaling_lib.requests.get autospec True return_value mock_request_result N/A N/A N/A N/A N/A autoscaling_lib http_metrics_provider fake_marathon_service_config fake_marathon_tasks N/A N/A mock Mock 0.5 N/A test_http_metrics_provider_no_data N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A branch_dict N/A N/A fake_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance host fake_host ports N/A 30101 N/A mock_request_result N/A N/A mock Mock json N/A N/A mock Mock return_value malformed_result N/A N/A N/A mock patch paasta_tools.autoscaling_lib.requests.get autospec True return_value mock_request_result N/A N/A N/A raises N/A autoscaling_lib MetricsProviderNoDataError N/A N/A N/A N/A N/A autoscaling_lib http_metrics_provider fake_marathon_service_config fake_marathon_tasks N/A N/A mock Mock 0.5 N/A test_mesos_cpu_metrics_provider_no_data_mesos N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A branch_dict N/A N/A fake_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance N/A zookeeper_get_payload N/A cpu_last_time cpu_data 0 N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.utils.KazooClient autospec True return_value N/A N/A mock Mock get N/A N/A mock Mock side_effect N/A N/A N/A x N/A N/A N/A zookeeper_get_payload N/A N/A N/A N/A x split / N/A -1 None N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A _ _ N/A N/A N/A raises N/A autoscaling_lib MetricsProviderNoDataError N/A N/A N/A N/A autoscaling_lib mesos_cpu_metrics_provider fake_marathon_service_config fake_marathon_tasks N/A N/A test_autoscale_marathon_instance N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A min_instances max_instances 1 10 branch_dict N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.autoscaling_lib.set_instances_for_marathon_service autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_service_metrics_provider autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_decision_policy autospec True return_value N/A N/A mock Mock return_value 1 N/A N/A N/A mock patch object N/A marathon_tools MarathonServiceConfig get_instances autospec True return_value 1 N/A N/A mock patch paasta_tools.autoscaling_lib._log autospec True N/A mock_set_instances_for_marathon_service _ _ _ _ N/A N/A N/A N/A autoscaling_lib autoscale_marathon_instance fake_marathon_service_config N/A N/A N/A mock Mock N/A N/A N/A mock Mock N/A N/A N/A mock_set_instances_for_marathon_service assert_called_once_with service fake-service instance fake-instance instance_count 2 N/A test_autoscale_marathon_instance_aborts_when_task_deploying N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A min_instances max_instances 1 10 branch_dict N/A N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.autoscaling_lib.set_instances_for_marathon_service autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_service_metrics_provider autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_decision_policy autospec True return_value N/A N/A mock Mock return_value 1 N/A N/A N/A mock patch object N/A marathon_tools MarathonServiceConfig get_instances autospec True return_value 500 N/A N/A mock patch paasta_tools.autoscaling_lib._log autospec True N/A mock_set_instances_for_marathon_service _ _ _ _ N/A N/A N/A N/A autoscaling_lib autoscale_marathon_instance fake_marathon_service_config N/A N/A N/A mock Mock N/A N/A N/A mock Mock N/A N/A N/A mock_set_instances_for_marathon_service called N/A test_autoscale_services N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A min_instances max_instances desired_state 1 10 start branch_dict N/A N/A mock_mesos_tasks N/A N/A id fake-service.fake-instance N/A mock_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.autoscaling_lib.autoscale_marathon_instance autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_marathon_client autospec True return_value N/A N/A mock Mock list_tasks N/A N/A mock Mock return_value mock_marathon_tasks N/A N/A mock patch paasta_tools.autoscaling_lib.get_running_tasks_from_active_frameworks autospec True return_value mock_mesos_tasks N/A N/A mock patch paasta_tools.autoscaling_lib.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_cluster N/A N/A mock Mock N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A N/A mock patch paasta_tools.autoscaling_lib.get_services_for_cluster autospec True return_value N/A N/A fake-service fake-instance N/A N/A mock patch paasta_tools.autoscaling_lib.load_marathon_service_config autospec True return_value fake_marathon_service_config N/A N/A mock patch paasta_tools.autoscaling_lib.load_marathon_config autospec True N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.create_autoscaling_lock autospec True N/A mock_autoscale_marathon_instance _ _ _ _ _ _ _ _ _ N/A N/A N/A N/A autoscaling_lib autoscale_services N/A N/A N/A mock_autoscale_marathon_instance assert_called_once_with fake_marathon_service_config mock_marathon_tasks mock_mesos_tasks N/A test_autoscale_services_bespoke_doesnt_autoscale N/A N/A N/A N/A N/A fake_marathon_service_config N/A N/A marathon_tools MarathonServiceConfig service fake-service instance fake-instance cluster fake-cluster config_dict N/A min_instances max_instances desired_state autoscaling 1 10 start N/A decision_policy bespoke branch_dict N/A N/A mock_mesos_tasks N/A N/A id fake-service.fake-instance N/A mock_marathon_tasks N/A N/A N/A mock Mock id fake-service.fake-instance N/A N/A N/A contextlib nested N/A N/A mock patch paasta_tools.autoscaling_lib.autoscale_marathon_instance autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.get_marathon_client autospec True return_value N/A N/A mock Mock list_tasks N/A N/A mock Mock return_value mock_marathon_tasks N/A N/A mock patch paasta_tools.autoscaling_lib.get_running_tasks_from_active_frameworks autospec True return_value mock_mesos_tasks N/A N/A mock patch paasta_tools.autoscaling_lib.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_cluster N/A N/A mock Mock N/A N/A mock patch paasta_tools.utils.load_system_paasta_config autospec True return_value N/A N/A mock Mock get_zk_hosts N/A N/A mock Mock N/A N/A mock patch paasta_tools.autoscaling_lib.get_services_for_cluster autospec True return_value N/A N/A fake-service fake-instance N/A N/A mock patch paasta_tools.autoscaling_lib.load_marathon_service_config autospec True return_value fake_marathon_service_config N/A N/A mock patch paasta_tools.autoscaling_lib.load_marathon_config autospec True N/A N/A mock patch paasta_tools.utils.KazooClient autospec True N/A N/A mock patch paasta_tools.autoscaling_lib.create_autoscaling_lock autospec True N/A mock_autoscale_marathon_instance _ _ _ _ _ _ _ _ _ N/A N/A N/A N/A autoscaling_lib autoscale_services N/A N/A N/A mock_autoscale_marathon_instance called N/A