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

Allow specifying address when calling available_ips.create() #669

Open
variable opened this issue Feb 11, 2025 · 0 comments
Open

Allow specifying address when calling available_ips.create() #669

variable opened this issue Feb 11, 2025 · 0 comments
Labels
type: feature Introduction of new functionality to the application

Comments

@variable
Copy link

pynetbox version

v7.4.1

NetBox version

v4.2.2

Feature type

Data model extension

Proposed functionality

eg. available_ips.create({'address': xxxx}}

last_ip = new_firewall_linknet_prefix.available_ips.list()[-1]
firewall_ip = new_firewall_linknet_prefix.available_ips.create({'address': last_ip.address})

Use case

Currently if I want to create an IP from the last item of available_ips.list(), I will have to create one (which is the next available IP) then update to the address I wanted

last_ip = new_firewall_linknet_prefix.available_ips.list()[-1]
firewall_ip = new_firewall_linknet_prefix.available_ips.create()
firewall_ip.address = last_ip.address
firewall_ip.save()

This does not work

External dependencies

No response

@variable variable added the type: feature Introduction of new functionality to the application label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

1 participant