Skip to content

Conversation

@banggaurav
Copy link
Contributor

@banggaurav banggaurav commented May 22, 2025


This checklist is used to make sure that common guidelines for a pull request are followed.

Related command

General Guidelines

  • Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
  • Have you run python scripts/ci/test_index.py -q locally? (pip install wheel==0.30.0 required)
  • My extension version conforms to the Extension version schema

For new extensions:

About Extension Publish

There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update src/index.json automatically.
You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify src/index.json.

Copilot AI review requested due to automatic review settings May 22, 2025 06:30
@azure-client-tools-bot-prd
Copy link

Validation for Breaking Change Starting...

Thanks for your contribution!

@yonzhan
Copy link
Collaborator

yonzhan commented May 22, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new Azure CLI extension for managing MongoDB Atlas organizations, providing commands for creating, showing, deleting, listing, and waiting on organization resources. Key changes include auto-generated command implementations using AAZ, metadata updates specifying preview status and minimum CLI core version, and documentation updates with usage examples.

Reviewed Changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/mongodb/azext_mongodb/tests/init.py Added the test module initialization (auto-generated).
src/mongodb/azext_mongodb/custom.py Introduced custom module with logger setup.
src/mongodb/azext_mongodb/commands.py Added a stub for command table loading.
src/mongodb/azext_mongodb/azext_metadata.json Metadata file marking the extension as preview.
src/mongodb/azext_mongodb/aaz/latest/... Multiple files adding commands (_wait.py, _show.py, _delete.py, etc.) with auto-generated AAZ command implementations.
src/mongodb/README.md Provided installation and usage guidance.
src/mongodb/HISTORY.rst Initial release history entry.
Other files Various auto-generated initialization, parameter, and helper files for organizing and grouping CLI commands.
Comments suppressed due to low confidence (1)

src/mongodb/README.md:41

  • The command example appears to have formatting issues such as a missing space between the subscription flag and the --user flag, as well as an extra quote after the email address. Please revise the example for clarity and correctness.
mongo-db atlas organization create -name MyOrganizationResourceName --resource-group MyResourceGroup --location "eastus" --subscription "abcd1234-5678-90ab-cdef-12345678abcd"--user {"first-name":"John","last-name":"Doe","email-address":"[email protected]"}" --marketplace "{...

@banggaurav banggaurav requested a review from vpriyanshi May 22, 2025 06:31
@github-actions
Copy link

CodeGen Tools Feedback Collection

Thank you for using our CodeGen tool. We value your feedback, and we would like to know how we can improve our product. Please take a few minutes to fill our codegen survey

@github-actions
Copy link

@yonzhan yonzhan requested a review from evelyn-ys May 22, 2025 07:13
@AllyW
Copy link
Contributor

AllyW commented May 22, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).



class MongodbScenario(ScenarioTest):
# TODO: add tests here
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add some tests here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added

az mongo-db atlas organization create --resource-group {resource_group} --name {resource_name} --user '{{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "company-name": "{user_company_name}", "upn": "{user_upn}", "phone-number": "{user_phone}"}}' --marketplace '{{"subscription-id": "{subscription_id}", "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}"}}}}' --partner-properties '{"organization-name": "{partner_org_name}"}' --tags "{key:value}" --location {location}
```

mongo-db atlas organization create -name MyOrganizationResourceName --resource-group MyResourceGroup --location "eastus" --subscription "abcd1234-5678-90ab-cdef-12345678abcd"--user {"first-name":"John","last-name":"Doe","email-address":"[email protected]"}" --marketplace "{"subscription-id":"abcd1234-5678-90ab-cdef-12345678abcd","subscription-status":"PendingFulfillmentStart","offer-details":{"publisher-id":"mongodb","offer-id":"mongodb_atlas_azure_native_prod","plan-id":"private_plan","plan-name":"Pay as You Go (Free) (Private)","term-unit":"P1M","term-id":"gmz7xq9ge3py"}}" --partner-properties "{"organization-name":"partner-org-name"}"
Copy link
Contributor

Choose a reason for hiding this comment

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

dup cmd line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

#### Delete a MongoDB Atlas Organization. This deletes the MongoDB Atlas resource in Azure. ####

```
az mongo-db atlas organization delete --resource-group {resource_group} --name {resource_name}```
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
az mongo-db atlas organization delete --resource-group {resource_group} --name {resource_name}```
az mongo-db atlas organization delete --resource-group {resource_group} --name {resource_name}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@AllyW AllyW changed the title mongdo-db cli {Mongodb} CLI extension initial release May 22, 2025
@AllyW
Copy link
Contributor

AllyW commented May 23, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@AllyW
Copy link
Contributor

AllyW commented May 23, 2025

/azp run

@AllyW AllyW changed the title {Mongodb} CLI extension initial release {Mongo-db} CLI extension initial release May 23, 2025
@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@AllyW
Copy link
Contributor

AllyW commented May 23, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@AllyW
Copy link
Contributor

AllyW commented May 23, 2025

aaz pr: Azure/aaz#767

@evelyn-ys evelyn-ys merged commit 7cbb975 into Azure:main May 23, 2025
24 checks passed
@azclibot
Copy link
Collaborator

[Release] Update index.json for extension [ mongo-db-1.0.0b1 ] : https://dev.azure.com/msazure/One/_build/results?buildId=125137833&view=results

bavneetsingh16 pushed a commit to AzureArcForKubernetes/k8s-extension that referenced this pull request May 23, 2025
* mongdo-db cli

* adding tests and addressing comments

* updating extension name to mongo-db

* Update src/mongo-db/azext_mongo_db/tests/latest/test_mongo_db.py

---------

Co-authored-by: Gaurav Bang <[email protected]>
Co-authored-by: AllyW <[email protected]>
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.

5 participants