-
Notifications
You must be signed in to change notification settings - Fork 1.5k
updating mongodb cli to stable version #8918
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
Merged
evelyn-ys
merged 5 commits into
Azure:main
from
ajaykumarmehra:users/ajaykumar/MongoDBCLIStable
Jul 3, 2025
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1fd612f
updating mongodb cli
ajaykumarmehra 7a5c556
updating version
ajaykumarmehra 5a7624e
updating tests
ajaykumarmehra ca444ca
updating tests with dummy values
ajaykumarmehra 0fc5968
Merge branch 'Azure:main' into users/ajaykumar/MongoDBCLIStable
ajaykumarmehra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,10 @@ | |
| Release History | ||
| =============== | ||
|
|
||
| 1.0.0 | ||
| ++++++ | ||
| * Stable release. | ||
|
|
||
| 1.0.0b1 | ||
| ++++++ | ||
| * Initial release. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,6 @@ | |
|
|
||
| @register_command( | ||
| "mongo-db atlas organization create", | ||
| is_preview=True, | ||
| ) | ||
| class Create(AAZCommand): | ||
| """Create an Azure resource that provisions a corresponding MongoDB Atlas organization | ||
|
|
@@ -23,9 +22,9 @@ class Create(AAZCommand): | |
| """ | ||
|
|
||
| _aaz_info = { | ||
| "version": "2024-11-18-preview", | ||
| "version": "2025-06-01", | ||
| "resources": [ | ||
| ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2024-11-18-preview"], | ||
| ["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2025-06-01"], | ||
| ] | ||
| } | ||
|
|
||
|
|
@@ -63,6 +62,23 @@ def _build_arguments_schema(cls, *args, **kwargs): | |
|
|
||
| # define Arg Group "Identity" | ||
|
|
||
| _args_schema = cls._args_schema | ||
| _args_schema.mi_system_assigned = AAZStrArg( | ||
| options=["--system-assigned", "--mi-system-assigned"], | ||
| arg_group="Identity", | ||
| help="Set the system managed identity", | ||
| blank="True", | ||
| ) | ||
| _args_schema.mi_user_assigned = AAZListArg( | ||
| options=["--user-assigned", "--mi-user-assigned"], | ||
| arg_group="Identity", | ||
| help="Set the user managed identities", | ||
| blank=[], | ||
| ) | ||
|
|
||
| mi_user_assigned = cls._args_schema.mi_user_assigned | ||
| mi_user_assigned.Element = AAZStrArg() | ||
|
|
||
| # define Arg Group "Properties" | ||
|
|
||
| _args_schema = cls._args_schema | ||
|
|
@@ -113,17 +129,14 @@ def _build_arguments_schema(cls, *args, **kwargs): | |
| options=["publisher-id"], | ||
| help="Publisher Id for the marketplace offer", | ||
| required=True, | ||
| default="mongodb", | ||
| ) | ||
| offer_details.term_id = AAZStrArg( | ||
| options=["term-id"], | ||
| help="Term id for the marketplace offer", | ||
| default="gmz7xq9ge3py", | ||
| ) | ||
| offer_details.term_unit = AAZStrArg( | ||
| options=["term-unit"], | ||
| help="Term Unit for the marketplace offer", | ||
| default="P1M", | ||
| ) | ||
|
|
||
| partner_properties = cls._args_schema.partner_properties | ||
|
|
@@ -280,7 +293,7 @@ def url_parameters(self): | |
| def query_parameters(self): | ||
| parameters = { | ||
| **self.serialize_query_param( | ||
| "api-version", "2024-11-18-preview", | ||
| "api-version", "2025-06-01", | ||
| required=True, | ||
| ), | ||
| } | ||
|
|
@@ -310,6 +323,15 @@ def content(self): | |
| _builder.set_prop("properties", AAZObjectType) | ||
| _builder.set_prop("tags", AAZDictType, ".tags") | ||
|
|
||
| identity = _builder.get(".identity") | ||
|
||
| if identity is not None: | ||
| identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}}) | ||
| identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}}) | ||
|
|
||
| user_assigned = _builder.get(".identity.userAssigned") | ||
| if user_assigned is not None: | ||
| user_assigned.set_elements(AAZStrType, ".") | ||
|
|
||
| properties = _builder.get(".properties") | ||
| if properties is not None: | ||
| properties.set_prop("marketplace", AAZObjectType, ".marketplace", typ_kwargs={"flags": {"required": True}}) | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
--system-assignedflag represents a boolean state; usingAAZStrArgmay lead to type mismatches. Consider switching toAAZBoolArgfor clarity and correct type handling.