Module Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Dict Str Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Num Assign AttributeStore AttributeLoad NameLoad attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Pass Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Num Index Str Index Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Dict Str Dict Str Str Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword NameLoad keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Expr Call AttributeLoad NameLoad attr Str Dict Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Call AttributeLoad NameLoad attr Dict Str Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Num Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Dict Str Str Expr Call AttributeLoad NameLoad attr Num SubscriptLoad NameLoad Index Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Call AttributeLoad NameLoad attr Dict Str Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Str Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad Str Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Call AttributeLoad NameLoad attr Dict Str Str Dict Str Str Dict Str Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Str Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Assign AttributeStore AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Str NameLoad Str Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Str keyword Call AttributeLoad NameLoad attr Dict Str Str Dict Str Str Dict Str Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Num Assign NameStore Dict Str Str Str Str Str Num Assign AttributeStore NameLoad attr ListLoad NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr ListLoad Call AttributeLoad NameLoad attr Str Str Call AttributeLoad NameLoad attr Str Str decorator_list Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str Str Str Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Str decorator_list Call AttributeLoad NameLoad attr Str decorator_list
N/A N/A mock oslo_serialization jsonutils sahara.plugins.ambari client ambari_client sahara.plugins exceptions p_exc sahara.tests.unit base AmbariClientTestCase N/A N/A base SaharaTestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super AmbariClientTestCase self setUp N/A N/A self http_client N/A N/A mock Mock N/A N/A N/A self http_client get N/A N/A mock Mock N/A N/A N/A self http_client post N/A N/A mock Mock N/A N/A N/A self http_client put N/A N/A mock Mock N/A N/A N/A self http_client delete N/A N/A mock Mock N/A N/A self headers N/A X-Requested-By sahara N/A N/A self remote N/A N/A mock Mock N/A N/A N/A N/A self remote get_http_client return_value N/A self http_client N/A N/A self instance N/A N/A mock Mock N/A N/A N/A N/A self instance remote return_value N/A self remote N/A N/A N/A self instance management_ip 1.2.3.4 N/A N/A self good_pending_resp N/A N/A mock MagicMock N/A N/A N/A self good_pending_resp status_code 200 N/A N/A N/A self good_pending_resp text {"Requests": {"id": 1, "status": "PENDING"}} N/A test_init_client_default N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A self assertEqual N/A self http_client N/A client _http_client N/A N/A N/A self assertEqual http://1.2.3.4:8080/api/v1 N/A client _base_url N/A N/A N/A self assertEqual admin N/A N/A client _auth username N/A N/A N/A self assertEqual admin N/A N/A client _auth password N/A N/A N/A N/A N/A self remote get_http_client assert_called_with 8080 N/A test_init_client_manual N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance port 1234 username user password pass N/A N/A N/A self assertEqual http://1.2.3.4:1234/api/v1 N/A client _base_url N/A N/A N/A self assertEqual user N/A N/A client _auth username N/A N/A N/A self assertEqual pass N/A N/A client _auth password N/A N/A N/A N/A N/A self remote get_http_client assert_called_with 1234 N/A test_close_http_session N/A N/A self N/A N/A N/A N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A N/A N/A N/A N/A self remote close_http_session assert_called_with 8080 N/A test_get_method N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A client get http://spam N/A N/A N/A N/A N/A self http_client get assert_called_with http://spam verify False auth N/A client _auth headers N/A self headers N/A test_post_method N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A client post http://spam data data N/A N/A N/A N/A N/A self http_client post assert_called_with http://spam data data verify False auth N/A client _auth headers N/A self headers N/A test_put_method N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A client put http://spam data data N/A N/A N/A N/A N/A self http_client put assert_called_with http://spam data data verify False auth N/A client _auth headers N/A self headers N/A test_delete_method N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A client delete http://spam N/A N/A N/A N/A N/A self http_client delete assert_called_with http://spam verify False auth N/A client _auth headers N/A self headers N/A test_get_registered_hosts N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A resp_data {
  "href" : "http://1.2.3.4:8080/api/v1/hosts",
  "items" : [
    {
      "href" : "http://1.2.3.4:8080/api/v1/hosts/host1",
      "Hosts" : {
        "host_name" : "host1"
      }
    },
    {
      "href" : "http://1.2.3.4:8080/api/v1/hosts/host2",
      "Hosts" : {
        "host_name" : "host2"
      }
    },
    {
      "href" : "http://1.2.3.4:8080/api/v1/hosts/host3",
      "Hosts" : {
        "host_name" : "host3"
      }
    }
  ]
} N/A resp N/A N/A mock Mock N/A N/A resp text resp_data N/A N/A resp status_code 200 N/A N/A N/A N/A self http_client get return_value resp N/A hosts N/A N/A client get_registered_hosts N/A N/A N/A N/A N/A self http_client get assert_called_with http://1.2.3.4:8080/api/v1/hosts verify False auth N/A client _auth headers N/A self headers N/A N/A N/A self assertEqual 3 N/A len hosts N/A N/A N/A self assertEqual host1 N/A N/A N/A hosts N/A 0 N/A Hosts N/A host_name N/A N/A N/A self assertEqual host2 N/A N/A N/A hosts N/A 1 N/A Hosts N/A host_name N/A N/A N/A self assertEqual host3 N/A N/A N/A hosts N/A 2 N/A Hosts N/A host_name N/A test_update_user_password N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A resp N/A N/A mock Mock N/A N/A resp text N/A N/A resp status_code 200 N/A N/A N/A N/A self http_client put return_value resp N/A N/A N/A client update_user_password bart old_pw new_pw N/A exp_req N/A N/A jsonutils dumps N/A Users N/A old_password password old_pw new_pw N/A N/A N/A N/A N/A self http_client put assert_called_with http://1.2.3.4:8080/api/v1/users/bart data exp_req verify False auth N/A client _auth headers N/A self headers N/A test_create_blueprint N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A resp N/A N/A mock Mock N/A N/A resp text N/A N/A resp status_code 200 N/A N/A N/A N/A self http_client post return_value resp N/A N/A N/A client create_blueprint cluster_name N/A some data N/A N/A N/A N/A N/A self http_client post assert_called_with http://1.2.3.4:8080/api/v1/blueprints/cluster_name data N/A N/A jsonutils dumps N/A some data verify False auth N/A client _auth headers N/A self headers N/A test_create_cluster N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A resp N/A N/A mock Mock N/A N/A resp text {
    "Requests": {
        "id": 1,
        "status": "InProgress"
    }
} N/A N/A resp status_code 200 N/A N/A N/A N/A self http_client post return_value resp N/A req_info N/A N/A client create_cluster cluster_name N/A some data N/A N/A N/A self assertEqual 1 N/A req_info N/A id N/A N/A N/A N/A N/A self http_client post assert_called_with http://1.2.3.4:8080/api/v1/clusters/cluster_name data N/A N/A jsonutils dumps N/A some data verify False auth N/A client _auth headers N/A self headers N/A test_start_process_on_host N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A N/A N/A N/A self http_client put return_value N/A self good_pending_resp N/A N/A client wait_ambari_request N/A N/A mock MagicMock N/A instance N/A N/A mock MagicMock N/A N/A N/A instance fqdn return_value i1 N/A N/A N/A instance cluster name cl N/A N/A N/A client start_service_on_host instance HDFS STATE N/A N/A N/A N/A N/A self http_client put assert_called_with http://1.2.3.4:8080/api/v1/clusters/cl/hosts/i1/host_components/HDFS data N/A N/A jsonutils dumps N/A HostRoles RequestInfo N/A state STATE N/A context Starting service HDFS, moving to state STATE verify False auth N/A client _auth headers N/A self headers N/A test_stop_process_on_host N/A N/A self N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A check_mock N/A N/A mock MagicMock N/A N/A check_mock status_code 200 N/A N/A check_mock text {"HostRoles": {"state": "SOME_STATE"}} N/A N/A N/A N/A self http_client get return_value check_mock N/A N/A N/A N/A self http_client put return_value N/A self good_pending_resp N/A N/A client wait_ambari_request N/A N/A mock MagicMock N/A instance N/A N/A mock MagicMock N/A N/A N/A instance fqdn return_value i1 N/A N/A N/A client stop_process_on_host cluster_name instance p1 N/A N/A N/A N/A N/A self http_client put assert_called_with http://1.2.3.4:8080/api/v1/clusters/cluster_name/hosts/i1/host_components/p1 data N/A N/A jsonutils dumps N/A HostRoles RequestInfo N/A state INSTALLED N/A context Stopping p1 verify False auth N/A client _auth headers N/A self headers N/A test_wait_ambari_request N/A N/A self mock_context N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A check_mock N/A N/A mock MagicMock N/A d1 N/A request_context request_status progress_percent r1 PENDING 42 N/A d2 N/A request_context request_status progress_percent r1 COMPLETED 100 N/A N/A check_mock side_effect N/A d1 d2 N/A N/A client check_request_status check_mock N/A N/A N/A client wait_ambari_request id1 c1 N/A N/A N/A check_mock assert_has_calls N/A N/A N/A mock call c1 id1 N/A N/A mock call c1 id1 N/A N/A N/A mock patch sahara.plugins.ambari.client.context test_wait_ambari_request_error N/A N/A self mock_context N/A N/A N/A client N/A N/A ambari_client AmbariClient N/A self instance N/A check_mock N/A N/A mock MagicMock N/A d1 N/A request_context request_status progress_percent r1 ERROR 146 N/A N/A check_mock return_value d1 N/A N/A client check_request_status check_mock N/A N/A N/A self assertRaises N/A p_exc HadoopProvisionError N/A client wait_ambari_request id1 c1 N/A N/A N/A mock patch sahara.plugins.ambari.client.context N/A