Module Import alias ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Str Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assert CompareEq NameLoad ListLoad Assert CompareIn Str NameLoad decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str ListLoad ListLoad Str Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Assert CompareIs NameLoad NameLoad Assert CompareEq NameLoad ListLoad Str Str decorator_list Call NameLoad Str FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore TupleLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Assert CompareEq NameLoad NameLoad decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign NameStore Call NameLoad ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str TupleLoad NameLoad Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Assert CompareEq NameLoad TupleLoad Str NameLoad decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Str Str Str Assign NameStore Num Assign AttributeStore NameLoad attr TupleLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad Assert CompareIs SubscriptLoad NameLoad Index Num NameLoad Assert CompareIn Str SubscriptLoad NameLoad Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr TupleLoad Num Str Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad TupleLoad NameLoad NameLoad decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr TupleLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareIs SubscriptLoad NameLoad Index Num NameLoad Assert CompareIn Str SubscriptLoad NameLoad Index Num Assert CompareIn Str SubscriptLoad NameLoad Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr TupleLoad Num Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareIs SubscriptLoad NameLoad Index Num NameLoad Assert CompareIn Str SubscriptLoad NameLoad Index Num Assert CompareIn Str SubscriptLoad NameLoad Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Str keyword Num Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Str keyword Num Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore TupleLoad Str Str Str Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr TupleLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str NameLoad NameLoad NameLoad Assert CompareEq NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Str Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Str Str keyword Num keyword Num Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign AttributeStore NameLoad attr TupleLoad NameLoad Str Assign AttributeStore NameLoad attr TupleLoad ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad NameLoad NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareIn BinOpMod Str NameLoad NameLoad Assert CompareIn Str NameLoad decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Str Assign NameStore TupleLoad Str Str Str Assign AttributeStore NameLoad attr TupleLoad NameLoad NameLoad Assign AttributeStore NameLoad attr TupleLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assert CompareEq NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore Str Assign AttributeStore NameLoad attr TupleLoad NameLoad Str Assign AttributeStore NameLoad attr TupleLoad ListLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareIn BinOpMod Str NameLoad NameLoad Assert CompareIn Str NameLoad decorator_list Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad Call NameLoad Str keyword NameLoad TupleStore NameStore NameStore NameStore body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Str Str keyword Num Assert BoolOpAnd CompareEq Call NameLoad NameLoad NameLoad CompareEq Call NameLoad NameLoad Num CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad CompareEq Call NameLoad SubscriptLoad NameLoad Index Num NameLoad Assert CompareEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assert CompareEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Call AttributeLoad NameLoad attr Str ListLoad ListLoad TupleLoad ListLoad Str Str NameLoad TupleLoad Str NameLoad TupleLoad Num Str ListLoad TupleLoad ListLoad Str NameLoad NameLoad ListLoad TupleLoad ListLoad Str Str NameLoad TupleLoad NameLoad Str NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign NameStore ListLoad Str Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr ListLoad Str Str Assign NameStore ListLoad Str Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore ListLoad Str Str Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str decorator_list Call NameLoad Str Call NameLoad Str Call NameLoad Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign NameStore ListLoad Str Str Str Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr ListLoad Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assert CompareEq NameLoad NameLoad decorator_list Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str FunctionDef arguments args defaults body Assign NameStore Dict Str Dict Str Str Dict Str Str Str Str Str Str Str Str Str Str Dict Str Str Str Str Assign NameStore Call NameLoad ListLoad Str Str With Call AttributeLoad NameLoad attr Str keyword NameLoad keyword NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assert CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Lambda arguments args defaults ListLoad Str Str Str Assert CompareEq Call NameLoad keyword Str ListLoad Str Str Str decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Assert CompareEq NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad Assert CompareEq NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad Assert CompareEq NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword NameLoad Assert CompareIn NameLoad ListLoad Str Str Str decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad With Call NameLoad NameLoad NameStore body Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad Assert CompareEq AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args defaults body ImportFrom alias Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Assert CompareNotIn Str NameLoad Assert CompareIn Str NameLoad Assert CompareIn Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq AttributeLoad NameLoad attr Num Assert CompareEq NameLoad Str decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body With Call NameLoad NameLoad body Assign AttributeStore NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword Str keyword Str keyword Str keyword Str Assert CompareEq AttributeLoad NameLoad attr Num decorator_list Call AttributeLoad NameLoad attr Str keyword NameLoad FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr TupleLoad Num Str Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str keyword Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad keyword AttributeLoad NameLoad attr Assert CompareEq NameLoad AttributeLoad NameLoad attr decorator_list Call NameLoad Str keyword NameLoad
N/A N/A contextlib socket gaierror N/A mock mock patch pytest mark pytest raises paasta_tools.cli utils paasta_tools.utils NoConfigurationForServiceError test_bad_calculate_remote_master N/A N/A mock_get_by_hostname N/A N/A N/A N/A mock_get_by_hostname side_effect N/A gaierror foo bar N/A N/A ips output N/A N/A utils calculate_remote_masters myhost N/A N/A ips N/A N/A N/A ERROR while doing DNS lookup of paasta-myhost.yelp:
bar
 output N/A N/A patch paasta_tools.cli.utils.gethostbyname_ex test_ok_remote_masters N/A N/A mock_get_by_hostname N/A N/A N/A N/A mock_get_by_hostname return_value N/A myhost N/A N/A 1.2.3.4 1.2.3.5 N/A N/A ips output N/A N/A utils calculate_remote_masters myhost N/A N/A output None N/A N/A ips N/A 1.2.3.4 1.2.3.5 N/A N/A patch paasta_tools.cli.utils.gethostbyname_ex test_find_connectable_master_happy_path N/A N/A mock_check_ssh_and_sudo_on_master N/A N/A N/A masters N/A 192.0.2.1 192.0.2.2 192.0.2.3 N/A timeout 6.0 N/A N/A mock_check_ssh_and_sudo_on_master return_value N/A True None N/A actual N/A N/A utils find_connectable_master masters N/A expected N/A N/A masters N/A 0 None N/A N/A N/A mock_check_ssh_and_sudo_on_master call_count 1 N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_called_once_with N/A masters N/A 0 timeout timeout N/A N/A actual expected N/A N/A patch paasta_tools.cli.utils.check_ssh_and_sudo_on_master autospec True test_find_connectable_master_one_failure N/A N/A mock_check_ssh_and_sudo_on_master N/A N/A N/A masters N/A 192.0.2.1 192.0.2.2 192.0.2.3 N/A timeout 6.0 N/A create_connection_side_effects N/A iter N/A N/A False something bad N/A True unused N/A True unused N/A N/A mock_check_ssh_and_sudo_on_master side_effect create_connection_side_effects N/A N/A mock_check_ssh_and_sudo_on_master return_value True N/A actual N/A N/A utils find_connectable_master masters N/A N/A N/A mock_check_ssh_and_sudo_on_master call_count 2 N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_any_call N/A masters N/A 0 timeout timeout N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_any_call N/A masters N/A 1 timeout timeout N/A N/A actual N/A 192.0.2.2 None N/A N/A patch paasta_tools.cli.utils.check_ssh_and_sudo_on_master autospec True test_find_connectable_master_all_failures N/A N/A mock_check_ssh_and_sudo_on_master N/A N/A N/A masters N/A 192.0.2.1 192.0.2.2 192.0.2.3 N/A timeout 6.0 N/A N/A mock_check_ssh_and_sudo_on_master return_value N/A 255 timeout N/A actual N/A N/A utils find_connectable_master masters N/A N/A N/A mock_check_ssh_and_sudo_on_master call_count 3 N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_any_call N/A masters N/A 0 timeout timeout N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_any_call N/A masters N/A 1 timeout timeout N/A N/A N/A mock_check_ssh_and_sudo_on_master assert_any_call N/A masters N/A 2 timeout timeout N/A N/A N/A actual N/A 0 None N/A N/A timeout N/A actual N/A 1 N/A N/A patch paasta_tools.cli.utils.check_ssh_and_sudo_on_master autospec True test_check_ssh_and_sudo_on_master_check_successful N/A N/A mock_run N/A N/A N/A master fake_master N/A N/A mock_run return_value N/A 0 fake_output N/A expected_command N/A ssh -A -n %s sudo paasta_serviceinit -h master N/A actual N/A N/A utils check_ssh_and_sudo_on_master master N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A True None N/A N/A patch paasta_tools.cli.utils._run autospec True test_check_ssh_and_sudo_on_master_check_ssh_failure N/A N/A mock_run N/A N/A N/A master fake_master N/A N/A mock_run return_value N/A 255 fake_output N/A actual N/A N/A utils check_ssh_and_sudo_on_master master N/A N/A N/A actual N/A 0 False N/A N/A fake_output N/A actual N/A 1 N/A N/A 255 N/A actual N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_check_ssh_and_sudo_on_master_check_sudo_failure N/A N/A mock_run N/A N/A N/A master fake_master N/A N/A mock_run return_value N/A 1 fake_output N/A actual N/A N/A utils check_ssh_and_sudo_on_master master N/A N/A N/A actual N/A 0 False N/A N/A 1 N/A actual N/A 1 N/A N/A fake_output N/A actual N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_run_paasta_serviceinit_status N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_serviceinit fake_service.fake_instance status  N/A actual N/A N/A utils run_paasta_serviceinit status fake_master fake_service fake_instance fake_cluster N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_run_paasta_serviceinit_status_verbose N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_serviceinit -v fake_service.fake_instance status  N/A actual N/A N/A utils run_paasta_serviceinit status fake_master fake_service fake_instance fake_cluster verbose 1 N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_run_paasta_serviceinit_status_verbose_multi N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_serviceinit -v -v -v -v fake_service.fake_instance status  N/A actual N/A N/A utils run_paasta_serviceinit status fake_master fake_service fake_instance fake_cluster verbose 4 N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_run_paasta_metastatus N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_metastatus N/A actual N/A N/A utils run_paasta_metastatus fake_master N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_run_paasta_metastatus_verbose N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_metastatus -v N/A actual N/A N/A utils run_paasta_metastatus fake_master True N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_execute_paasta_serviceinit_status_on_remote_master_happy_path N/A N/A mock_run_paasta_serviceinit mock_find_connectable_master mock_calculate_remote_masters N/A N/A N/A cluster fake_cluster_name N/A service fake_service N/A instancename fake_instance N/A remote_masters N/A fake_master1 fake_master2 fake_master3 N/A N/A mock_calculate_remote_masters return_value N/A remote_masters None N/A N/A mock_find_connectable_master return_value N/A fake_connectable_master None N/A actual N/A N/A utils execute_paasta_serviceinit_on_remote_master status cluster service instancename N/A N/A N/A mock_calculate_remote_masters assert_called_once_with cluster N/A N/A N/A mock_find_connectable_master assert_called_once_with remote_masters N/A N/A N/A mock_run_paasta_serviceinit assert_called_once_with status fake_connectable_master service instancename cluster N/A N/A actual N/A mock_run_paasta_serviceinit return_value N/A N/A patch paasta_tools.cli.utils.calculate_remote_masters autospec True N/A patch paasta_tools.cli.utils.find_connectable_master autospec True N/A patch paasta_tools.cli.utils.run_paasta_serviceinit autospec True test_run_paasta_serviceinit_scaling N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A unused fake_output N/A expected_command ssh -A -n fake_master sudo paasta_serviceinit -v fake_service.fake_instance status --delta 1 N/A actual N/A N/A utils run_paasta_serviceinit status fake_master fake_service fake_instance fake_cluster verbose 1 delta 1 N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A N/A mock_run return_value N/A 1 N/A N/A patch paasta_tools.cli.utils._run autospec True test_execute_paasta_serviceinit_on_remote_no_connectable_master N/A N/A mock_run_paasta_serviceinit mock_check_ssh_and_sudo_on_master mock_find_connectable_master mock_calculate_remote_masters N/A N/A N/A cluster fake_cluster_name N/A service fake_service N/A instancename fake_instance N/A N/A mock_find_connectable_master return_value N/A None fake_err_msg N/A N/A mock_calculate_remote_masters return_value N/A N/A fake_master None N/A actual N/A N/A utils execute_paasta_serviceinit_on_remote_master status cluster service instancename N/A N/A N/A mock_check_ssh_and_sudo_on_master call_count 0 N/A N/A N/A ERROR: could not find connectable master in cluster %s cluster actual N/A N/A fake_err_msg actual N/A N/A patch paasta_tools.cli.utils.calculate_remote_masters autospec True N/A patch paasta_tools.cli.utils.find_connectable_master autospec True N/A patch paasta_tools.cli.utils.check_ssh_and_sudo_on_master autospec True N/A patch paasta_tools.cli.utils.run_paasta_serviceinit autospec True test_execute_paasta_metastatus_on_remote_master N/A N/A mock_run_paasta_metastatus mock_find_connectable_master mock_calculate_remote_masters N/A N/A N/A cluster fake_cluster_name N/A remote_masters N/A fake_master1 fake_master2 fake_master3 N/A N/A mock_calculate_remote_masters return_value N/A remote_masters None N/A N/A mock_find_connectable_master return_value N/A fake_connectable_master None N/A actual N/A N/A utils execute_paasta_metastatus_on_remote_master cluster N/A N/A N/A mock_calculate_remote_masters assert_called_once_with cluster N/A N/A N/A mock_find_connectable_master assert_called_once_with remote_masters N/A N/A N/A mock_run_paasta_metastatus assert_called_once_with fake_connectable_master False N/A N/A actual N/A mock_run_paasta_metastatus return_value N/A N/A patch paasta_tools.cli.utils.calculate_remote_masters autospec True N/A patch paasta_tools.cli.utils.find_connectable_master autospec True N/A patch paasta_tools.cli.utils.run_paasta_metastatus autospec True test_execute_paasta_metastatus_on_remote_no_connectable_master N/A N/A mock_run_paasta_metastatus mock_check_ssh_and_sudo_on_master mock_find_connectable_master mock_calculate_remote_masters N/A N/A N/A cluster fake_cluster_name N/A N/A mock_find_connectable_master return_value N/A None fake_err_msg N/A N/A mock_calculate_remote_masters return_value N/A N/A fake_master None N/A actual N/A N/A utils execute_paasta_metastatus_on_remote_master cluster N/A N/A N/A mock_check_ssh_and_sudo_on_master call_count 0 N/A N/A N/A ERROR: could not find connectable master in cluster %s cluster actual N/A N/A fake_err_msg actual N/A N/A patch paasta_tools.cli.utils.calculate_remote_masters autospec True N/A patch paasta_tools.cli.utils.find_connectable_master autospec True N/A patch paasta_tools.cli.utils.check_ssh_and_sudo_on_master autospec True N/A patch paasta_tools.cli.utils.run_paasta_metastatus autospec True test_execute_chronos_rerun_on_remote_master N/A N/A test_case N/A N/A N/A N/A N/A contextlib nested N/A patch paasta_tools.cli.utils.calculate_remote_masters autospec True N/A patch paasta_tools.cli.utils.find_connectable_master autospec True N/A patch paasta_tools.cli.utils.run_chronos_rerun autospec True N/A mock_calculate_remote_masters mock_find_connectable_master mock_run_chronos_rerun N/A N/A N/A N/A mock_calculate_remote_masters return_value N/A mock_find_connectable_master return_value N/A mock_run_chronos_rerun return_value test_case N/A outcome N/A N/A utils execute_chronos_rerun_on_remote_master service instance cluster verbose 1 N/A N/A N/A N/A type outcome tuple N/A N/A len outcome 2 N/A N/A type N/A outcome N/A 0 int N/A N/A type N/A outcome N/A 1 str N/A N/A N/A bool N/A mock_find_connectable_master return_value N/A mock_find_connectable_master called N/A N/A N/A bool N/A mock_run_chronos_rerun return_value N/A mock_run_chronos_rerun called N/A N/A N/A mark parametrize test_case N/A N/A N/A N/A fake_master1 fake_master2 None N/A fake_connectable_master None N/A 0 OK N/A N/A N/A Error in calculate_remote_masters None None N/A N/A N/A fake_master1 fake_master2 None N/A None Error in find_connectable_master None test_list_service_instances N/A N/A mock_list_services mock_list_instances N/A N/A N/A N/A mock_list_services return_value N/A fake_service N/A N/A mock_list_instances return_value N/A canary main N/A expected N/A fake_service.canary fake_service.main N/A actual N/A N/A utils list_service_instances N/A N/A actual expected N/A N/A patch paasta_tools.cli.utils.list_all_instances_for_service N/A patch paasta_tools.cli.utils.list_services test_list_paasta_services N/A N/A mock_list_services mock_list_instances N/A N/A N/A N/A mock_list_services return_value N/A fake_service N/A N/A mock_list_instances return_value N/A canary main N/A expected N/A fake_service N/A actual N/A N/A utils list_paasta_services N/A N/A actual expected N/A N/A patch paasta_tools.cli.utils.list_all_instances_for_service N/A patch paasta_tools.cli.utils.list_services test_list_instances_with_autodetect N/A N/A mock_list_instance_for_service mock_validate_service_name mock_guess_service_name N/A N/A N/A expected N/A instance1 instance2 instance3 N/A N/A mock_guess_service_name return_value fake_service N/A N/A mock_validate_service_name return_value None N/A N/A mock_list_instance_for_service return_value expected N/A actual N/A N/A utils list_instances N/A N/A actual expected N/A N/A N/A mock_validate_service_name assert_called_once_with fake_service N/A N/A N/A mock_list_instance_for_service assert_called_once_with fake_service N/A N/A patch paasta_tools.cli.utils.guess_service_name N/A patch paasta_tools.cli.utils.validate_service_name N/A patch paasta_tools.cli.utils.list_all_instances_for_service test_list_instances_no_service N/A N/A mock_list_services mock_list_instance_for_service mock_validate_service_name mock_guess_service_name N/A N/A N/A expected N/A instance1 instance2 instance3 N/A N/A mock_guess_service_name return_value unused N/A N/A mock_list_services return_value N/A fake_service1 N/A N/A mock_validate_service_name side_effect N/A N/A utils NoSuchService None N/A N/A mock_list_instance_for_service return_value expected N/A actual N/A N/A utils list_instances N/A N/A N/A mock_validate_service_name assert_called_once_with unused N/A N/A N/A mock_list_instance_for_service assert_called_once_with fake_service1 N/A N/A actual expected N/A N/A patch paasta_tools.cli.utils.guess_service_name N/A patch paasta_tools.cli.utils.validate_service_name N/A patch paasta_tools.cli.utils.list_all_instances_for_service N/A patch paasta_tools.cli.utils.list_services test_list_teams N/A N/A N/A N/A N/A fake_team_data N/A team_data N/A red_jaguars blue_barracudas N/A pagerduty_api_key pages_irc_channel notifications_irc_channel notification_email project aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa red_jaguars_pages red_jaguars_notifications red_jaguars+alert@yelp.com REDJAGS N/A pagerduty_api_key pages_irc_channel bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb blue_barracudas_pages N/A expected N/A set N/A red_jaguars blue_barracudas N/A N/A N/A mock patch paasta_tools.cli.utils._load_sensu_team_data autospec True return_value fake_team_data N/A N/A actual N/A N/A utils list_teams N/A N/A actual expected N/A test_lazy_choices_completer N/A N/A N/A N/A N/A completer N/A N/A utils lazy_choices_completer N/A N/A N/A N/A N/A 1 2 3 N/A N/A N/A completer prefix N/A 1 2 3 N/A test_guess_cluster_uses_provided_cluster N/A N/A N/A N/A N/A args N/A N/A mock MagicMock N/A N/A args cluster fake_cluster N/A actual N/A N/A utils guess_cluster service fake_service args args N/A N/A actual fake_cluster N/A test_guess_cluster_when_missing_cluster_exception N/A N/A mock_get_default_cluster_for_service N/A N/A N/A N/A mock_get_default_cluster_for_service side_effect N/A NoConfigurationForServiceError N/A fake_service fake_service N/A args N/A N/A mock MagicMock N/A N/A args service fake_service N/A N/A args instance fake_instance N/A N/A args cluster None N/A N/A raises SystemExit excinfo N/A N/A N/A N/A utils guess_cluster service fake_service args args N/A N/A N/A N/A excinfo value code 2 N/A N/A N/A mock patch paasta_tools.cli.utils.get_default_cluster_for_service autospec True test_guess_instance_uses_provided_cluster N/A N/A N/A N/A N/A args N/A N/A mock MagicMock N/A N/A args instance fake_instance1 N/A actual N/A N/A utils guess_instance service fake_service cluster None args args N/A N/A actual fake_instance1 N/A test_guess_instances_uses_main_if_available N/A N/A mock_list_all_instances_for_service N/A N/A N/A N/A mock_list_all_instances_for_service return_value N/A a b main c N/A args N/A N/A mock MagicMock N/A N/A args instance None N/A actual N/A N/A utils guess_instance service fake_service cluster None args args N/A N/A actual main N/A N/A N/A mock patch paasta_tools.cli.utils.list_all_instances_for_service autospec True test_guess_instances_picks_something N/A N/A mock_list_all_instances_for_service N/A N/A N/A N/A mock_list_all_instances_for_service return_value N/A a b c N/A args N/A N/A mock MagicMock N/A N/A args instance None N/A actual N/A N/A utils guess_instance service fake_service cluster None args args N/A N/A actual N/A a b c N/A N/A N/A mock patch paasta_tools.cli.utils.list_all_instances_for_service autospec True test_guess_instance_fails_when_instance_is_not_provided N/A N/A mock_list_all_instances_for_service N/A N/A N/A N/A mock_list_all_instances_for_service side_effect N/A NoConfigurationForServiceError N/A fake_service fake_service N/A args N/A N/A mock MagicMock N/A N/A args service fake_service N/A N/A args cluster None N/A N/A args instance None N/A N/A raises SystemExit excinfo N/A N/A N/A N/A utils guess_instance service fake_service cluster None args args N/A N/A N/A N/A excinfo value code 2 N/A N/A N/A mock patch paasta_tools.cli.utils.list_all_instances_for_service autospec True test_modules_in_pkg N/A N/A N/A N/A paasta_tools.cli cmds N/A ret N/A tuple N/A N/A utils modules_in_pkg cmds N/A N/A __init__ ret N/A N/A cook_image ret N/A N/A list_clusters ret N/A test_get_instance_config_marathon N/A N/A mock_load_marathon_service_config mock_validate_service_instance N/A N/A N/A N/A mock_validate_service_instance return_value marathon N/A N/A mock_load_marathon_service_config return_value fake_service_config N/A actual N/A N/A utils get_instance_config service fake_service instance fake_instance cluster fake_cluster soa_dir fake_soa_dir N/A N/A N/A mock_validate_service_instance call_count 1 N/A N/A N/A mock_load_marathon_service_config call_count 1 N/A N/A actual fake_service_config N/A N/A N/A mock patch paasta_tools.cli.utils.validate_service_instance autospec True N/A N/A mock patch paasta_tools.cli.utils.load_marathon_service_config autospec True test_get_instance_Config_chronos N/A N/A mock_load_chronos_job_config mock_validate_service_instance N/A N/A N/A N/A mock_validate_service_instance return_value chronos N/A N/A mock_load_chronos_job_config return_value fake_service_config N/A actual N/A N/A utils get_instance_config service fake_service instance fake_instance cluster fake_cluster soa_dir fake_soa_dir N/A N/A N/A mock_validate_service_instance call_count 1 N/A N/A N/A mock_load_chronos_job_config call_count 1 N/A N/A actual fake_service_config N/A N/A N/A mock patch paasta_tools.cli.utils.validate_service_instance autospec True N/A N/A mock patch paasta_tools.cli.utils.load_chronos_job_config autospec True test_get_instance_config_unknown N/A N/A mock_validate_service_instance N/A N/A N/A N/A raises NotImplementedError N/A N/A N/A mock_validate_service_instance return_value some bogus unsupported framework N/A N/A N/A utils get_instance_config service fake_service instance fake_instance cluster fake_cluster soa_dir fake_soa_dir N/A N/A N/A mock_validate_service_instance call_count 1 N/A N/A N/A mock patch paasta_tools.cli.utils.validate_service_instance autospec True test_run_chronos_rerun N/A N/A mock_run N/A N/A N/A N/A mock_run return_value N/A 0 fake_output N/A expected_command ssh -A -n fake_master 'sudo chronos_rerun -v -v "a_service an_instance" "2016-04-08T02:37:27"' N/A actual N/A N/A utils run_chronos_rerun fake_master a_service an_instance verbose 2 execution_date 2016-04-08T02:37:27 N/A N/A N/A mock_run assert_called_once_with expected_command timeout N/A mock ANY N/A N/A actual N/A mock_run return_value N/A N/A patch paasta_tools.cli.utils._run autospec True