-
Notifications
You must be signed in to change notification settings - Fork 25
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
refactor: Remove dependency on netaddr #261
Conversation
anta/inventory/__init__.py
Outdated
@@ -42,6 +41,81 @@ def __str__(self) -> str: | |||
devs[dev_type] += 1 | |||
return f"ANTA Inventory contains {' '.join([f'{n} devices ({t})' for t, n in devs.items()])}" | |||
|
|||
@staticmethod | |||
def __parse_hosts(inventory_input: AntaInventoryInput, inventory: AntaInventory, **kwargs: Any) -> None: |
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.
Is mangling necessary ?
Maybe _parse_hosts()
is enough.
anta/inventory/__init__.py
Outdated
inventory.add_device(device) | ||
|
||
@staticmethod | ||
def __parse_networks(inventory_input: AntaInventoryInput, inventory: AntaInventory, **kwargs: Any) -> None: |
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.
Mangling ?
anta/inventory/__init__.py
Outdated
raise InventoryIncorrectSchema(message) from e | ||
|
||
@staticmethod | ||
def __parse_ranges(inventory_input: AntaInventoryInput, inventory: AntaInventory, **kwargs: Any) -> None: |
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.
Mangling ?
Works on my machine. |
* Refactor: Remove dependency on netaddr * Refactor: Unmangling
Fixes #253