Module Import alias ImportFrom alias identifier ImportFrom alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias identifier Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults AttributeLoad NameLoad attr body Expr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareIn NameLoad TupleLoad Str Str body If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Call NameLoad Str attr keyword NameLoad keyword NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign AttributeStore NameLoad attr Lambda arguments args defaults NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad TryExcept body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type AttributeLoad AttributeLoad NameLoad attr attr name NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore SubscriptLoad NameLoad Index Str handlers ExceptHandler type TupleLoad NameLoad NameLoad body Pass Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore AttributeLoad NameLoad attr If NameLoad body AugAssignAdd NameStore Call AttributeLoad NameLoad attr BinOpAdd Str Call AttributeLoad NameLoad attr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AugAssignAdd NameStore BinOpAdd Str NameLoad Return NameLoad decorator_list decorator_list
N/A N/A posixpath oslo_log log logging oslo_serialization jsonutils json N/A six six.moves urllib sahara.i18n _LW sahara.plugins.cdh exceptions ex N/A LOG N/A N/A logging getLogger __name__ HttpClient N/A object N/A N/A Basic HTTP client tailored for rest APIs. __init__ N/A N/A self base_url exc_class N/A N/A ex CMApiException N/A N/A Init Method

        :param base_url: The base url to the API.
        :param exc_class: An exception class to handle non-200 results.

        Creates an HTTP(S) client to connect to the Cloudera Manager API.
         N/A N/A self _base_url N/A N/A base_url rstrip / N/A N/A self _exc_class exc_class N/A N/A self _headers N/A N/A N/A self _passmgr N/A N/A N/A urllib request HTTPPasswordMgrWithDefaultRealm N/A authhandler N/A N/A N/A urllib request HTTPBasicAuthHandler N/A self _passmgr N/A cookiejar N/A N/A N/A N/A six moves http_cookiejar CookieJar N/A N/A self _opener N/A N/A N/A urllib request build_opener N/A N/A N/A urllib request HTTPErrorProcessor N/A N/A N/A urllib request HTTPCookieProcessor cookiejar authhandler N/A set_basic_auth N/A N/A self username password realm N/A N/A N/A Set up basic auth for the client

        :param username: Login name.
        :param password: Login password.
        :param realm: The authentication realm.
        :return: The current object
         N/A N/A N/A N/A self _passmgr add_password realm N/A self _base_url username password N/A self N/A set_headers N/A N/A self headers N/A N/A N/A Add headers to the request

        :param headers: A dictionary with the key value pairs for the headers
        :return: The current object
         N/A N/A self _headers headers N/A self N/A base_url N/A N/A self N/A N/A N/A N/A self _base_url N/A property _get_headers N/A N/A self headers N/A N/A N/A res N/A N/A N/A self _headers copy N/A headers N/A N/A N/A N/A res update headers N/A res N/A execute N/A N/A self http_method path params data headers N/A None None None N/A N/A Submit an HTTP request

        :param http_method: GET, POST, PUT, DELETE
        :param path: The path of the resource.
        :param params: Key-value parameter data.
        :param data: The data to attach to the body of the request.
        :param headers: The headers to set for this request.

        :return: The result of urllib.request.urlopen()
         N/A url N/A N/A self _make_url path params N/A N/A http_method N/A GET DELETE N/A N/A N/A data None N/A N/A N/A N/A LOG warning N/A N/A N/A _LW {method} method does not pass any data. Path {path} format method http_method path path N/A data None N/A request N/A N/A N/A urllib request Request url data N/A N/A request get_method N/A N/A N/A N/A http_method N/A headers N/A N/A self _get_headers headers N/A N/A k v N/A N/A headers items N/A N/A N/A N/A request add_header k v N/A N/A N/A LOG debug N/A N/A Method: {method}, URL: {url} format method http_method url url N/A N/A N/A N/A N/A N/A self _opener open request N/A N/A N/A N/A N/A urllib error HTTPError N/A ex N/A N/A message N/A N/A six text_type ex N/A N/A N/A json_body N/A N/A json loads message N/A message N/A json_body N/A message N/A N/A N/A N/A ValueError KeyError N/A N/A N/A N/A N/A self _exc_class message N/A _make_url N/A N/A self path params N/A N/A N/A res N/A self _base_url N/A path N/A N/A res N/A N/A posixpath normpath N/A / N/A N/A path lstrip / N/A params N/A N/A param_str N/A N/A N/A urllib parse urlencode params True N/A res N/A ? param_str N/A res N/A N/A