Skip to content

new: Add support for Parent/Child account switching - #373

Merged
zliang-akamai merged 2 commits into
linode:proj/parent-childfrom
zliang-akamai:zhiwei/parent-child-account
Mar 8, 2024
Merged

new: Add support for Parent/Child account switching#373
zliang-akamai merged 2 commits into
linode:proj/parent-childfrom
zliang-akamai:zhiwei/parent-child-account

Conversation

@zliang-akamai

@zliang-akamai zliang-akamai commented Feb 28, 2024

Copy link
Copy Markdown
Member

📝 Description

This PR is for adding support of the parent/child account switching API endpoints.

✔️ How to Test

Automated Testing

Integration Testing

export LINODE_API_URL=https://the.dev.api.url/v4beta
export LINODE_API_CA=/path/to/your/alpha/ca.pem
export LINODE_TOKEN=YOUR_ALPHA_TOKEN
make TEST_CASE=test_list_child_accounts testint

Unit Testing

tox

Manual Testing

from linode_api4 import LinodeClient
client = LinodeClient(
    token="your_token",
    base_url="https://the.dev.api.url/v4beta",
    ca_path="/path/to/your/alpha/ca.pem"
)

child_accounts = client.account.child_accounts()
print(child_accounts)
token = child_accounts[0].create_token()
print(token)

@zliang-akamai
zliang-akamai requested a review from a team as a code owner February 28, 2024 21:14
@zliang-akamai
zliang-akamai requested review from jriddle-linode, lgarber-akamai, yec-akamai and ykim-akamai and removed request for a team February 28, 2024 21:14
Comment thread test/unit/objects/account_test.py

@lgarber-akamai lgarber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great, nice work!

@ykim-akamai ykim-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, tests work as expected on alpha

@zliang-akamai
zliang-akamai merged commit 886c194 into linode:proj/parent-child Mar 8, 2024
@zliang-akamai
zliang-akamai deleted the zhiwei/parent-child-account branch March 8, 2024 19:50
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