-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Genisys temp inventory generation (#59)
* Create genisysinventory.py * Method prototyping * Method prototyping II * Update Initialization Process.drawio * Include hostname assignment plan in Drawio diagram * First draft of genisys inventory system - Marked lines in the server script that reference the old inventory that will need to be changed - Currently uses the JSON format * Added get_host_name * Fixed string slicing index * Added changing of hostnames to genisys format * Made hostname_prefix a constant var * Added return types to GenisysInventory * Updated http.py to use GenisysInventory instead of Inventory * Added w+ for open method with inventory file to create it if it does not already exist * Added genisys inventory file location to example.yml * Updated __init__.py to use the GenisysInventory instead of Inventory * Removed Inventory.py * Removed legacy code * Changed file mode to r+ to prevent overwriting * Added description to "inventory-file" yaml config * JSON error handling * Updated error handling for opening JSON file * Changed logic to if - then instead of try - except for get_next_hostname * Removed unnecessary if condition * Added way to actually get the hostname from adding the host to the inventory file * Fixed bug with "genisys1" being assigned as a hostname twice * Removed redundant check on file * Removed unused import --------- Co-authored-by: Robert <developer+github@three-point-five.dev>
- Loading branch information
1 parent
8bec794
commit 6abdc25
Showing
6 changed files
with
220 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.