Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str TryExcept body If BoolOpOr Call NameLoad NameLoad NameLoad Call AttributeLoad NameLoad attr body Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad Call NameLoad NameLoad attr Str body Pass orelse Raise TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass If CompareEq Call NameLoad NameLoad Num body Assign NameStore Dict TryExcept body If CompareIn Str AttributeLoad AttributeLoad NameLoad attr attr body Assign SubscriptStore NameLoad Index AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Assign SubscriptStore NameLoad Index Str NameLoad handlers ExceptHandler type NameLoad body Pass TryExcept body Return Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad Call NameLoad NameLoad attr Str body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad Call NameLoad NameLoad attr Str body Assign NameStore BinOpMod Str TupleLoad Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad Raise Call AttributeLoad NameLoad attr NameLoad orelse Pass For NameStore Call AttributeLoad NameLoad attr body If BoolOpOr CompareEq Call AttributeLoad NameLoad attr Str NameLoad CompareEq Call AttributeLoad NameLoad attr Str NameLoad body Return NameLoad orelse Assign NameStore BinOpMod Str NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Str For NameStore Call NameLoad NameLoad body Assign NameStore BinOpAdd BinOpAdd BinOpAdd BinOpAdd NameLoad NameLoad Str Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Str Return SubscriptLoad NameLoad Slice Num decorator_list FunctionDef arguments args NameParam NameParam defaults Str body Expr Str Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body TryExcept body If Call NameLoad NameLoad NameLoad body Return SubscriptLoad NameLoad Index NameLoad orelse Return Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body Assign NameStore BinOpMod Str NameLoad Raise Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore ListLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore ListLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Str Assign NameStore Call NameLoad NameLoad NameLoad Str If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call SubscriptLoad NameLoad Index NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore ListLoad If CompareIs NameLoad NameLoad body Assign NameStore Dict Assign NameStore ListLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Str Str orelse Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Str Assign NameStore IfExp CompareIn NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad Str If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call SubscriptLoad NameLoad Index NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str For NameStore Call NameLoad NameLoad body Assign NameStore NameLoad If CompareIn Str NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str Num If UnaryOpNot NameLoad body Assign NameStore Str Raise Call AttributeLoad NameLoad attr NameLoad If CompareNotIn NameLoad ListLoad Str Str body If UnaryOpNot NameLoad body Assign NameStore Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Raise Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults Call NameLoad NameLoad NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults vararg kwarg body Expr Str For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr Str Str decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore SubscriptLoad NameLoad Index Call NameLoad NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Call AttributeLoad Str attr Call NameLoad Call AttributeLoad NameLoad attr Raise Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str ListLoad Str ListLoad Str Num NameLoad body Expr Str While NameLoad body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad Str attr If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break orelse If CompareIn NameLoad NameLoad body Assign NameStore NameLoad Break If NameLoad body Assign NameStore BoolOpOr Call NameLoad NameLoad Str NameLoad Num Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Str ListLoad Str ListLoad Str Num Num NameLoad body Expr Str Assign NameStore Num While CompareLt NameLoad NameLoad body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareIn AttributeLoad Call NameLoad NameLoad attr NameLoad body Return NameLoad Raise Assign NameStore Call AttributeLoad Call NameLoad NameLoad NameLoad Str attr If CompareIn NameLoad NameLoad body Return NameLoad If NameLoad body Assign NameStore BoolOpOr Call NameLoad NameLoad Str NameLoad Num Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr For NameStore AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BoolOpOr NameLoad Str If BoolOpAnd Call NameLoad NameLoad Str Call AttributeLoad NameLoad attr body TryExcept body While NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Str NameLoad If CompareEq NameLoad NameLoad body Return NameLoad Print Str handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr Str Raise Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Return NameLoad handlers ExceptHandler type NameLoad body Assign NameStore Str Raise Call AttributeLoad NameLoad attr BinOpMod NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Dict If NameLoad body Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr Str Return NameLoad handlers ExceptHandler type NameLoad body Return NameLoad decorator_list
N/A N/A Common client utilities N/A getpass N/A logging N/A os N/A six N/A time oslo_utils importutils openstackclient.common exceptions find_resource N/A N/A manager name_or_id N/A kwargs N/A N/A Helper for the _find_* methods.

    :param manager: A client manager class
    :param name_or_id: The resource we are trying to find
    :param kwargs: To be used in calling .find()
    :rtype: The found resource

    This method will attempt to find a resource in a variety of ways.
    Primarily .get() methods will be called with `name_or_id` as an integer
    value, and tried again as a string value.

    If both fail, then a .find() is attempted, which is essentially calling
    a .list() function with a 'name' query parameter that is set to
    `name_or_id`.

    Lastly, if any kwargs are passed in, they will be treated as additional
    query parameters. This is particularly handy in the case of finding
    resources in a domain.

     N/A N/A N/A N/A N/A isinstance name_or_id int N/A N/A name_or_id isdigit N/A N/A N/A N/A manager get N/A int name_or_id kwargs N/A N/A N/A Exception N/A ex N/A N/A N/A N/A N/A type ex __name__ NotFound N/A N/A N/A N/A N/A N/A N/A N/A N/A manager get name_or_id kwargs N/A N/A N/A Exception N/A N/A N/A N/A N/A len kwargs 0 N/A N/A kwargs N/A N/A N/A N/A N/A NAME_ATTR N/A N/A manager resource_class __dict__ N/A N/A N/A kwargs N/A N/A N/A manager resource_class NAME_ATTR name_or_id N/A N/A N/A kwargs N/A name name_or_id N/A N/A N/A Exception N/A N/A N/A N/A N/A N/A N/A manager find kwargs N/A N/A N/A Exception N/A ex N/A N/A N/A N/A N/A type ex __name__ NotFound N/A N/A msg N/A No %s with a name or ID of '%s' exists. N/A N/A N/A N/A N/A manager resource_class __name__ lower name_or_id N/A N/A N/A exceptions CommandError msg N/A N/A N/A N/A type ex __name__ NoUniqueMatch N/A N/A msg N/A More than one %s exists with the name '%s'. N/A N/A N/A N/A N/A manager resource_class __name__ lower name_or_id N/A N/A N/A exceptions CommandError msg N/A N/A N/A resource N/A N/A manager list N/A N/A N/A N/A N/A N/A resource get id name_or_id N/A N/A N/A resource get name name_or_id N/A N/A resource N/A N/A msg N/A Could not find resource %s name_or_id N/A N/A N/A exceptions CommandError msg N/A format_dict N/A N/A data N/A N/A N/A Return a formatted string of key value pairs

    :param data: a dict
    :rtype: a string formatted to key='value'
     N/A output N/A s N/A sorted data N/A N/A output N/A N/A N/A N/A output s =' N/A N/A six text_type N/A data N/A s ',  N/A N/A output N/A -2 N/A format_list N/A N/A data separator N/A ,  N/A N/A Return a formatted strings

    :param data: a list of strings
    :param separator: the separator to use between strings (default: ', ')
    :rtype: a string formatted based on separator
     N/A N/A N/A separator join N/A sorted data N/A format_list_of_dicts N/A N/A data N/A N/A N/A Return a formatted string of key value pairs for each dict

    :param data: a list of dicts
    :rtype: a string formatted to key='value' with dicts separated by new line
     N/A N/A N/A join N/A N/A format_dict i N/A i data N/A get_field N/A N/A item field N/A N/A N/A N/A N/A N/A isinstance item dict N/A N/A N/A item N/A field N/A N/A N/A getattr item field N/A N/A N/A Exception N/A N/A msg N/A Resource doesn't have field %s field N/A N/A N/A exceptions CommandError msg N/A get_item_properties N/A N/A item fields mixed_case_fields formatters N/A None None N/A N/A Return a tuple containing the item properties.

    :param item: a single item resource (e.g. Server, Project, etc)
    :param fields: tuple of strings with the desired field names
    :param mixed_case_fields: tuple of field names to preserve case
    :param formatters: dictionary mapping field names to callables
       to format the values
     N/A N/A mixed_case_fields None N/A N/A mixed_case_fields N/A N/A N/A formatters None N/A N/A formatters N/A N/A row N/A N/A field fields N/A N/A N/A field mixed_case_fields N/A N/A field_name N/A N/A field replace _ N/A N/A field_name N/A N/A N/A N/A field lower replace _ N/A data N/A getattr item field_name N/A N/A field formatters N/A N/A N/A N/A row append N/A N/A formatters N/A field data N/A N/A N/A N/A row append data N/A N/A tuple row N/A get_dict_properties N/A N/A item fields mixed_case_fields formatters N/A None None N/A N/A Return a tuple containing the item properties.

    :param item: a single dict resource
    :param fields: tuple of strings with the desired field names
    :param mixed_case_fields: tuple of field names to preserve case
    :param formatters: dictionary mapping field names to callables
       to format the values
     N/A N/A mixed_case_fields None N/A N/A mixed_case_fields N/A N/A N/A formatters None N/A N/A formatters N/A N/A row N/A N/A field fields N/A N/A N/A field mixed_case_fields N/A N/A field_name N/A N/A field replace _ N/A N/A field_name N/A N/A N/A N/A field lower replace _ N/A data N/A N/A field_name item N/A item N/A field_name N/A N/A field formatters N/A N/A N/A N/A row append N/A N/A formatters N/A field data N/A N/A N/A N/A row append data N/A N/A tuple row N/A sort_items N/A N/A items sort_str N/A N/A N/A Sort items based on sort keys and sort directions given by sort_str.

    :param items: a list or generator object of items
    :param sort_str: a string defining the sort rules, the format is
        '<key1>:[direction1],<key2>:[direction2]...', direction can be 'asc'
        for ascending or 'desc' for descending, if direction is not given,
        it's ascending by default
    :return: sorted items
     N/A N/A sort_str N/A N/A items N/A items N/A list items N/A sort_keys N/A N/A N/A N/A sort_str strip split , N/A sort_key N/A reversed sort_keys N/A N/A reverse False N/A N/A : sort_key N/A N/A N/A sort_key direction N/A N/A sort_key split : 1 N/A N/A sort_key N/A N/A msg empty string is not a valid sort key N/A N/A N/A exceptions CommandError msg N/A N/A direction N/A asc desc N/A N/A N/A direction N/A N/A direction empty string N/A msg N/A %s is not a valid sort direction for sort key %s, use asc or desc instead N/A direction sort_key N/A N/A N/A exceptions CommandError msg N/A N/A direction desc N/A N/A reverse True N/A N/A N/A items sort key N/A N/A N/A item N/A N/A get_field item sort_key reverse reverse N/A items N/A env N/A N/A N/A vars kwargs N/A N/A Search for the first defined of possibly many env vars

    Returns the first environment variable defined in vars, or
    returns the default defined in kwargs.
     N/A v vars N/A N/A value N/A N/A N/A os environ get v None N/A value N/A N/A value N/A N/A N/A kwargs get default N/A get_client_class N/A N/A api_name version version_map N/A N/A N/A Returns the client class for the requested API version

    :param api_name: the name of the API, e.g. 'compute', 'image', etc
    :param version: the requested API version
    :param version_map: a dict of client classes keyed by version
    :rtype: a client class for the requested API version
     N/A N/A N/A client_path N/A version_map N/A N/A str version N/A N/A N/A N/A KeyError ValueError N/A N/A msg N/A Invalid %s client version '%s'. must be one of: %s N/A api_name version N/A N/A ,  join N/A list N/A N/A version_map keys N/A N/A N/A exceptions UnsupportedVersion msg N/A N/A N/A importutils import_class client_path N/A wait_for_status N/A N/A status_f res_id status_field success_status error_status sleep_time callback N/A status N/A active N/A error 5 None N/A N/A Wait for status change on a resource during a long-running operation

    :param status_f: a status function that takes a single id argument
    :param res_id: the resource id to watch
    :param status_field: the status attribute in the returned resource object
    :param success_status: a list of status strings for successful completion
    :param error_status: a list of status strings for error
    :param sleep_time: wait this long (seconds)
    :param callback: called per sleep cycle, useful to display progress
    :rtype: True on success
     N/A True N/A N/A res N/A status_f res_id N/A status N/A N/A N/A getattr res status_field lower N/A N/A status success_status N/A N/A retval True N/A N/A N/A N/A status error_status N/A N/A retval False N/A N/A callback N/A N/A progress N/A N/A getattr res progress None 0 N/A N/A callback progress N/A N/A N/A time sleep sleep_time N/A retval N/A wait_for_delete N/A N/A manager res_id status_field error_status exception_name sleep_time timeout callback N/A status N/A error N/A NotFound 5 300 None N/A N/A Wait for resource deletion

    :param manager: the manager from which we can get the resource
    :param res_id: the resource id to watch
    :param status_field: the status attribute in the returned resource object,
        this is used to check for error states while the resource is being
        deleted
    :param error_status: a list of status strings for error
    :param exception_name: a list of exception strings for deleted case
    :param sleep_time: wait this long between checks (seconds)
    :param timeout: check until this long (seconds)
    :param callback: called per sleep cycle, useful to display progress; this
        function is passed a progress value during each iteration of the wait
        loop
    :rtype: True on success, False if the resource has gone to error state or
        the timeout has been reached
     N/A total_time 0 N/A N/A total_time timeout N/A N/A N/A N/A res N/A N/A manager get res_id N/A N/A N/A Exception N/A ex N/A N/A N/A N/A N/A type ex __name__ exception_name N/A N/A True N/A N/A status N/A N/A N/A getattr res status_field lower N/A N/A status error_status N/A N/A False N/A callback N/A N/A progress N/A N/A getattr res progress None 0 N/A N/A callback progress N/A N/A N/A time sleep sleep_time N/A total_time sleep_time N/A False N/A get_effective_log_level N/A N/A N/A N/A N/A Returns the lowest logging level considered by logging handlers

    Retrieve and return the smallest log level set among the root
    logger's handlers (in case of multiple handlers).
     N/A root_log N/A N/A logging getLogger N/A min_log_lvl N/A logging CRITICAL N/A handler N/A root_log handlers N/A N/A min_log_lvl N/A min min_log_lvl N/A handler level N/A min_log_lvl N/A get_password N/A N/A stdin prompt confirm N/A None True N/A N/A message N/A prompt User Password: N/A N/A N/A hasattr stdin isatty N/A N/A stdin isatty N/A N/A N/A N/A True N/A N/A first_pass N/A N/A getpass getpass message N/A N/A confirm N/A N/A first_pass N/A second_pass N/A N/A getpass getpass N/A Repeat  message N/A N/A first_pass second_pass N/A N/A first_pass N/A The passwords entered were not the same N/A N/A N/A EOFError N/A N/A N/A N/A exceptions CommandError Error reading password. N/A N/A N/A exceptions CommandError There was a request to be prompted for a password and a terminal was not detected. N/A read_blob_file_contents N/A N/A blob_file N/A N/A N/A N/A N/A N/A open blob_file file N/A N/A blob N/A N/A N/A N/A file read strip N/A blob N/A N/A N/A IOError N/A N/A msg Error occurred trying to read from file %s N/A N/A N/A exceptions CommandError N/A msg blob_file N/A build_kwargs_dict N/A N/A arg_name value N/A N/A N/A Return a dictionary containing `arg_name` if `value` is set. N/A kwargs N/A N/A value N/A N/A N/A kwargs N/A arg_name value N/A kwargs N/A is_ascii N/A N/A string N/A N/A N/A N/A N/A N/A N/A string decode ascii N/A True N/A N/A N/A UnicodeDecodeError N/A N/A False N/A