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

add BYOC tags list/update/replace commands [MILK-337] #390

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

Prime541
Copy link
Contributor

@Prime541 Prime541 commented Oct 29, 2024

This change adds the missing avn byoc tags update command that is shown in Aiven's public documentation, but not in Aiven CLI reference.

It reuses the same syntax as service tags commands.

  • avn byoc tags list
  • avn byoc tags update --add-tag KEY=VALUE --remove-tag KEY
  • avn byoc tags replace --tag KEY=VALUE

I have tested it in a locally deployed BYOC.

MILK-337

aiven/client/cli.py Outdated Show resolved Hide resolved
Copy link
Contributor

@allaouiamine allaouiamine left a comment

Choose a reason for hiding this comment

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

can you please add tests for new methods in client.py

@Prime541 Prime541 force-pushed the guillaume.giffard-MILK-337-avn-byoc-tags branch from afeb11e to 18913b6 Compare October 30, 2024 13:08
@Prime541 Prime541 force-pushed the guillaume.giffard-MILK-337-avn-byoc-tags branch from 18913b6 to e6f246d Compare October 30, 2024 13:38
@Prime541 Prime541 force-pushed the guillaume.giffard-MILK-337-avn-byoc-tags branch from e6f246d to c646e54 Compare October 30, 2024 13:53
@Prime541 Prime541 force-pushed the guillaume.giffard-MILK-337-avn-byoc-tags branch from c646e54 to 094c0c6 Compare October 30, 2024 14:02
json_data: dict[str, Any] | None = None,
headers: dict[str, str] | None = None,
content: bytes | None = None,
):
self.status_code = status_code
self.status_code = status_code.value if isinstance(status_code, HTTPStatus) else status_code
Copy link
Contributor Author

@Prime541 Prime541 Oct 30, 2024

Choose a reason for hiding this comment

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

Fixing str(HTTPStatus.OK) == "HTTPStatus.OK" instead of "200" on python3.10 and older

Copy link
Contributor

@allaouiamine allaouiamine left a comment

Choose a reason for hiding this comment

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

LGTM

@allaouiamine allaouiamine merged commit 446ad81 into main Oct 30, 2024
26 checks passed
@allaouiamine allaouiamine deleted the guillaume.giffard-MILK-337-avn-byoc-tags branch October 30, 2024 14: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.

2 participants