Skip to content

Add Napster Azure CLI extension#9975

Open
yashikajain14 wants to merge 13 commits into
Azure:mainfrom
yashikajain14:feature/napster-cli-extension
Open

Add Napster Azure CLI extension#9975
yashikajain14 wants to merge 13 commits into
Azure:mainfrom
yashikajain14:feature/napster-cli-extension

Conversation

@yashikajain14

Copy link
Copy Markdown
Contributor

Add complete Napster companion API Azure CLI extension with comprehensive test coverage.

Changes

  • Add azext_napster extension for Napster Companion API
  • Implement organization, activate-saas CLI commands
  • Support create, show, update, delete, list operations
  • Add SaaS linking and identity management commands
  • Include 10 passing tests with HTTP test recordings

Test Coverage

  • test_organization_create
  • test_organization_show
  • test_organization_list_by_rg
  • test_organization_list_by_subscription
  • test_organization_update
  • test_organization_delete
  • test_organization_link_saas
  • test_organization_latest_linked_saas
  • test_organization_identity_show
  • test_organization_identity_remove

Features

  • Full AAZ (Atomic Azure CLI) command implementation
  • Live test execution with VCR.py HTTP cassettes
  • Playback test support for CI/CD pipelines
  • Organization lifecycle management
  • SaaS resource linking
  • Identity operations (show/remove)

- 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
Copilot AI review requested due to automatic review settings June 22, 2026 10:09
@azure-client-tools-bot-prd

Copy link
Copy Markdown
Validation for Breaking Change Starting...

Thanks for your contribution!

@azure-client-tools-bot-prd

Copy link
Copy Markdown

Hi @yashikajain14,
Please write the description of changes which can be perceived by customers into HISTORY.rst.
If you want to release a new extension version, please update the version in setup.py as well.

Copilot AI 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.

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_napster extension package with AAZ command groups for napster 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.

Comment on lines +48 to +52
_args_schema.organizationname = AAZStrArg(
options=["--organizationname"],
help="Name of the Organization resource",
required=True,
id_part="name",
Comment on lines +66 to +70
_args_schema.saa_s_resource_id = AAZStrArg(
options=["--saa-s-resource-id"],
arg_group="Body",
help="SaaS resource id",
)
Comment on lines +47 to +51
_args_schema.organizationname = AAZStrArg(
options=["--organizationname"],
help="Name of the Organization resource",
required=True,
id_part="name",
Comment thread src/napster/azext_napster/tests/latest/test_napster.py Outdated
Comment thread src/napster/azext_napster/tests/latest/test_napster.py Outdated
Comment on lines +14 to +22
@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
"""
Comment thread src/napster/azext_napster/tests/latest/recordings/test_activate_saas.yaml Outdated
- 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)
@yashikajain14

Copy link
Copy Markdown
Contributor Author

Addressed recording-related review feedback in commit 47ff920:

  • Sanitized test payload PII in src/napster/azext_napster/tests/latest/test_napster.py (email + subscription IDs).
  • Redacted GUIDs in recordings.
  • Replaced list recordings with sanitized minimal payloads to avoid environment/person-specific data.
  • Removed stale cassettes for unsupported tests (, ).
  • Re-ran playback tests: 10 passed.

If needed, I can also regenerate fresh live recordings with additional sanitizers configured.

@yashikajain14

Copy link
Copy Markdown
Contributor Author

Addressed recording-related review feedback in commit 47ff920:

  • Sanitized test payload PII in src/napster/azext_napster/tests/latest/test_napster.py (email + subscription IDs).
  • Redacted x-ms-operation-identifier GUIDs in recordings.
  • Replaced list recordings with sanitized minimal payloads to avoid environment/person-specific data.
  • Removed stale cassettes for unsupported tests (test_activate_saas.yaml, test_organization_identity_assign.yaml).
  • Re-ran playback tests: 10 passed.

If needed, I can also regenerate fresh live recordings with additional sanitizers configured.

@yonzhan yonzhan requested a review from necusjz June 22, 2026 10:46
@yonzhan

yonzhan commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Napster

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.

4 participants