* Delete gitcmd.py
* Delete nb-dt-import.py
* Add files via upload
* Logging cleanup (#78)
* Removed multiple imports of settings.py
* stating to abstract the netbox api calls to their own class
* Abstracted away determine features from main script, implemented as part of class initialization
* added helper functions to get repos relative & absolute path
* renaming gitcmd to repo
* starting to abstract away the get_files
* fixed issue where spaces and commas in vendor list with/without spaces breaks matching
* Added prelim fix for slugs if same issue vendors arg was facing exists. untested
* Finished abstracting the get_files function. Reduced fors and ifs to be cleaner and more efficent
* abstracted getFiles to repo class. Fixed slug issue not matching because of new slug format. added non-halting log function and renamed exception handler to log handler.
* utilized new logging class throughout script to reduce excess logging
* Abstracted and optimized create manufacturers
* Abstracted the create interfaces for devices to the netbox api class
* Fixed regression where check manufactuerers did not have the latest list
* Fixed regression caused by externally calling script. Discovered from https://github.com/netbox-community/Device-Type-Library-Import/pull/76
* abstracted all device interfaces to the devicetype class. optimized function calls to reduce duplicate code and reduce extra log calls
* Ran against all devices and passed with flying colors
* formatting settings.py
* formatting repo.py
* formatting main file
* formatting log_handler.py
* added back executable on file (#79)
* Add more info to failed device_type creations (#81)
---------
Co-authored-by: Philipp Rintz <13933258+p-rintz@users.noreply.github.com>
* Remove Repo init from __init__
Initializing the repository from init, before the path has been updated, will lead to various errors when the script is not run directly from the repository.
* Implemented fix that will allow for running script from any directory
---------
Co-authored-by: Daniel W. Anner <daniel.anner@danstechsupport.com>
* - Added exception handler function with easy map dictionary.
- Added extra default values for ENV vars.
- Moved parser args to Settings for global use.
- Started implementing new exception handler
- Moved git functions to gitcmd.py.
- Implemented exception handler for git functions.
- Removed extra imports where no longer needed.
* Added how to fix ssl error in case it pops up
* - Removed circular import of settings.py and gitcmd.py
- Added exception_handler.py to handle exceptions (refer to above)
- Made GitCMD a class with init and run methods
- Removed git completely from nb-dt-import.py
* Fixed missing arg
* made exception handler a class to prevent circular import
If IGNORE_SSL_ERRORS is true, then silence SSL verification & continue.
If IGNORE_SSL_ERRORS is false, then raise the error with custom message.
Added verbose option to assist with reducing output and allowing for verbose logging if desired.
If IGNORE_SSL_ERRORS is false, and --verbose is specified, then print the exception.
the arg was called vendor (singular), while most of the code and the readme mentioned 'vendors' (plural) and the arg in fact supports multiple vendors.