Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/mongo-db/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0
++++++
* Stable release.

1.0.0b1
++++++
* Initial release.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mongo-db",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage MongoDB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mongo-db atlas",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage MongoDB Atlas
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mongo-db atlas organization",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Azure resources that represent MongoDB Atlas organizations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"],
]
}

Expand Down Expand Up @@ -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",
Comment on lines +66 to +70
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

The --system-assigned flag represents a boolean state; using AAZStrArg may lead to type mismatches. Consider switching to AAZBoolArg for clarity and correct type handling.

Suggested change
_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_system_assigned = AAZBoolArg(
options=["--system-assigned", "--mi-system-assigned"],
arg_group="Identity",
help="Set the system managed identity",

Copilot uses AI. Check for mistakes.
)
_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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
),
}
Expand Down Expand Up @@ -310,6 +323,15 @@ def content(self):
_builder.set_prop("properties", AAZObjectType)
_builder.set_prop("tags", AAZDictType, ".tags")

identity = _builder.get(".identity")
Copy link

Copilot AI Jul 1, 2025

Choose a reason for hiding this comment

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

The builder never initializes an identity object, so get(".identity") will return None and the MI fields won't be set. Consider calling _builder.set_prop("identity", AAZObjectType) before accessing its children.

Copilot uses AI. Check for mistakes.
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}})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"mongo-db atlas organization delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
Expand All @@ -24,9 +23,9 @@ class Delete(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"],
]
}

Expand Down Expand Up @@ -150,7 +149,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,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"mongo-db atlas organization list",
is_preview=True,
)
class List(AAZCommand):
"""List all Azure resources representing MongoDB Atlas organizations under the current subscription
Expand All @@ -23,10 +22,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2024-11-18-preview",
"version": "2025-06-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/mongodb.atlas/organizations", "2024-11-18-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations", "2024-11-18-preview"],
["mgmt-plane", "/subscriptions/{}/providers/mongodb.atlas/organizations", "2025-06-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations", "2025-06-01"],
]
}

Expand Down Expand Up @@ -115,7 +114,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,
),
}
Expand Down Expand Up @@ -364,7 +363,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,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command(
"mongo-db atlas organization show",
is_preview=True,
)
class Show(AAZCommand):
"""Retrieve details of the Azure resource associated with a MongoDB Atlas organization
Expand All @@ -23,9 +22,9 @@ class Show(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"],
]
}

Expand Down Expand Up @@ -127,7 +126,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,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):

_aaz_info = {
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2024-11-18-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2025-06-01"],
]
}

Expand Down Expand Up @@ -122,7 +122,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,
),
}
Expand Down
Loading
Loading