pyaoscx.config module¶
-
pyaoscx.config.
copy_config
(src_config_name, dst_config_name, **kwargs)¶ Perform a PUT call to copy contents from one config into another config
Parameters: - src_config_name – Name of config to copy data from
- dst_config_name – Name of config to copy data into
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise
-
pyaoscx.config.
get_all_configs
(**kwargs)¶ Perform a GET call to get all configs
Parameters: kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function Returns: List of all config URIs
-
pyaoscx.config.
get_config
(config_name, **kwargs)¶ Perform a GET call to get contents of a config.
Parameters: - config_name – name of config (e.g. running-config)
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: Dictionary containing config contents
-
pyaoscx.config.
upload_running_config
(config_data, **kwargs)¶ Perform a PUT call to upload a new running-config
Parameters: - config_data – Dictionary containing config contents
- kwargs – keyword s: requests.session object with loaded cookie jar keyword url: URL in main() function
Returns: True if successful, False otherwise