Module Expr Str ImportFrom alias alias ImportFrom alias alias Import alias ImportFrom alias alias alias ImportFrom alias identifier ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore Call NameLoad NameLoad Str Num TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareNotIn AttributeLoad NameLoad attr ListLoad Num NameLoad body Raise decorator_list Assign NameStore Num Expr Str FunctionDef arguments args defaults body Expr Str Import alias Import alias Return Call AttributeLoad Str attr GeneratorExp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr comprehension NameStore Call NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If Call NameLoad NameLoad Str body Return AttributeLoad NameLoad attr If CompareEq Call NameLoad Num body Raise Call NameLoad Str With Call NameLoad NameLoad Str NameStore body Assign NameStore Call NameLoad Str If CompareNotEq Call NameLoad NameLoad keyword NameLoad keyword NameLoad Num body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Call NameLoad For NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Expr Call NameLoad Call NameLoad BinOpAdd NameLoad NameLoad decorator_list Assign NameStore ListLoad Str Str Str Str
N/A N/A 
topology_docker utilities module.
 __future__ unicode_literals absolute_import __future__ print_function division N/A logging os getuid devnull makedirs shlex split shsplit subprocess call check_call N/A log N/A N/A logging getLogger __name__ ensure_dir N/A N/A path N/A N/A N/A 
    Ensure that a path exists.

    :param str path: Directory path to create.
     N/A errno N/A EEXIST N/A getattr errno EEXIST 0 N/A N/A N/A N/A makedirs path N/A N/A N/A OSError N/A err N/A N/A N/A N/A err errno N/A 0 EEXIST N/A N/A N/A N/A IFNAMSIZ 15 N/A 
This is the maximum length a network interface can have.
Defined in linux/if.h as 16, but counting the termination character.
 tmp_iface N/A N/A N/A N/A N/A 
    Return a valid temporal interface name.

    :rtype: str
    :return: A random valid network interface name.
     N/A random N/A string N/A N/A N/A join N/A N/A N/A random choice N/A string ascii_lowercase N/A _ N/A range IFNAMSIZ N/A cmd_prefix N/A N/A N/A N/A N/A 
    Determine if the current user can run privileged commands and thus
    determines the command prefix to use.

    :rtype: str
    :return: The prefix to use for privileged commands.
     N/A N/A hasattr cmd_prefix prefix N/A N/A N/A cmd_prefix prefix N/A N/A N/A getuid 0 N/A N/A N/A RuntimeError Please do not run as root. Please configure the ip command for root execution. N/A N/A open devnull w f N/A N/A cmd N/A shsplit sudo --non-interactive ip link show N/A N/A N/A call cmd stdout f stderr f 0 N/A N/A N/A RuntimeError Please configure the ip command for root execution. N/A N/A cmd_prefix prefix sudo --non-interactive  N/A N/A cmd_prefix prefix N/A privileged_cmd N/A N/A commands_tpl N/A kwargs N/A N/A 
    Run a privileged command.

    This function will replace the tokens in the template with the provided
    keyword arguments, then it will split the lines of the template, strip
    them and execute them using the prefix for privileged commands, checking
    that the command returns 0.

    :param str commands_tpl: Single line or multiline template for commands.
    :param dict kwargs: Replacement tokens.
     N/A prefix N/A cmd_prefix N/A command N/A N/A N/A N/A commands_tpl format kwargs splitlines N/A N/A command N/A N/A command strip N/A command N/A N/A N/A check_call N/A shsplit N/A prefix command N/A N/A __all__ N/A ensure_dir tmp_iface cmd_prefix privileged_cmd