Add Napster Azure CLI extension#9975
Conversation
- Add azext_napster extension for Napster Companion API - Implement organization, activate-saas CLI commands - Include comprehensive test suite with 10 passing tests - Support create, show, update, delete, list operations - Add SaaS linking and identity management commands - Include HTTP test recordings for CI/CD integration
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
Hi @yashikajain14, |
There was a problem hiding this comment.
Pull request overview
Adds a new napster Azure CLI extension (AAZ-generated) for managing Napster Companion API resources, along with scenario tests and VCR.py recordings.
Changes:
- Introduces the
azext_napsterextension package with AAZ command groups fornapster companion-api(organization lifecycle, SaaS linking, identity ops, activate-saas). - Adds scenario tests (
test_napster.py) intended to validate create/show/list/update/delete/linking/identity operations. - Checks in HTTP recordings for playback-based CI runs.
Reviewed changes
Copilot reviewed 47 out of 49 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| src/napster/setup.py | Extension packaging metadata and distribution config. |
| src/napster/setup.cfg | Placeholder config file. |
| src/napster/README.md | Basic extension README scaffold. |
| src/napster/HISTORY.rst | Initial changelog entry. |
| src/napster/azext_napster/init.py | Command loader wiring (loads AAZ command table). |
| src/napster/azext_napster/_help.py | Help import scaffold. |
| src/napster/azext_napster/_params.py | Arguments hook scaffold (currently empty). |
| src/napster/azext_napster/azext_metadata.json | Extension metadata (preview flag, min core version). |
| src/napster/azext_napster/commands.py | Non-AAZ command table hook scaffold (currently empty). |
| src/napster/azext_napster/custom.py | Custom module scaffold (logger only). |
| src/napster/azext_napster/aaz/init.py | AAZ package marker. |
| src/napster/azext_napster/aaz/latest/init.py | AAZ “latest” package marker. |
| src/napster/azext_napster/aaz/latest/napster/init.py | Root napster AAZ command group exports. |
| src/napster/azext_napster/aaz/latest/napster/__cmd_group.py | Registers napster command group. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/init.py | companion-api group exports. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/__cmd_group.py | Registers napster companion-api command group. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/_activate_saas.py | Implements activate-saas AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/init.py | Organization group exports. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/__cmd_group.py | Registers napster companion-api organization group. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_create.py | Implements organization create AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_delete.py | Implements organization delete AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_list.py | Implements organization list AAZ command (paging). |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_show.py | Implements organization show AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_update.py | Implements organization update AAZ command (generic update enabled). |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_wait.py | Implements organization wait AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_link_saas.py | Implements organization link-saas AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/_latest_linked_saas.py | Implements organization latest-linked-saas AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/init.py | Identity sub-group exports. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/__cmd_group.py | Registers organization identity group. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/_assign.py | Implements identity assign AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/_remove.py | Implements identity remove AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/_show.py | Implements identity show AAZ command. |
| src/napster/azext_napster/aaz/latest/napster/companion_api/organization/identity/_wait.py | Implements identity wait AAZ command. |
| src/napster/azext_napster/tests/init.py | Test package marker. |
| src/napster/azext_napster/tests/latest/init.py | Latest test package marker. |
| src/napster/azext_napster/tests/latest/test_napster.py | Scenario tests for organization/linking/identity operations. |
| src/napster/azext_napster/tests/latest/recordings/test_activate_saas.yaml | VCR recording for activate-saas. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_create.yaml | VCR recording for organization create. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_show.yaml | VCR recording for organization show. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_update.yaml | VCR recording for organization update. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_delete.yaml | VCR recording for organization delete. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_list_by_resource_group.yaml | VCR recording for organization list by RG. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_list_by_subscription.yaml | VCR recording for organization list by subscription. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_link_saas.yaml | VCR recording for organization link-saas. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_latest_linked_saas.yaml | VCR recording for organization latest-linked-saas. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_identity_show.yaml | VCR recording for identity show. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_identity_remove.yaml | VCR recording for identity remove. |
| src/napster/azext_napster/tests/latest/recordings/test_organization_identity_assign.yaml | VCR recording for identity assign. |
| _args_schema.organizationname = AAZStrArg( | ||
| options=["--organizationname"], | ||
| help="Name of the Organization resource", | ||
| required=True, | ||
| id_part="name", |
| _args_schema.saa_s_resource_id = AAZStrArg( | ||
| options=["--saa-s-resource-id"], | ||
| arg_group="Body", | ||
| help="SaaS resource id", | ||
| ) |
| _args_schema.organizationname = AAZStrArg( | ||
| options=["--organizationname"], | ||
| help="Name of the Organization resource", | ||
| required=True, | ||
| id_part="name", |
| @register_command( | ||
| "napster companion-api organization identity assign", | ||
| ) | ||
| class Assign(AAZCommand): | ||
| """Assign the user or system managed identities. | ||
|
|
||
| :example: Organizations_CreateOrUpdate_MaximumSet - generated by [MaximumSet] rule | ||
| az napster companion-api organization identity assign --resource-group acctest0001 --organizationname napster-test-saml | ||
| """ |
- Replace personal email and non-zero subscription IDs in test payloads - Redact x-ms-operation-identifier tenant/object GUIDs - Replace list recordings with minimal sanitized payloads - Remove obsolete activate-saas and identity-assign recordings - Keep playback coverage passing (10/10)
|
Addressed recording-related review feedback in commit 47ff920:
If needed, I can also regenerate fresh live recordings with additional sanitizers configured. |
|
Addressed recording-related review feedback in commit 47ff920:
If needed, I can also regenerate fresh live recordings with additional sanitizers configured. |
|
Napster |
Add complete Napster companion API Azure CLI extension with comprehensive test coverage.
Changes
Test Coverage
Features