-
Notifications
You must be signed in to change notification settings - Fork 5
[WIP] Data uploader tool for Netbox #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
||
self._netbox_api = NetboxApi.api_object(url, token, cert) | ||
|
||
def get_device(self, hostname: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add return types too:
def get_device(self, hostname: str) -> Union[Dict[Record], None]:
(That is assuming there's a Record
class or similar in Python. If not you can just use Union[Dict, None]
to show it will either return a dict or None
#error with line below | ||
#test we do get a value returned | ||
#assert response == NetboxDcim.get_device(hostname=mock_device_name).return_value |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should either remove this or have a go at fixing it?
This is a work in progress
This PR would set up a package with tools for bulk uploads of new data to Netbox.
It would include checks for whether there is matching data already in Netbox (e.g. IP Address, MAC address, hostname etc) before creating a new dcim or ipam object in Netbox