Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

meoflynn
Copy link
Contributor

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


self._netbox_api = NetboxApi.api_object(url, token, cert)

def get_device(self, hostname: str):

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

Comment on lines 26 to 28
#error with line below
#test we do get a value returned
#assert response == NetboxDcim.get_device(hostname=mock_device_name).return_value

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants