diff --git a/NEON_CHANGES.md b/NEON_CHANGES.md deleted file mode 100644 index 5c4bb9b8145..00000000000 --- a/NEON_CHANGES.md +++ /dev/null @@ -1,267 +0,0 @@ -# Neon Extension: Unified Command Structure and GA Release - -## Overview -This document details the comprehensive changes made to the Azure CLI Neon extension to unify the command structure, transition to General Availability (GA) status, and resolve various technical issues. - -## Executive Summary - -**Problem Statement:** -- Duplicate documentation pages ("Neon" and "neon") -- Confusing command hierarchy with redundant "neon postgres" wrapper -- Extension still in preview status despite being production-ready -- Multiple workflow and style validation failures - -**Solution:** -- Flattened command hierarchy to single root "neon" group -- Transitioned from preview (1.0.0b4) to GA status (1.0.0) -- Fixed GitHub Actions workflow permissions and dependencies -- Resolved style violations and version calculation issues - -## Detailed Changes - -### 1. Command Structure Unification - -#### Before (Problematic Structure): -``` -az neon # Root group with some commands -az neon postgres # Duplicate wrapper group -├── az neon postgres branch-create # Same as: az neon branch-create -├── az neon postgres branch-delete # Same as: az neon branch-delete -├── az neon postgres project-create # Same as: az neon project-create -└── ... # All commands duplicated -``` - -#### After (Unified Structure): -``` -az neon # Single root group -├── az neon branch-create # Direct access, no wrapper -├── az neon branch-delete -├── az neon project-create -├── az neon database-create -└── ... # All commands under single hierarchy -``` - -#### Technical Implementation: -- **Deleted**: `src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py` - - This file was generating the duplicate "postgres" group -- **Updated**: `src/neon/azext_neon/_help.py` - - Consolidated all help documentation - - Fixed indentation issues (tabs → spaces) - - Removed references to deprecated postgres group - -### 2. GA Transition (Preview → Production) - -#### Version Progression: -- **Main Branch**: `1.0.0b4` (Beta 4) -- **This PR**: `1.0.0` (General Availability) - -#### Files Modified: -**`src/neon/setup.py`:** -```python -# Before -VERSION = '1.0.0b4' -CLASSIFIERS = [ - 'Development Status :: 4 - Beta', - # ... -] - -# After -VERSION = '1.0.0' -CLASSIFIERS = [ - 'Development Status :: 5 - Production/Stable', - # ... -] -``` - -**`src/neon/azext_neon/azext_metadata.json`:** -```json -{ - "azext.isPreview": false, // Already set correctly - "azext.minCliCoreVersion": "2.67.0" -} -``` - -**`src/neon/HISTORY.rst`:** -```rst -1.0.0 -+++++ -* General Availability (GA) of flattened Neon CLI command group. -* Removed deprecated preview alias and any residual preview flags. -* Updated package classifier to 'Production/Stable' and deleted legacy '__cmd_group.py' for removed 'neon postgres' wrapper. -* Fix command help indentation and workflow improvements. -* Clean up HISTORY.rst version ordering. - -1.0.0b5 -++++++ -* Flatten command hierarchy: removed duplicate 'neon postgres' group; all commands now under top-level 'neon'. -* Added consolidated help content. -``` - -### 3. GitHub Actions Workflow Fixes - -#### Issue: Version Output Job Failures -The `version-output` job in `.github/workflows/VersionCalPRComment.yml` was failing due to insufficient permissions. - -#### Root Cause Analysis: -- `version-output` job needs `issues: write` to manage PR labels -- Depends on `version-cal` and `skip-version-cal` jobs for artifacts -- Prerequisite jobs had insufficient permissions for API coordination - -#### Solution Applied: -```yaml -# Added to all jobs that interact with GitHub API -permissions: - pull-requests: read - contents: read - issues: write # ← Added this permission - -# Also upgraded packaging dependency -- name: Install azdev - run: | - python -m pip install --upgrade "packaging>=25" # ← Fixed compatibility -``` - -#### Jobs Fixed: -1. **`version-cal`**: Added `issues: write` permission -2. **`skip-version-cal`**: Added `issues: write` permission -3. **`version-output`**: Already had correct permissions -4. **Dependency Management**: Upgraded packaging to resolve conflicts - -### 4. Style and Formatting Fixes - -#### Issues Found: -- Mixed tab/space indentation in `_help.py` -- Trailing whitespace issues -- HISTORY.rst ordering problems - -#### Resolution: -- **Complete Recreation** of `_help.py` with proper 4-space indentation -- Removed all trailing whitespace and ensured proper newlines -- Reordered HISTORY.rst entries chronologically (newest first) - -#### Validation: -```bash -# These now pass: -flake8 src/neon/azext_neon/_help.py -pylint src/neon/azext_neon/_help.py -``` - -### 5. Version Calculation Error Fix - -#### Critical Issue Discovered: -The original PR attempted to go from `1.0.0b4` → `1.0.1`, which **skips the stable `1.0.0` release**. This violates semantic versioning principles and causes Azure CLI extension validation to fail. - -#### Proper Version Sequence: -``` -1.0.0b4 (main branch - beta 4) - ↓ -1.0.0 (this PR - stable GA) - ↓ -1.0.1 (future - first patch) -``` - -#### Why This Matters: -- Azure CLI extension tooling expects proper semantic versioning -- Cannot skip from beta directly to patch version -- Must have a stable base version before patches - -## Testing and Validation - -### Extension Functionality: -```bash -# Install and test the extension -az extension add --source ./dist/neon-1.0.0-py3-none-any.whl -az neon --help # ✅ Shows unified help -az neon branch-create --help # ✅ Direct access (no "postgres" wrapper) -az neon project-list --help # ✅ All commands accessible -``` - -### Style Validation: -```bash -# All pass locally -flake8 src/neon/ -pylint src/neon/azext_neon/_help.py -``` - -### Workflow Validation: -- ✅ Fixed permission issues -- ✅ Resolved dependency conflicts -- ✅ Corrected version progression -- ✅ Artifact upload/download working - -## Risk Assessment - -### Low Risk: -- **Command Functionality**: All existing commands work identically -- **Backward Compatibility**: Users can still access all features -- **Data Safety**: No data migration or breaking changes - -### Medium Risk: -- **User Workflow Changes**: Scripts using `az neon postgres` will need updates -- **Documentation Updates**: All docs referencing old structure need revision - -### Mitigation: -- **Graceful Transition**: Old commands still work, just not documented -- **Clear Communication**: Updated help text guides users to new structure - -## Future Recommendations - -### Immediate (Post-Merge): -1. **Documentation Update**: Update all Azure docs to reflect new command structure -2. **Migration Guide**: Create guide for users transitioning from old structure -3. **Announcement**: Communicate changes through appropriate channels - -### Medium Term: -1. **Complete Removal**: Remove any remaining postgres wrapper code in future release (1.0.1) -2. **Performance Monitoring**: Track adoption of new command structure -3. **User Feedback**: Collect feedback on improved UX - -### Long Term: -1. **Feature Enhancement**: Add new capabilities to unified structure -2. **Integration**: Better integration with other Azure CLI extensions - -## Commit History - -``` -fa91c8a68 neon: fix version progression from 1.0.0b4 to 1.0.0 -b5962f476 workflow: add issues:write permission to version-cal and skip-version-cal jobs -5dfd88634 workflow: fix version-output permissions and upgrade packaging for compatibility -186927138 neon: bump version to 1.0.1 for post-GA style and workflow fixes -a6209e4b8 neon: fix HISTORY.rst order and fully remove tabs/trailing issues from help -a10709ad8 neon: fix help indentation (tabs->spaces) and upgrade packaging in workflow -``` - -## Verification Commands - -### Pre-Merge Checklist: -```bash -# 1. Verify extension builds cleanly -cd src/neon && python setup.py bdist_wheel - -# 2. Test installation -az extension add --source ./dist/neon-1.0.0-py3-none-any.whl - -# 3. Verify command structure -az neon --help | grep -v "postgres" # Should show clean structure - -# 4. Test key functionality -az neon project-list --help -az neon branch-create --help - -# 5. Verify version -python -c "from src.neon.setup import VERSION; print(f'Version: {VERSION}')" -``` - -### Post-Merge Validation: -```bash -# 1. GitHub Actions should pass -# 2. Extension should install from registry -# 3. Documentation should be unified -# 4. No duplicate help pages -``` - ---- - -**Prepared by**: Development Team -**Date**: 2025-08-28 -**Status**: Ready for Review and Merge diff --git a/src/neon/HISTORY.rst b/src/neon/HISTORY.rst index 6ed54c2a88a..602c88d2974 100644 --- a/src/neon/HISTORY.rst +++ b/src/neon/HISTORY.rst @@ -3,28 +3,18 @@ Release History =============== -1.0.0b5 -+++++++ - -**Breaking Changes** - -* az neon postgres: Removed duplicate postgres command group - commands now available directly under az neon -* Breaking change: az neon postgres [command] is now az neon [command] - -**Other Changes** - -* Flattened command structure for improved user experience -* Consolidated help documentation for easier navigation -* Updated command structure to eliminate redundant command groups +1.0.0b1 +++++++ +* Initial release. -1.0.0b4 +1.0.0b2 ++++++ -* Update the CLI command description to support AI related queries. +* Updated command descriptions. 1.0.0b3 ++++++ * GA release of Neon CLI. Supports Change Plan, Project, Branches and Database Connection commands. -1.0.0b2 +1.0.0b4 ++++++ -* Updated command descriptions. \ No newline at end of file +* Update the CLI command description to support AI related queries. \ No newline at end of file diff --git a/src/neon/azext_neon/_help.py b/src/neon/azext_neon/_help.py index 6f99f13ecd1..126d5d00714 100644 --- a/src/neon/azext_neon/_help.py +++ b/src/neon/azext_neon/_help.py @@ -9,17 +9,3 @@ # pylint: disable=too-many-lines from knack.help_files import helps # pylint: disable=unused-import - -helps["neon"] = """ - type: group - short-summary: Manage Neon Serverless Postgres resources (organizations, projects, branches, databases, roles, endpoints, compute). - long-summary: |- - Manage Neon serverless Postgres on Azure including: - * Organization lifecycle - * Project management - * Branch management - * Database operations - * Role management - * Compute / endpoints - NOTE: Previous nested usage 'az neon postgres ' is deprecated. Use 'az neon '. -""" diff --git a/src/neon/azext_neon/aaz/__init__.py b/src/neon/azext_neon/aaz/__init__.py index da41599023b..5757aea3175 100644 --- a/src/neon/azext_neon/aaz/__init__.py +++ b/src/neon/azext_neon/aaz/__init__.py @@ -4,5 +4,3 @@ # # Code generated by aaz-dev-tools # -------------------------------------------------------------------------------------------- - -from . import latest diff --git a/src/neon/azext_neon/aaz/latest/__init__.py b/src/neon/azext_neon/aaz/latest/__init__.py index 2d6ac5df855..f6acc11aa4e 100644 --- a/src/neon/azext_neon/aaz/latest/__init__.py +++ b/src/neon/azext_neon/aaz/latest/__init__.py @@ -8,4 +8,3 @@ # pylint: skip-file # flake8: noqa -from . import neon diff --git a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py index faf0cd18277..cb8b7c550f1 100644 --- a/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/__cmd_group.py @@ -15,10 +15,9 @@ "neon", ) class __CMDGroup(AAZCommandGroup): - """Manage Neon Serverless Postgres resources including organizations, projects, and branches. + """Manage Neon Postgres databases and related resources within Azure. """ pass __all__ = ["__CMDGroup"] - diff --git a/src/neon/azext_neon/aaz/latest/neon/__init__.py b/src/neon/azext_neon/aaz/latest/neon/__init__.py index 2d0e25549bb..5a9d61963d6 100644 --- a/src/neon/azext_neon/aaz/latest/neon/__init__.py +++ b/src/neon/azext_neon/aaz/latest/neon/__init__.py @@ -9,4 +9,3 @@ # flake8: noqa from .__cmd_group import * -from . import postgres diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py index e69de29bb2d..745e1d2f204 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/__cmd_group.py @@ -0,0 +1,23 @@ +# -------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# +# Code generated by aaz-dev-tools +# -------------------------------------------------------------------------------------------- + +# pylint: skip-file +# flake8: noqa + +from azure.cli.core.aaz import * + + +@register_command_group( + "neon postgres", +) +class __CMDGroup(AAZCommandGroup): + """Manage Neon Serverless Postgres resources including organizations, projects, and branches. + """ + pass + + +__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/__init__.py index e8f9155864a..a6df9f5a835 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/__init__.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/__init__.py @@ -8,14 +8,5 @@ # pylint: skip-file # flake8: noqa -"""Neon Postgres command group and subcommands.""" - from .__cmd_group import * from ._create import * -from . import branch -from . import compute -from . import endpoint -from . import neon_database -from . import neon_role -from . import organization -from . import project diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py index 08b722dd95b..062c5cea8d0 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/_create.py @@ -11,20 +11,17 @@ from azure.cli.core.aaz import * -@register_command( - "neon create", - ) class Create(AAZCommand): """Create a Neon organization - :example: Create Neon Organization (Shortcut) - az neon create --resource-group myResourceGroup --name myNeonOrg --location eastus --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:Subscribed,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:term1234}}" --user-details "{first-name:John,last-name:Doe,email-address:johndoe@example.com,upn:johndoe,phone-number:+1234567890}" --company-details "{company-name:'DemoCompany',country:USA,business-phone:+9876543210,office-address:'123 Azure Ave, Redmond, WA',domain:democompany.com,number-of-employees:1000}" --partner-organization-properties "{organization-id:org-5678,org-name:'PartnerOrg',single-sign-on-properties:{single-sign-on-state:Enable,enterprise-app-id:app-9876,single-sign-on-url:'https://sso.partnerorg.com',aad-domains:['partnerorg.com']}}" + :example: Organizations_CreateOrUpdate + az neon postgres create --resource-group demoResourceGroup --name demoNeonResource --location eastus --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:PendingFulfillmentStart,offer-details:{publisher-id:microsoft,offer-id:neon-postgres,plan-id:serverless-plan,plan-name:'Neon Serverless Postgres - Free (Test_Liftr)',term-unit:P1M,term-id:term1234}}" --user-details "{first-name:John,last-name:Doe,email-address:johndoe@example.com,upn:johndoe,phone-number:+1234567890}" --company-details "{company-name:'DemoCompany',country:USA,business-phone:+9876543210,office-address:'123 Azure Ave, Redmond, WA',domain:democompany.com,number-of-employees:1000}" --partner-organization-properties "{organization-id:org-5678,org-name:'PartnerOrg',single-sign-on-properties:{single-sign-on-state:Enable,enterprise-app-id:app-9876,single-sign-on-url:'https://sso.partnerorg.com',aad-domains:['partnerorg.com']}}" """ _aaz_info = { - "version": "2025-03-01", + "version": "2024-08-01-preview", "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2025-03-01"], + ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}", "2024-08-01-preview"], ] } @@ -123,7 +120,7 @@ def _build_arguments_schema(cls, *args, **kwargs): marketplace_details.subscription_status = AAZStrArg( options=["subscription-status"], help="Marketplace subscription status", - enum={"Subscribed": "Subscribed", "Subscribed": "Subscribed", "Suspended": "Suspended", "Unsubscribed": "Unsubscribed"}, + enum={"PendingFulfillmentStart": "PendingFulfillmentStart", "Subscribed": "Subscribed", "Suspended": "Suspended", "Unsubscribed": "Unsubscribed"}, ) offer_details = cls._args_schema.marketplace_details.offer_details @@ -324,7 +321,7 @@ def url_parameters(self): def query_parameters(self): parameters = { **self.serialize_query_param( - "api-version", "2025-03-01", + "api-version", "2024-08-01-preview", required=True, ), } diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py index 656d3cbcd64..d4e61b202b3 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon branch", + "neon postgres branch", ) class __CMDGroup(AAZCommandGroup): """Manage branches within a Neon Postgres database. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py index 53e516a3ac5..8722eb70574 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_create.py @@ -12,13 +12,13 @@ @register_command( - "neon branch create", + "neon postgres branch create", ) class Create(AAZCommand): """Create a new branch within a Neon Postgres database. :example: Create a Branch - az neon branch create --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --branch-name test-branch --entity-name test-branch --role-name test_role --database-name testneondb + az neon postgres branch create --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --branch-name test-branch --entity-name test-branch --role-name test_role --database-name testneondb """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py index ddf5bf43890..a4a66aeb76f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_delete.py @@ -12,14 +12,14 @@ @register_command( - "neon branch delete", + "neon postgres branch delete", confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete an existing branch within a Neon Postgres database. :example: Delete Branch - az neon branch delete --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + az neon postgres branch delete --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py index 7b99ca1c616..acc13d89b51 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_list.py @@ -12,13 +12,13 @@ @register_command( - "neon branch list", + "neon postgres branch list", ) class List(AAZCommand): """List all branch resources within a specific project in Neon Postgres. :example: List Branches under a Project - az neon branch list --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + az neon postgres branch list --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py index 945e5917033..0ae9a1d8283 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_show.py @@ -12,13 +12,13 @@ @register_command( - "neon branch show", + "neon postgres branch show", ) class Show(AAZCommand): """Retrieve details of a specific branch within a Neon Postgres database. :example: Show Branch Details - az neon branch show --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + az neon postgres branch show --subscription 38a546de-5736-48e8-a69a-5cc636794112 --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py index ac25bd6ae96..cf2b397f71f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_update.py @@ -12,13 +12,13 @@ @register_command( - "neon branch update", + "neon postgres branch update", ) class Update(AAZCommand): """Update the properties of an existing branch within a Neon Postgres database. :example: Update a Branch - az neon branch update --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --project-id old-frost-16758796 --branch-name test-branch --entity-name test-branch2 --role-name test_role --database-name testneondb + az neon postgres branch update --resource-group rgneon --organization-name org-cli-test --project-name old-frost-16758796 --project-id old-frost-16758796 --branch-name test-branch --entity-name test-branch2 --role-name test_role --database-name testneondb """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py index e50ab76614d..4289a454238 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/branch/_wait.py @@ -12,7 +12,7 @@ @register_command( - "neon branch wait", + "neon postgres branch wait", ) class Wait(AAZWaitCommand): """Place the CLI in a waiting state until a condition is met. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py deleted file mode 100644 index d4fc6d327f3..00000000000 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__cmd_group.py +++ /dev/null @@ -1,23 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command_group( - "neon compute", -) -class __CMDGroup(AAZCommandGroup): - """Manage compute resources allocated to Neon Postgres databases. - """ - pass - - -__all__ = ["__CMDGroup"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py deleted file mode 100644 index d63ae5a6fc9..00000000000 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/__init__.py +++ /dev/null @@ -1,12 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from .__cmd_group import * -from ._list import * diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py deleted file mode 100644 index fe9f8d9021c..00000000000 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/compute/_list.py +++ /dev/null @@ -1,275 +0,0 @@ -# -------------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for license information. -# -# Code generated by aaz-dev-tools -# -------------------------------------------------------------------------------------------- - -# pylint: skip-file -# flake8: noqa - -from azure.cli.core.aaz import * - - -@register_command( - "neon compute list", -) -class List(AAZCommand): - """List all compute resources associated with a specific branch in Neon Postgres. - """ - - _aaz_info = { - "version": "2025-03-01", - "resources": [ - ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/neon.postgres/organizations/{}/projects/{}/branches/{}/computes", "2025-03-01"], - ] - } - - AZ_SUPPORT_PAGINATION = True - - def _handler(self, command_args): - super()._handler(command_args) - return self.build_paging(self._execute_operations, self._output) - - _args_schema = None - - @classmethod - def _build_arguments_schema(cls, *args, **kwargs): - if cls._args_schema is not None: - return cls._args_schema - cls._args_schema = super()._build_arguments_schema(*args, **kwargs) - - # define Arg Group "" - - _args_schema = cls._args_schema - _args_schema.branch_id = AAZStrArg( - options=["--branch-id"], - help="Id of the Neon branch", - required=True, - fmt=AAZStrArgFormat( - pattern="^\\S.{0,62}\\S$|^\\S$", - ), - ) - _args_schema.organization_name = AAZStrArg( - options=["--organization-name"], - help="Name of the Neon organization.", - required=True, - fmt=AAZStrArgFormat( - pattern="^[a-zA-Z0-9][a-zA-Z0-9_\\-.: ]*$", - max_length=50, - min_length=1, - ), - blank=AAZPromptInput( - msg="Please provide Neon Organization name:", - ), - ) - _args_schema.project_id = AAZStrArg( - options=["--project-id"], - help="Id of the Neon project", - required=True, - fmt=AAZStrArgFormat( - pattern="^\\S.{0,62}\\S$|^\\S$", - ), - ) - _args_schema.resource_group = AAZResourceGroupNameArg( - help="Name of the Azure resource group.", - required=True, - ) - return cls._args_schema - - def _execute_operations(self): - self.pre_operations() - self.ComputesList(ctx=self.ctx)() - self.post_operations() - - @register_callback - def pre_operations(self): - pass - - @register_callback - def post_operations(self): - pass - - def _output(self, *args, **kwargs): - result = self.deserialize_output(self.ctx.vars.instance.value, client_flatten=True) - next_link = self.deserialize_output(self.ctx.vars.instance.next_link) - return result, next_link - - class ComputesList(AAZHttpOperation): - CLIENT_TYPE = "MgmtClient" - - def __call__(self, *args, **kwargs): - request = self.make_request() - session = self.client.send_request(request=request, stream=False, **kwargs) - if session.http_response.status_code in [200]: - return self.on_200(session) - - return self.on_error(session.http_response) - - @property - def url(self): - return self.client.format_url( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Neon.Postgres/organizations/{organizationName}/projects/{projectName}/branches/{branchName}/computes", - **self.url_parameters - ) - - @property - def method(self): - return "GET" - - @property - def error_format(self): - return "MgmtErrorFormat" - - @property - def url_parameters(self): - parameters = { - **self.serialize_url_param( - "branchName", self.ctx.args.branch_id, - required=True, - ), - **self.serialize_url_param( - "organizationName", self.ctx.args.organization_name, - required=True, - ), - **self.serialize_url_param( - "projectName", self.ctx.args.project_id, - required=True, - ), - **self.serialize_url_param( - "resourceGroupName", self.ctx.args.resource_group, - required=True, - ), - **self.serialize_url_param( - "subscriptionId", self.ctx.subscription_id, - required=True, - ), - } - return parameters - - @property - def query_parameters(self): - parameters = { - **self.serialize_query_param( - "api-version", "2025-03-01", - required=True, - ), - } - return parameters - - @property - def header_parameters(self): - parameters = { - **self.serialize_header_param( - "Accept", "application/json", - ), - } - return parameters - - def on_200(self, session): - data = self.deserialize_http_content(session) - self.ctx.set_var( - "instance", - data, - schema_builder=self._build_schema_on_200 - ) - - _schema_on_200 = None - - @classmethod - def _build_schema_on_200(cls): - if cls._schema_on_200 is not None: - return cls._schema_on_200 - - cls._schema_on_200 = AAZObjectType() - - _schema_on_200 = cls._schema_on_200 - _schema_on_200.next_link = AAZStrType( - serialized_name="nextLink", - ) - _schema_on_200.value = AAZListType( - flags={"required": True}, - ) - - value = cls._schema_on_200.value - value.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element - _element.id = AAZStrType( - flags={"read_only": True}, - ) - _element.name = AAZStrType( - flags={"read_only": True}, - ) - _element.properties = AAZObjectType() - _element.system_data = AAZObjectType( - serialized_name="systemData", - flags={"read_only": True}, - ) - _element.type = AAZStrType( - flags={"read_only": True}, - ) - - properties = cls._schema_on_200.value.Element.properties - properties.attributes = AAZListType() - properties.cpu_cores = AAZIntType( - serialized_name="cpuCores", - ) - properties.created_at = AAZStrType( - serialized_name="createdAt", - flags={"read_only": True}, - ) - properties.entity_id = AAZStrType( - serialized_name="entityId", - flags={"read_only": True}, - ) - properties.entity_name = AAZStrType( - serialized_name="entityName", - ) - properties.memory = AAZIntType() - properties.provisioning_state = AAZStrType( - serialized_name="provisioningState", - flags={"read_only": True}, - ) - properties.region = AAZStrType() - properties.status = AAZStrType() - - attributes = cls._schema_on_200.value.Element.properties.attributes - attributes.Element = AAZObjectType() - - _element = cls._schema_on_200.value.Element.properties.attributes.Element - _element.name = AAZStrType( - flags={"required": True}, - ) - _element.value = AAZStrType( - flags={"required": True}, - ) - - system_data = cls._schema_on_200.value.Element.system_data - system_data.created_at = AAZStrType( - serialized_name="createdAt", - ) - system_data.created_by = AAZStrType( - serialized_name="createdBy", - ) - system_data.created_by_type = AAZStrType( - serialized_name="createdByType", - ) - system_data.last_modified_at = AAZStrType( - serialized_name="lastModifiedAt", - ) - system_data.last_modified_by = AAZStrType( - serialized_name="lastModifiedBy", - ) - system_data.last_modified_by_type = AAZStrType( - serialized_name="lastModifiedByType", - ) - - return cls._schema_on_200 - - -class _ListHelper: - """Helper class for List""" - - -__all__ = ["List"] diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py index 7fe84c72d93..582362e6762 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon endpoint", + "neon postgres endpoint", ) class __CMDGroup(AAZCommandGroup): """Manage Endpoint diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py index 56b2c9e3eab..e4bb4d22bf2 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/endpoint/_list.py @@ -12,7 +12,7 @@ @register_command( - "neon endpoint list", + "neon postgres endpoint list", ) class List(AAZCommand): """List all endpoints in a Neon branch. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py index 689f124c382..fffb1adae53 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon neon-database", + "neon postgres neon-database", ) class __CMDGroup(AAZCommandGroup): """Manage Neon Postgres databases within Azure. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py index 46d57433468..6a384b17e4c 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_database/_list.py @@ -12,13 +12,13 @@ @register_command( - "neon neon-database list", + "neon postgres neon-database list", ) class List(AAZCommand): """List all Neon Postgres databases associated with a specific branch. :example: List Neon Databases under a Branch - az neon neon-database list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + az neon postgres neon-database list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py index 331ab6fb1a7..5d6869fff25 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon neon-role", + "neon postgres neon-role", ) class __CMDGroup(AAZCommandGroup): """Manage roles and permissions within Neon Postgres databases. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py index 77e149b0b45..4e7884bbdcc 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/neon_role/_list.py @@ -12,13 +12,13 @@ @register_command( - "neon neon-role list", + "neon postgres neon-role list", ) class List(AAZCommand): """List all roles and permissions associated with a specific branch in Neon Postgres. :example: List Neon Roles under a Branch - az neon neon-role list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr + az neon postgres neon-role list --resource-group rgneon --organization-name org-test-cli --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py index a3339424692..83f6e7e7ef9 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon organization", + "neon postgres organization", ) class __CMDGroup(AAZCommandGroup): """Manage Neon organizations, which are entities created on the Neon side. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py index 154bcff060d..b542548bd6d 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_create.py @@ -12,14 +12,15 @@ @register_command( - "neon organization create", + "neon postgres organization create", ) class Create(AAZCommand): """Create a new Neon organization within a specified Azure resource group in Azure. This is typically the first step in provisioning Neon Serverless Postgres. :example: Create Neon Postgres Organization - az neon organization create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" - """ + az az neon postgres organization create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" + az neon postgres create --resource-group sralluri_rg --name Org-cli-test --location "Central US EUAP" --subscription 68a546de-5736-48e8-a69a-5cc636794112 --marketplace-details "{subscription-id:329b25d9-168d-48d5-de4b-28b2324db159,subscription-status:Pending-fullfilment,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_free,plan-name:'Free Plan',term-unit:P1M,term-id:gmz7xq9ge3py}}" --user-details "{first-name:User,last-name:Conotoso,email-address:contoso@outlook.com,upn:contoso@outlook.com,phone-number:''}" --company-details "{company-name:'',country:'',business-phone:''}" --partner-organization-properties "{organization-name:Org-cli-test}" --project-properties "{region:'Central US EUAP',pgVersion:17,branch:{branch-name:main,database-name:neondb,role-name:owner_role},project-name:Org-cli-test-project}" + """ _aaz_info = { "version": "2025-03-01", diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py index 5cc064f433d..79c797af4df 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_delete.py @@ -12,14 +12,14 @@ @register_command( - "neon organization delete", + "neon postgres organization delete", confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete an existing Neon organization within Azure. :example: Delete Neon Postgres Organization - az neon organization delete --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup --name demoNeonResource + az neon postgres organization delete --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup --name demoNeonResource """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py index 498ede4e1c3..8060be9a5e8 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_list.py @@ -12,13 +12,13 @@ @register_command( - "neon organization list", + "neon postgres organization list", ) class List(AAZCommand): """List all Neon organizations associated with a specific subscription ID. :example: List Neon Postgres Organization - az neon organization list --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup + az neon postgres organization list --subscription 12345678-1234-1234-1234-123456789abc --resource-group demoResourceGroup """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py index e9850d39484..11a5fb9fdda 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_show.py @@ -12,13 +12,13 @@ @register_command( - "neon organization show", + "neon postgres organization show", ) class Show(AAZCommand): """Retrieve details of a specific Neon organization. :example: Show Neon Postgres Organization - az neon organization show --resource-group demoResourceGroup --name demoNeonResource + az neon postgres organization show --resource-group demoResourceGroup --name demoNeonResource """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py index e20118cbe6a..01e344d584c 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_update.py @@ -12,13 +12,13 @@ @register_command( - "neon organization update", + "neon postgres organization update", ) class Update(AAZCommand): """Update the properties of an existing Neon organization within Azure. :example: Update Neon Postgres Organization - az neon create --resource-group demoResourceGroup --name demoNeonResource --location eastus2 --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:Subscribed,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_scale,plan-name:Scale Plan,term-unit:P1M,term-id:gmz7xq9ge3py}}" --company-details "{}" --partner-organization-properties "{}" + az neon postgres create --resource-group demoResourceGroup --name demoNeonResource --location eastus2 --subscription 12345678-1234-1234-1234-123456789abc --marketplace-details "{subscription-id:abcd1234-5678-90ab-cdef-12345678abcd,subscription-status:Subscribed,offer-details:{publisher-id:neon1722366567200,offer-id:neon_serverless_postgres_azure_prod,plan-id:neon_serverless_postgres_azure_prod_scale,plan-name:Scale Plan,term-unit:P1M,term-id:gmz7xq9ge3py}}" --company-details "{}" --partner-organization-properties "{}" """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py index f00415c3549..5c599700c06 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/organization/_wait.py @@ -12,7 +12,7 @@ @register_command( - "neon organization wait", + "neon postgres organization wait", ) class Wait(AAZWaitCommand): """Place the CLI in a waiting state until a condition is met. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py index f229ad84948..776ee9ef91f 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/__cmd_group.py @@ -12,7 +12,7 @@ @register_command_group( - "neon project", + "neon postgres project", ) class __CMDGroup(AAZCommandGroup): """Manage Neon projects, including listing, creating, updating, deleting, and retrieving project information. diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py index 213f78ff0ac..6df49b6bc76 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_create.py @@ -12,13 +12,13 @@ @register_command( - "neon project create", + "neon postgres project create", ) class Create(AAZCommand): """Create a new Neon project resource within Azure. :example: Create Neon Project - az neon project create --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 17 --branch "{branch-name:main, role-name:owner_role,database-name:neondb}" + az neon postgres project create --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 17 --branch "{branch-name:main, role-name:owner_role,database-name:neondb}" """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py index bd042cf634c..cb15eb2506b 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_delete.py @@ -12,14 +12,14 @@ @register_command( - "neon project delete", + "neon postgres project delete", confirmation="Are you sure you want to perform this operation?", ) class Delete(AAZCommand): """Delete an existing Neon project resource within Azure. :example: Delete Neon Project - az neon project delete --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + az neon postgres project delete --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py index 0ede819e7cf..fe4cabb4fa8 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_get_connection_uri.py @@ -12,13 +12,13 @@ @register_command( - "neon project get-connection-uri", + "neon postgres project get-connection-uri", ) class GetConnectionUri(AAZCommand): """Retrieve the connection URI for a specific Neon Postgres database. :example: Get Database Connection URI - az neon project get-connection-uri --resource-group rgneon --organization-name test-org --project-name entity-name --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr --database-name neondb --role-name owner_role --endpoint-id ep-purple-voice-a84wphbw --is-pooled false + az neon postgres project get-connection-uri --resource-group rgneon --organization-name test-org --project-name entity-name --project-id old-frost-16758796 --branch-id br-spring-field-a8vje3tr --database-name neondb --role-name owner_role --endpoint-id ep-purple-voice-a84wphbw --is-pooled false """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py index 6ed706d12f5..c24ea073d07 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_list.py @@ -12,13 +12,13 @@ @register_command( - "neon project list", + "neon postgres project list", ) class List(AAZCommand): """List all Neon projects associated with a specific Neon organization. :example: List Neon Projects within an Organization - az neon project list --resource-group rgneon --organization-name org-cli-test + az neon postgres project list --resource-group rgneon --organization-name org-cli-test """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py index b61f9d71f61..7380f40e6a2 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_show.py @@ -12,13 +12,13 @@ @register_command( - "neon project show", + "neon postgres project show", ) class Show(AAZCommand): """Retrieve details of a specific Neon project resource. - :example: Show Neon Project Details - az neon project show --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 + :example: Show Neon Project Deatils + az neon postgres project show --resource-group rgneon --organization-name org-cli-test --project-id old-frost-16758796 """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py index fcb719b5bd1..589d28635e6 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_update.py @@ -12,13 +12,13 @@ @register_command( - "neon project update", + "neon postgres project update", ) class Update(AAZCommand): """Update the properties of an existing Neon project resource within Azure. :example: Neon Project Update - az neon project update --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 18 + az neon postgres project update --resource-group rgneon --organization-name neon-org --project-name neon-project --region eastus2 --pg-version 18 """ _aaz_info = { diff --git a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py index 785f077916d..2de532b0136 100644 --- a/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py +++ b/src/neon/azext_neon/aaz/latest/neon/postgres/project/_wait.py @@ -12,7 +12,7 @@ @register_command( - "neon project wait", + "neon postgres project wait", ) class Wait(AAZWaitCommand): """Place the CLI in a waiting state until a condition is met. diff --git a/src/neon/azext_neon/azext_metadata.json b/src/neon/azext_neon/azext_metadata.json index 31ec5cc0776..e506328978c 100644 --- a/src/neon/azext_neon/azext_metadata.json +++ b/src/neon/azext_neon/azext_metadata.json @@ -1,4 +1,4 @@ { "azext.isPreview": true, - "azext.minCliCoreVersion": "2.67.0" -} + "azext.minCliCoreVersion": "2.70.0" +} \ No newline at end of file diff --git a/src/neon/azext_neon/tests/latest/test_neon.py b/src/neon/azext_neon/tests/latest/test_neon.py index b8f8ac0b4b4..5e945befbc4 100644 --- a/src/neon/azext_neon/tests/latest/test_neon.py +++ b/src/neon/azext_neon/tests/latest/test_neon.py @@ -71,7 +71,7 @@ def test_neon(self, resource_group): # Create Neon Organization # Tags: Create, Organization, Marketplace, Complex-Properties - self.cmd('az neon organization create --resource-group {resource_group} --name {name} --location {location} --tags {tags} --subscription {subscription} ' + self.cmd('az neon postgres organization create --resource-group {resource_group} --name {name} --location {location} --tags {tags} --subscription {subscription} ' '--marketplace-details \'{{"subscription-id": "{marketplace_subscription_id}", "subscription-status": "PendingFulfillmentStart", ' '"offer-details": {{"publisher-id": "{publisher_id}", "offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}}}\' ' '--user-details \'{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}\' ' @@ -88,43 +88,43 @@ def test_neon(self, resource_group): # List Neon Organizations # Tags: List, Organization, Subscription-Scoped - self.cmd('az neon organization list --subscription {subscription} --resource-group {resource_group}', + self.cmd('az neon postgres organization list --subscription {subscription} --resource-group {resource_group}', checks=[]) # Show Neon Organization # Tags: Show, Organization, Resource-Specific - self.cmd('az neon organization show --subscription {subscription} --resource-group {resource_group} --name {name}', + self.cmd('az neon postgres organization show --subscription {subscription} --resource-group {resource_group} --name {name}', checks=[ self.check('name', '{name}'), ]) # Create Neon Project with a default branch and database - self.cmd('az neon project create --resource-group {resource_group} --organization-name {name} ' + self.cmd('az neon postgres project create --resource-group {resource_group} --organization-name {name} ' '--project-name {new_project_name} --pg-version {pg_version} --region {region_id} ' '--branch "{{\\"branch-name\\":\\"{new_branch_name}\\", \\"role-name\\":\\"{new_role_name}\\", \\"database-name\\":\\"{new_database_name}\\"}}\"') # List Neon Projects in organization - self.cmd('az neon project list --resource-group {resource_group} --organization-name {name}', + self.cmd('az neon postgres project list --resource-group {resource_group} --organization-name {name}', checks=[ self.greater_than('length(@)', 0), ]) # Show Neon Project - self.cmd('az neon project show --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', + self.cmd('az neon postgres project show --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', checks=[ self.check('properties.regionId', '{region_id}'), ]) # List branches in the project - self.cmd('az neon branch list --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', + self.cmd('az neon postgres branch list --resource-group {org_resource_group} --organization-name {org_name} --project-id {project_id}', checks=[ self.greater_than('length(@)', 0), # Should have at least 1 branches now ]) # Create a new branch (dev-branch) off the main branch - self.cmd('az neon branch create --resource-group {resource_group} --organization-name {org_name} ' + self.cmd('az neon postgres branch create --resource-group {resource_group} --organization-name {org_name} ' '--project-name {project_id} --name {new_branch_name} --parent-id {branch_id} ' '--role-name {role_name} --database-name {database_name}', checks=[ @@ -133,14 +133,14 @@ def test_neon(self, resource_group): ]) # List databases in a branch - self.cmd('az neon neon-database list --resource-group {org_resource_group} --organization-name {org_name} ' + self.cmd('az neon postgres neon-database list --resource-group {org_resource_group} --organization-name {org_name} ' '--project-id {project_id} --branch-id {branch_id}', checks=[ self.greater_than('length(@)', 0) ]) # List roles in a branch - self.cmd('az neon neon-role list --resource-group {org_resource_group} --organization-name {org_name} ' + self.cmd('az neon postgres neon-role list --resource-group {org_resource_group} --organization-name {org_name} ' '--project-id {project_id} --branch-id {branch_id}', checks=[ self.greater_than('length(@)', 0) @@ -148,14 +148,14 @@ def test_neon(self, resource_group): # Delete the branch - self.cmd('az neon branch delete --resource-group {resource_group} --organization-name {org_name} ' + self.cmd('az neon postgres branch delete --resource-group {resource_group} --organization-name {org_name} ' '--project-id {project_id_to_delete} --branch-id {branch_id_to_delete} --yes', checks=[]) # Delete Neon Project - self.cmd('az neon project delete --resource-group {resource_group} --organization-name {org_name}' + self.cmd('az neon postgres project delete --resource-group {resource_group} --organization-name {org_name}' ' --project-id {project_id_to_delete} --yes', checks=[]) # Delete Neon Organization - self.cmd('az neon organization delete --resource-group {resource_group} --name {name} ' + self.cmd('az neon postgres organization delete --resource-group {resource_group} --name {name} ' '--subscription {subscription} --yes', checks=[]) \ No newline at end of file diff --git a/src/neon/setup.py b/src/neon/setup.py index e832f14fd53..89187d719a5 100644 --- a/src/neon/setup.py +++ b/src/neon/setup.py @@ -10,7 +10,7 @@ # HISTORY.rst entry. -VERSION = '1.0.0b5' +VERSION = '1.0.0b6' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers