Skip to content

Commit 5ee1f18

Browse files
updating mongodb cli to stable version (#8918)
* updating mongodb cli * updating version * updating tests * updating tests with dummy values
1 parent 9c7fbf7 commit 5ee1f18

File tree

12 files changed

+173
-783
lines changed

12 files changed

+173
-783
lines changed

src/mongo-db/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.0
7+
++++++
8+
* Stable release.
9+
610
1.0.0b1
711
++++++
812
* Initial release.

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/__cmd_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command_group(
1515
"mongo-db",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Manage MongoDB

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/__cmd_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command_group(
1515
"mongo-db atlas",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Manage MongoDB Atlas

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/__cmd_group.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command_group(
1515
"mongo-db atlas organization",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Manage Azure resources that represent MongoDB Atlas organizations

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_create.py

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command(
1515
"mongo-db atlas organization create",
16-
is_preview=True,
1716
)
1817
class Create(AAZCommand):
1918
"""Create an Azure resource that provisions a corresponding MongoDB Atlas organization
@@ -23,9 +22,9 @@ class Create(AAZCommand):
2322
"""
2423

2524
_aaz_info = {
26-
"version": "2024-11-18-preview",
25+
"version": "2025-06-01",
2726
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2024-11-18-preview"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2025-06-01"],
2928
]
3029
}
3130

@@ -63,6 +62,23 @@ def _build_arguments_schema(cls, *args, **kwargs):
6362

6463
# define Arg Group "Identity"
6564

65+
_args_schema = cls._args_schema
66+
_args_schema.mi_system_assigned = AAZStrArg(
67+
options=["--system-assigned", "--mi-system-assigned"],
68+
arg_group="Identity",
69+
help="Set the system managed identity",
70+
blank="True",
71+
)
72+
_args_schema.mi_user_assigned = AAZListArg(
73+
options=["--user-assigned", "--mi-user-assigned"],
74+
arg_group="Identity",
75+
help="Set the user managed identities",
76+
blank=[],
77+
)
78+
79+
mi_user_assigned = cls._args_schema.mi_user_assigned
80+
mi_user_assigned.Element = AAZStrArg()
81+
6682
# define Arg Group "Properties"
6783

6884
_args_schema = cls._args_schema
@@ -113,17 +129,14 @@ def _build_arguments_schema(cls, *args, **kwargs):
113129
options=["publisher-id"],
114130
help="Publisher Id for the marketplace offer",
115131
required=True,
116-
default="mongodb",
117132
)
118133
offer_details.term_id = AAZStrArg(
119134
options=["term-id"],
120135
help="Term id for the marketplace offer",
121-
default="gmz7xq9ge3py",
122136
)
123137
offer_details.term_unit = AAZStrArg(
124138
options=["term-unit"],
125139
help="Term Unit for the marketplace offer",
126-
default="P1M",
127140
)
128141

129142
partner_properties = cls._args_schema.partner_properties
@@ -280,7 +293,7 @@ def url_parameters(self):
280293
def query_parameters(self):
281294
parameters = {
282295
**self.serialize_query_param(
283-
"api-version", "2024-11-18-preview",
296+
"api-version", "2025-06-01",
284297
required=True,
285298
),
286299
}
@@ -310,6 +323,15 @@ def content(self):
310323
_builder.set_prop("properties", AAZObjectType)
311324
_builder.set_prop("tags", AAZDictType, ".tags")
312325

326+
identity = _builder.get(".identity")
327+
if identity is not None:
328+
identity.set_prop("userAssigned", AAZListType, ".mi_user_assigned", typ_kwargs={"flags": {"action": "create"}})
329+
identity.set_prop("systemAssigned", AAZStrType, ".mi_system_assigned", typ_kwargs={"flags": {"action": "create"}})
330+
331+
user_assigned = _builder.get(".identity.userAssigned")
332+
if user_assigned is not None:
333+
user_assigned.set_elements(AAZStrType, ".")
334+
313335
properties = _builder.get(".properties")
314336
if properties is not None:
315337
properties.set_prop("marketplace", AAZObjectType, ".marketplace", typ_kwargs={"flags": {"required": True}})

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_delete.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command(
1515
"mongo-db atlas organization delete",
16-
is_preview=True,
1716
confirmation="Are you sure you want to perform this operation?",
1817
)
1918
class Delete(AAZCommand):
@@ -24,9 +23,9 @@ class Delete(AAZCommand):
2423
"""
2524

2625
_aaz_info = {
27-
"version": "2024-11-18-preview",
26+
"version": "2025-06-01",
2827
"resources": [
29-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2024-11-18-preview"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2025-06-01"],
3029
]
3130
}
3231

@@ -150,7 +149,7 @@ def url_parameters(self):
150149
def query_parameters(self):
151150
parameters = {
152151
**self.serialize_query_param(
153-
"api-version", "2024-11-18-preview",
152+
"api-version", "2025-06-01",
154153
required=True,
155154
),
156155
}

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_list.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command(
1515
"mongo-db atlas organization list",
16-
is_preview=True,
1716
)
1817
class List(AAZCommand):
1918
"""List all Azure resources representing MongoDB Atlas organizations under the current subscription
@@ -23,10 +22,10 @@ class List(AAZCommand):
2322
"""
2423

2524
_aaz_info = {
26-
"version": "2024-11-18-preview",
25+
"version": "2025-06-01",
2726
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/providers/mongodb.atlas/organizations", "2024-11-18-preview"],
29-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations", "2024-11-18-preview"],
27+
["mgmt-plane", "/subscriptions/{}/providers/mongodb.atlas/organizations", "2025-06-01"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations", "2025-06-01"],
3029
]
3130
}
3231

@@ -115,7 +114,7 @@ def url_parameters(self):
115114
def query_parameters(self):
116115
parameters = {
117116
**self.serialize_query_param(
118-
"api-version", "2024-11-18-preview",
117+
"api-version", "2025-06-01",
119118
required=True,
120119
),
121120
}
@@ -364,7 +363,7 @@ def url_parameters(self):
364363
def query_parameters(self):
365364
parameters = {
366365
**self.serialize_query_param(
367-
"api-version", "2024-11-18-preview",
366+
"api-version", "2025-06-01",
368367
required=True,
369368
),
370369
}

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_show.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
@register_command(
1515
"mongo-db atlas organization show",
16-
is_preview=True,
1716
)
1817
class Show(AAZCommand):
1918
"""Retrieve details of the Azure resource associated with a MongoDB Atlas organization
@@ -23,9 +22,9 @@ class Show(AAZCommand):
2322
"""
2423

2524
_aaz_info = {
26-
"version": "2024-11-18-preview",
25+
"version": "2025-06-01",
2726
"resources": [
28-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2024-11-18-preview"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/mongodb.atlas/organizations/{}", "2025-06-01"],
2928
]
3029
}
3130

@@ -127,7 +126,7 @@ def url_parameters(self):
127126
def query_parameters(self):
128127
parameters = {
129128
**self.serialize_query_param(
130-
"api-version", "2024-11-18-preview",
129+
"api-version", "2025-06-01",
131130
required=True,
132131
),
133132
}

src/mongo-db/azext_mongo_db/aaz/latest/mongo_db/atlas/organization/_wait.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Wait(AAZWaitCommand):
2020

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

@@ -122,7 +122,7 @@ def url_parameters(self):
122122
def query_parameters(self):
123123
parameters = {
124124
**self.serialize_query_param(
125-
"api-version", "2024-11-18-preview",
125+
"api-version", "2025-06-01",
126126
required=True,
127127
),
128128
}

0 commit comments

Comments
 (0)