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

INT-46: ipam.Address.type is now ipam.Address.status #41

Merged
merged 1 commit into from
Nov 8, 2019

Conversation

rupa
Copy link
Contributor

@rupa rupa commented Nov 7, 2019

The "type" field of ipam.Address has been renamed to "status" in
the API as of v2.2. Additionally, the "assignment" value becomes
"assigned".

For those using IPAM functionality, there are some minor but
potentially breaking changes:

v2.1 users:

  • please continue to use v0.13.0 of the SDK

v2.2 users with existing code for IPAM:

  • NS1 class:
    • createAddress method: the "type" arg is now "status"
    • loadAddressByPrefix method: the "type" arg is now "status"
  • ipam.Address:
    • "type" kwarg to init is now "status"
    • "type" attr is now "status" attr
  • ipam.Network:
    • new_address method: "type" arg is now "status"
  • Valid values for "status" (née "type") have changed:
    • previously: ["planned", "assignment", "host"]
    • now: ["planned", "assigned", "host"]

Copy link

@jwilner jwilner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM / can't wait for codegen

The "type" field of ipam.Address has been renamed to "status" in
the API as of v2.2. Additionally, the "assignment" value becomes
"assigned", and the "host" value is dropped.

For those using IPAM functionality, there are some minor but
potentially breaking changes:

v2.1 users:
  * please continue to use v0.13.0 of the SDK

v2.2 users with existing code for IPAM:
  * NS1 class:
    * createAddress method: the "type" arg is now "status"
    * loadAddressByPrefix method: the "type" arg is now "status"
  * ipam.Address:
    * "type" kwarg to init is now "status"
    * "type" attr is now "status" attr
  * ipam.Network:
    * new_address method: "type" arg is now "status"
  * Valid values for "status" (née "type") have changed:
    * previously: ["planned", "assignment", "host"]
    * now:        ["planned", "assigned"]
@rupa rupa force-pushed the ipam-address-type-to-status branch from d464383 to 3996067 Compare November 7, 2019 21:46
Copy link
Contributor

@mburtless mburtless left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌭

@mburtless
Copy link
Contributor

I am confused about this though:

Valid values for "status" (née "type") have changed:

previously: ["planned", "assignment", "host"]
now: ["planned", "assigned", "host"]

But it looks like all references to the host value have been removed from status param docstrings? Is that because they are not allowed to be set to host via the API?

@rupa
Copy link
Contributor Author

rupa commented Nov 7, 2019

I am confused about this though:

Valid values for "status" (née "type") have changed:
previously: ["planned", "assignment", "host"]
now: ["planned", "assigned", "host"]

But it looks like all references to the host value have been removed from status param docstrings? Is that because they are not allowed to be set to host via the API?

yeah that's my understanding - whether it's a "host" or not is derived within the API so status will never be that value, nor should it be set to that value. (I did a rebase and forcepush so the actual commit message reflects this, but the PR message doesn't get updated on forcepush)

@rupa rupa merged commit 4ac3a28 into master Nov 8, 2019
@rupa rupa deleted the ipam-address-type-to-status branch November 8, 2019 20:14
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

Successfully merging this pull request may close these issues.

3 participants