nornir_hier_config.utilities
Utilities.
Submodules
Package Contents
Functions
|
Check file_name exists based on input. |
|
Evaluate hashes to determine if an existing file has changed. |
|
Create a directory. |
|
Safe load a YAML file. |
|
Take input and write a file. |
- nornir_hier_config.utilities.check_file(file_name: Optional[str]) bool
Check file_name exists based on input.
- Args:
file_name (str): file name to check
- nornir_hier_config.utilities.compare_files_state(remediation_config: str, remediation_config_string: str) Dict[Any, Any]
Evaluate hashes to determine if an existing file has changed.
- Args:
remediation_config (str): Remediation Config path remediation_config_string (str): Generated Remediation string
- Returns:
result (TypedDict): True or False depending on if files equal each other and diff.
- nornir_hier_config.utilities.create_folder(directory: str) None
Create a directory.
- Args:
directory (str): Directory path to create
- nornir_hier_config.utilities.get_yaml(file_path: str) Any
Safe load a YAML file.
- nornir_hier_config.utilities.write_file(text: str, filename: str) None
Take input and write a file.
- Args:
text (str): text to write filename (str): filename