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

Add the ability to look up IP Addresses by address for ip_address_to_interface module #314

Open
joewesch opened this issue Feb 9, 2024 · 1 comment
Assignees
Labels

Comments

@joewesch
Copy link
Contributor

joewesch commented Feb 9, 2024

ISSUE TYPE
  • Feature Idea
SUMMARY

Enable IP Address look up by address

Current implementation

    - name: "Add IP address on GigabitEthernet4 - test100"
      networktocode.nautobot.ip_address_to_interface:
        url: "{{ nautobot_url }}"
        token: "{{ nautobot_token }}"
        ip_address: "{{ ip_address['key'] }}"
        interface:
          name: GigabitEthernet4
          device: test100
      vars:
        ip_address: "{{ lookup('networktocode.nautobot.lookup', 'ip-addresses', api_endpoint=nautobot_url, token=nautobot_token, api_filter='address=10.100.0.1/32') }}"

Desired implementation

    - name: "Add IP address on GigabitEthernet4 - test100"
      networktocode.nautobot.ip_address_to_interface:
        url: "{{ nautobot_url }}"
        token: "{{ nautobot_token }}"
        ip_address:
          address: "10.100.0.1/32"
        interface:
          name: GigabitEthernet4
          device: test100

I believe we just need to add an additional iteration to the module utils, but there may be additional changes required.

"ip_addresses": "ip_addresses",
"ipaddresses": "ip_addresses",

@pasanchamikara
Copy link

@joewesch can you assign this task to me if its okay with you?

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

No branches or pull requests

2 participants