Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm not sure about the defaults that are being provided in this PR. I see evidence that the default IP address allocation for a device includes:
Could the defaulting behavior introduced here be avoided if
=None
was default? Unless I am missing something, If a user wants to request 'no IP addresses', they could then supplycreate_device(..., ip_addresses=[])
.If this results in
ip_addresses: null
being sent to the API, and the API treats this the same as[]
, then avoid addingip_addresses
toparams
when it isNone
.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.
ip_addresses=[]
should be sent as an empty array to the API, to which the API will report that at least a management IP address must be included. I can imagine the API removing this limitation in the future.ip_address=None
should be omitted in API requests, this is how you request the default IP Addresses which are generally, but not necessarily (depending on OS and plan) the following: