-
Notifications
You must be signed in to change notification settings - Fork 75
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
Implement support for VPC Dual Stack #524
base: proj/vpc-dual-stack
Are you sure you want to change the base?
Implement support for VPC Dual Stack #524
Conversation
put_class: ClassVar[Optional[Type["JSONObject"]]] = None | ||
""" | ||
An alternative JSONObject class to use as the schema for PUT requests. | ||
This prevents read-only fields from being included in PUT request bodies, | ||
which in theory will result in validation errors from the API. | ||
""" |
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 added this specifically to prevent the read-only ConfigInterface(...).ipv6.slaac.address
field from being sent along in PUT requests, which would in theory result in a validation error. This was not implemented at the Property
level because it needs to function recursively.
Assuming we're okay with this solution, do we think this is worth splitting into a separate PR against dev
in case we want to reuse it elsewhere?
if is_put and cls.put_class is not None: | ||
cls = cls.put_class |
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.
This is super hacky but much more efficient than serializing, loading, and re-serializing the data. If anyone has an ideas to clean this up please let me know!
0db0dd5
to
522587f
Compare
522587f
to
d7ddd4a
Compare
📝 Description
This pull request implements support for endpoints and request/response fields relating to Dual Stack (IPv6) VPCs. Because the API changes for this feature aren't yet available this PR was developed against unit test mocks.
Changes include:
put_class
JSONObject ClassVar that allows PUT requests to use a distinct schema from the schema defined usingjson_object
ipv6
field under instance config interfaces (both nested and CRUD)ipv6
field on VPCs and VPC subnetsipv6_range
,ipv6_is_public
, andipv6_addresses
fields under the VPC IPs endpoints✔️ How to Test
The following test steps assume you have pulled down this PR locally and run
make install
.Unit Testing
Integration Testing
Not yet available.
Manual Testing
Not yet available.