MCPcopy Create free account

hub / github.com/cidrblock/netcopa / functions

Functions48 in github.com/cidrblock/netcopa

↓ 65 callersFunctionprint_log
Prints to screen and log file Args: message (str): The message to print style (str): A style with which to print
runparse.py:739
↓ 17 callersFunctionprint_log
Prints to screen and log file Args: message (str): The message to print style (str): A style with which to print
rebuild.py:181
↓ 3 callersFunctiondata_merge
merges obj_b into obj_a and return merged result Args: obj_a (dict) The "merge into dict" obj_b (dict) The "merge from dict"
runparse.py:44
↓ 2 callersFunctioncapture_merge
Run a specific parser entry, store in device dict Args: device (dict): A device dict line (string): The line to parser c
runparse.py:354
↓ 2 callersFunctioncopy_host_vars
Copy files between directories Args: devices (dict): A dictionary of devices for which files should be copied src_dir (str): The
runparse.py:151
↓ 2 callersFunctiondata_merge
merges obj_b into obj_a and return merged result Args: obj_a (dict) The "merge into dict" obj_b (dict) The "merge from dict"
utilities/model.py:8
↓ 2 callersFunctionrun_removers
Run the removers against devices Args: devices (dict): A dict of devices type (string): The type of removers to run Returns
runparse.py:499
↓ 1 callersFunctioncheck_tags
Compare cli tags to parser tags Args: parser (dict): The parser in question args (namepsace): The cli args Returns:
runparse.py:232
↓ 1 callersFunctiondepth
Determine the depth of a line (indent) Args: line (str): The line to analize current_depth (dict): A dict for the depth
runparse.py:389
↓ 1 callersFunctionexecute_parser
Execute a full parser Args: device (dict): A device dict Returns: dict: A dict of devices, each with parsers attached
runparse.py:417
↓ 1 callersFunctionfail_actual_match
Print debug info for a failed match Args: device (dict): A device dict matcher (dict): The natch raw_results (list): The
runparse.py:667
↓ 1 callersFunctionfail_extract
Print debug info for a failed extract Args: device (dict): A device dict match (dict): The natch raw_results (list): The
runparse.py:692
↓ 1 callersFunctionget_configurations
Load device configurations from the file system Returns: dict: A dict of devices with several keys
rebuild.py:29
↓ 1 callersFunctionget_configurations
Load device configurations from the file system Returns: dict: A dict of devices with several keys
runparse.py:128
↓ 1 callersFunctionget_os
Ensure each device has an OS specified Args: devices (dict): A dict of devices Returns: dict: A dict of devices, flagged if
rebuild.py:77
↓ 1 callersFunctionget_os
Ensure each device has an OS specified Args: devices (dict): A dict of devices Returns: dict: A dict of devices, flagged if
runparse.py:205
↓ 1 callersFunctioniterate_templates
(devices)
rebuild.py:216
↓ 1 callersFunctionload_host_vars
Load the host_vars file for a device Args: device (dict): A dict of a device Returns: dict: The devices with it's host_vars
rebuild.py:52
↓ 1 callersFunctionload_host_vars
Load the host_vars file for a device Args: device (dict): A dict of a device Returns: dict: The devices with it's host_vars
runparse.py:180
↓ 1 callersFunctionload_parsers
Load the parsers for a devices OS, store in device dict Args: devices (dict): A dict of devices args (namespace): The cli args
runparse.py:254
↓ 1 callersFunctionload_parsers
Load the parsers for a devices OS, store in dict Args: devices (dict): A dict of devices args (namespace): The cli args Ret
utilities/model.py:48
↓ 1 callersFunctionload_removers
Load the removers for a devices OS, store in device dict Args: devices (dict): A dict of devices Returns: dict: A dict of d
runparse.py:297
↓ 1 callersFunctionmain
Do it all
rebuild.py:252
↓ 1 callersFunctionmain
Do it all
runparse.py:809
↓ 1 callersFunctionmain
Do it all
utilities/sanitize.py:104
↓ 1 callersFunctionparse
Run the parsers each device, store in device dict Args: devices (dict): A dict of devices args (dict): A dict of args Retur
runparse.py:330
↓ 1 callersFunctionpersist_host_vars
Persist a device vars to fs Args: devices (dict): A dict of devices directory (string): A dir path Return: dict: Th
runparse.py:525
↓ 1 callersFunctionremove_keys
Removes keys from a dictionary Args: obj (dict): The dict from which the keys should be removed rubbish (list): A list of keys t
runparse.py:83
↓ 1 callersFunctionrender
Render a jinja template Args: tpl_path (str): A path to the template context (dict): A dict to pass to the teplate Return:
rebuild.py:118
↓ 1 callersFunctionrender
Render a jinja template Args: tpl_path (str): A path to the template context (dict): A dict to pass to the teplate Return:
runparse.py:590
↓ 1 callersFunctionrender_add_to_final
Render the template for a parser and check results Args: device (dict): A device dict template_name (str): The name of a templat
rebuild.py:137
↓ 1 callersFunctionrender_check
Render the template for a parser and check results Args: device (dict): A device dict matcher (dict): Returns: devi
runparse.py:610
↓ 1 callersFunctionreport
Rport the percent complete for each device Args: devices (dict): A dict of devices
runparse.py:720
↓ 1 callersFunctionrepresents_int
Test if a string can be turned into an int Args: string (str): A string to Test Returns: bool: True if the string is an int
runparse.py:29
↓ 1 callersFunctionrun
Run all the steps Args: args (namepsace): The cli args
rebuild.py:235
↓ 1 callersFunctionrun
Run all the steps Args: args (namepsace): The cli args
runparse.py:774
↓ 1 callersFunctionsave_config
(devices)
rebuild.py:225
↓ 1 callersFunctionseq_in_seq
Args: subseq (list): seq (list): Returns: int: position of subseq on seq or -1.
runparse.py:108
↓ 1 callersFunctionswap_community
(line)
utilities/sanitize.py:58
↓ 1 callersFunctionswap_contact
(line)
utilities/sanitize.py:70
↓ 1 callersFunctionswap_desc
(line)
utilities/sanitize.py:76
↓ 1 callersFunctionswap_ip
(line)
utilities/sanitize.py:13
↓ 1 callersFunctionswap_keywords
(line,keywords)
utilities/sanitize.py:97
↓ 1 callersFunctionswap_location
(line)
utilities/sanitize.py:64
↓ 1 callersFunctionswap_pass
(line)
utilities/sanitize.py:52
↓ 1 callersFunctionswap_remark
(line)
utilities/sanitize.py:86
Functionsort_by_ip_as_int
Sort a dict keyed by IP as ints Args: dyct (dict): A dict, with IP addresses as keys Return: list: A list of tuples, sorted
rebuild.py:104
Functionsort_by_ip_as_int
Sort a dict keyed by IP as ints Args: dyct (dict): A dict, with IP addresses as keys Return: list: A list of tuples, sorted
runparse.py:576