-
Notifications
You must be signed in to change notification settings - Fork 76
v5.16.0 #409
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
Merged
Merged
v5.16.0 #409
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Changes for parent/child account project * Improved test
…command usage (#397) * change directory structure and makefile usage * remove unnecessary init files * remove unnecessary init files
* add tests for oauth and login client * remove duplicate lines
## 📝 Description **What does this PR do and why is this change necessary?** Updates `pyenv` to point to local environment setup by devenv.
* replace execution handler with conditional * adding if statement
## 📝 Description This pull request adds support for configuring and viewing the ACL configuration for an LKE cluster's control plane. **NOTE: This PR does NOT include the PUT LKE cluster changes because the acl configuration is not returned in the GET LKE cluster response.** #### New Endpoint Methods * `control_plane_acl` - GET `/lke/clusters/{cluster_id}/control_plane_acl` * `control_plane_acl_update(...)` - PUT `/lke/clusters/{cluster_id}/control_plane_acl` * `control_plane_acl_delete()` - POST `/lke/clusters/{cluster_id}/control_plane_acl` #### Updated Endpoint Methods * `LKEGroup.cluster_create(...)` - Add control_plane field to method arguments #### Misc Changes * Added data classes for LKE cluster control plane and all substructures * Added logic to JSONObject to remove `Optional` values from the generated dict if None * Added a new `always_include` class var used to designate optional values that should always be included in the generated Dict * Updated test fixture framework to support underscores in path ## ✔️ How to Test The following test steps assume you have pulled down this PR locally and run `make install`. ### Unit Testing ``` make testunit ``` ### Integration Testing ``` make TEST_COMMAND=models/lke/test_lke.py testint ``` ### Manual Testing In a Python SDK sandbox environment (e.g. dx-devenv), run the following: ```python import os from linode_api4 import ( LinodeClient, LKEClusterControlPlaneOptions, LKEClusterControlPlaneACLOptions, LKEClusterControlPlaneACLAddressesOptions, ) client = LinodeClient(token=os.getenv("LINODE_TOKEN")) cluster = client.lke.cluster_create( "us-mia", "test-cluster", client.lke.node_pool("g6-standard-1", 1), "1.29", control_plane=LKEClusterControlPlaneOptions( acl=LKEClusterControlPlaneACLOptions( enabled=True, addresses=LKEClusterControlPlaneACLAddressesOptions( ipv4=["10.0.0.1/32"], ipv6=["1234::5678"] ), ) ), ) print("Original ACL:", cluster.control_plane_acl) cluster.control_plane_acl_update( LKEClusterControlPlaneACLOptions( addresses=LKEClusterControlPlaneACLAddressesOptions(ipv4=["10.0.0.2/32"]) ) ) print("Updated ACL:", cluster.control_plane_acl) cluster.control_plane_acl_delete() print("Deleted ACL:", cluster.control_plane_acl) ``` 2. Ensure the script runs successfully and the output matches the following: ``` Original ACL: LKEClusterControlPlaneACL(enabled=True, addresses=LKEClusterControlPlaneACLAddresses(ipv4=['10.0.0.1/32'], ipv6=['1234::5678/128'])) Updated ACL: LKEClusterControlPlaneACL(enabled=True, addresses=LKEClusterControlPlaneACLAddresses(ipv4=['10.0.0.2/32'], ipv6=None)) Deleted ACL: LKEClusterControlPlaneACL(enabled=False, addresses=None) ```
lgarber-akamai
approved these changes
May 28, 2024
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.
Failing tests seem unrelated to any functional code changes in this release, should be good once Ansible tests finish 👍
edit: Just confirmed that the failing test in Ansible is unrelated to this release.
ykim-akamai
approved these changes
May 28, 2024
…#407) * add login_client in Makefile and add initial fixture to oauth test * lint
new: Add support for Parent/Child account switching
* unskip lke test, update test_lke_node_recycle, filter swap disk for image create, skip parent child account test * skip pc account test * remove comment * update with cleaner syntax
lgarber-akamai
approved these changes
Jun 5, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.