Module Import alias Import alias Import alias ImportFrom alias identifier Import alias Import alias ImportFrom alias alias ImportFrom alias alias Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore ListLoad Assign NameStore Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Str FunctionDef arguments args NameParam NameParam defaults body If BoolOpOr CompareIsNot Call NameLoad NameLoad NameLoad CompareNotEq Call AttributeLoad Call AttributeLoad NameLoad attr attr Str body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad keyword Call NameLoad Dict NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Global identifier Assign NameStore NameLoad decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Dict If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call NameLoad Call AttributeLoad Str attr NameLoad orelse With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse Expr Call NameLoad Str Assign NameStore Dict Assign NameStore Call NameLoad NameLoad NameLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign SubscriptStore Call NameLoad Index NameLoad NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad NameLoad If UnaryOpNot NameLoad body If UnaryOpNot NameLoad body Raise Call NameLoad orelse Return NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad While CompareNotEq NameLoad Str body If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Return NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Assert CompareIn NameLoad ListLoad NameLoad NameLoad If CompareEq NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body With Call NameLoad Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr NameLoad Dict NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad orelse Assign SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list
N/A N/A os N/A os.path N/A logging logging warning warn N/A collections N/A yaml jinja2 Environment DictLoader servi.exceptions MasterNotFound ServiError N/A 
Global configuration for servi files
Use as import config as c
Note - this will also read in additional variables (and overrides) from
SERVIFILE

Proper dir structure
servi installation -
  eg: pyvenv/py3.4/lib/python3.4/site-packages/servi-0.1-py3.4.egg/servi

Project
  ...\masterdir
          \servi
              \servi   # Kinda ugly that it has the smae name, but helpful
                         for argparse
              \sevi_templates
 N/A SERVI_DIR N/A N/A N/A os path normpath N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. N/A TMPL_DIR_SITE N/A N/A N/A os path normpath N/A N/A N/A os path join SERVI_DIR servi_templates N/A BOX_DIR N/A N/A N/A os path abspath N/A N/A N/A os path join SERVI_DIR servi_boxes N/A MASTER_DIR None N/A MANIFEST_FILE servi_data.json N/A VERSION_FILE TEMPLATE_VERSION.json N/A SERVIFILE Servifile.yml N/A SERVIFILE_GLOBAL Servifile_globals.yml N/A SERVIFILE_GLOBAL_FULL N/A N/A N/A os path expanduser N/A N/A N/A os path join ~ SERVIFILE_GLOBAL N/A TEMPLATE template N/A MASTER master N/A MISSING_HASH FILE NOT FOUND N/A SERVI_IGNORE_FILES N/A N/A DIFFTOOL git diff N/A DEFAULT_LOG_LEVEL N/A logging INFO N/A HOSTS None N/A MAIN_USERNAME None N/A MAIN_RSA_KEY_FILE None N/A LOCAL_DIR None N/A SITE_SUFFIX None N/A LOOKUP_FAILED_MESSAGE Environment variable not found lookup N/A N/A ltype arg1 N/A N/A N/A N/A N/A N/A type ltype str N/A N/A N/A N/A N/A ltype strip lower env N/A N/A N/A ServiError Found "lookup" function that servi does notunderstand ({0}). Currently servi only processeslookup("env", variable") - which mimics a portionof ansibles lookup function. N/A retval N/A N/A N/A os environ get arg1 N/A N/A retval None N/A N/A retval LOOKUP_FAILED_MESSAGE N/A retval N/A setup_jinja N/A N/A env template_text N/A None None N/A N/A N/A env None N/A N/A env N/A Environment loader N/A DictLoader N/A SERVIFILE template_text N/A N/A N/A env globals N/A lookup lookup N/A env N/A set_master_dir N/A N/A set_dir_to N/A N/A N/A 
    sets c.MASTER_DIR
        by finding the first ancestor(default)
        to set_dir_to (if supplied - only for servi init)
     N/A MASTER_DIR N/A MASTER_DIR set_dir_to N/A load_user_config N/A N/A N/A N/A N/A 
    Reads and processes Servifile.yml, adding all variables to this modules
    globals()

    For Servifile_Globals, Servifile:
        Step 1: Render the file as a Jinja2 template
                    (with custom function: lookup('env', envvar) )
        Step 2: Load as a yaml doc
        Step 3: Add to this module's globals()

    Note - Servifile.yml can essentially update or override Servifile_globals
      but it CAN NOT delete a key from Servifile_globals
      ie: combined >= servifile_globals

     N/A global_config N/A N/A N/A N/A N/A N/A os path exists SERVIFILE_GLOBAL_FULL N/A N/A N/A warn N/A N/A No global servifile found in {0} format SERVIFILE_GLOBAL_FULL N/A N/A N/A open SERVIFILE_GLOBAL_FULL f N/A N/A servi_raw N/A N/A f read N/A global_config N/A process_config servi_raw N/A MASTER_DIR N/A N/A user_config N/A getconfig SERVIFILE TEMPLATE MASTER TMPL_DIR_SITE MASTER_DIR N/A N/A N/A warn Getting config but MASTER_DIR is empty. N/A user_config N/A N/A combined_config N/A deep_update global_config user_config N/A N/A k v N/A N/A combined_config items N/A N/A N/A N/A globals N/A k v N/A N/A global_config user_config combined_config N/A find_master_dir N/A N/A start_dir fail_ok N/A False N/A N/A 
    finds Servifile.yml at or above start_dir
    returns MasterNotFound or None (if fail_ok)
     N/A master_dir N/A find_ancestor_servifile start_dir N/A N/A master_dir N/A N/A N/A fail_ok N/A N/A N/A MasterNotFound N/A N/A None N/A N/A N/A N/A N/A os path abspath master_dir N/A find_ancestor_servifile N/A N/A starting_dir N/A N/A N/A N/A find_ancestor_with starting_dir SERVIFILE N/A find_ancestor_with N/A N/A starting_dir target N/A N/A N/A 
    returns first ancestor of starting_dir that contains target (dir or file)
    (returns abspath())
    returns None if not found
     N/A cur_dir N/A N/A N/A os path abspath starting_dir N/A N/A cur_dir / N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join cur_dir target N/A N/A cur_dir N/A cur_dir N/A N/A N/A os path abspath N/A N/A N/A os path normpath N/A N/A N/A os path join cur_dir .. N/A None N/A servi_file_exists_in N/A N/A path N/A N/A N/A N/A N/A N/A os path exists N/A N/A N/A os path join path SERVIFILE N/A global_servi_file_exists N/A N/A N/A N/A N/A N/A N/A N/A os path exists SERVIFILE_GLOBAL_FULL N/A N/A 
This is an ugly, parameterized version of pathfor, and a getconfig() which
relies on it. I need it since the other pathfor uses config parameters
(which this bootstraps).

Only use this in the config module.
After that, use commands.utils.utils.pathfor()
 pathfor N/A N/A fname source template master template_dir master_dir N/A N/A N/A N/A source N/A template master N/A N/A source template N/A N/A path N/A N/A N/A os path normpath N/A N/A N/A os path join template_dir fname N/A N/A path N/A N/A N/A os path normpath N/A N/A N/A os path join master_dir fname N/A path N/A getconfig N/A N/A fname template master template_dir master_dir N/A N/A N/A N/A open N/A pathfor fname master template master template_dir master_dir f N/A N/A servi_raw N/A N/A f read N/A N/A process_config servi_raw N/A process_config N/A N/A raw_text N/A N/A N/A env N/A setup_jinja env None template_text raw_text N/A tmpl N/A N/A env get_template SERVIFILE N/A rendered N/A N/A tmpl render N/A data N/A N/A yaml load rendered N/A data N/A deep_update N/A N/A orig_dict new_dict N/A N/A N/A N/A key val N/A N/A new_dict items N/A N/A N/A isinstance val N/A collections Mapping N/A N/A tmp N/A deep_update N/A N/A orig_dict get key N/A val N/A N/A orig_dict N/A key tmp N/A N/A N/A orig_dict N/A key N/A new_dict N/A key N/A orig_dict N/A