Skip to content
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

Get Network or Host from IP/CIDR #61

Closed
matthieuy opened this issue Jul 20, 2024 · 1 comment
Closed

Get Network or Host from IP/CIDR #61

matthieuy opened this issue Jul 20, 2024 · 1 comment

Comments

@matthieuy
Copy link

Hello,

How to get a host object from his IP and not his object name ?
The method Host::get() accept only name.

I suppose I need to use a slightly more global method (SMCRequest?). A loop is not possible given the number of objects, so I hope a filter exists.

Sorry if the question seems silly but I couldn't find anything in the examples.

@gregory83
Copy link

Hello,

Have you tried something like this?

list(Router.objects.filter(address='10.10.10.1'))
-- [Router(name=Router-10.10.10.1)]

BR,

/Greg.

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

No branches or pull requests

3 participants