Skip to content

Commit 21ed215

Browse files
authored
[MCC] New Version Commands For Microsoft Connected Cache (#8863)
* [CLI][Extensions][MCC] New Version Commands For Microsoft Connected Cache. * Changes for necusjz comments. Added updates in HISTORY.rst, and updated VERSION to 1.0.0b3 in setup.py. * Final GA changes for MCC CLI extension * Small bug fix - unregister get-provisioning-details * style check fixes * Add examples for lint * set creation method registered to false
1 parent 94f8067 commit 21ed215

37 files changed

+2157
-516
lines changed

src/mcc/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.0b3 (2025-06-17)
7+
++++++
8+
* Refactored commands to use new GA API version for MCC.
9+
610
1.0.0b1 (2024-10-16)
711
++++++
812
* Initial release.

src/mcc/azext_mcc/aaz/latest/mcc/__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
"mcc",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Microsoft Connected Cache CLI Commands

src/mcc/azext_mcc/aaz/latest/mcc/ent/__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
"mcc ent",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Microsoft Connected Cache for Enterprise CLI commands

src/mcc/azext_mcc/aaz/latest/mcc/ent/node/__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
"mcc ent node",
16-
is_preview=True,
1716
)
1817
class __CMDGroup(AAZCommandGroup):
1918
"""Microsoft Connected Cache for Enterprise cache node CLI commands

src/mcc/azext_mcc/aaz/latest/mcc/ent/node/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from .__cmd_group import *
1212
from ._create import *
1313
from ._delete import *
14+
from ._get_deployment_details import *
1415
from ._get_provisioning_details import *
1516
from ._list import *
1617
from ._show import *

src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_create.py

Lines changed: 150 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,18 @@
1313

1414
@register_command(
1515
"mcc ent node create",
16-
is_preview=True,
1716
)
1817
class Create(AAZCommand):
1918
"""Creates a Microsoft Connected Cache for Enterprise cache node with specified parameters.
19+
20+
:example: Create MCC Enterprise Cache Node
21+
az mcc ent resource create --mcc-resource-name [MccResourceName] --cache-node-name [MccCacheNodeName] --host-os [WindowsOrLinux] --resource-group [MccResourceRgName]
2022
"""
2123

2224
_aaz_info = {
23-
"version": "2023-05-01-preview",
25+
"version": "2024-11-30-preview",
2426
"resources": [
25-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2023-05-01-preview"],
27+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2024-11-30-preview"],
2628
]
2729
}
2830

@@ -67,6 +69,19 @@ def _build_arguments_schema(cls, *args, **kwargs):
6769
required=True,
6870
)
6971

72+
# define Arg Group "AdditionalCacheNodeProperties"
73+
74+
_args_schema = cls._args_schema
75+
_args_schema.creation_method = AAZIntArg(
76+
options=["--creation-method"],
77+
arg_group="AdditionalCacheNodeProperties",
78+
help="Resource creation method of mcc cache node resource, cli or portal",
79+
fmt=AAZIntArgFormat(
80+
maximum=5,
81+
minimum=0,
82+
),
83+
)
84+
7085
# define Arg Group "Configuration"
7186

7287
_args_schema = cls._args_schema
@@ -94,7 +109,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
94109
options=["--enable-proxy"],
95110
arg_group="Configuration",
96111
help="Cache node resource requires a proxy",
97-
enum={"Disabled": "Disabled", "Enabled": "Enabled", "None": "None", "Required": "Required"},
112+
enum={"None": "None", "Required": "Required"},
98113
)
99114
_args_schema.optional_property1 = AAZStrArg(
100115
options=["--optional-property1"],
@@ -127,22 +142,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
127142
help="Host operating system of the cache node.",
128143
enum={"Eflow": "Eflow", "Linux": "Linux", "Windows": "Windows"},
129144
)
130-
_args_schema.proxy_url = AAZStrArg(
131-
options=["--proxy-url"],
132-
arg_group="Configuration",
133-
help="Host proxy address configuration. Ex: xxx.xxx.x.x or http://exampleproxy.com.",
134-
)
135145
_args_schema.proxy_host = AAZStrArg(
136146
options=["--proxy-host"],
137147
arg_group="Configuration",
138148
help="Host proxy address configuration. Ex: xxx.xxx.x.x or http://exampleproxy.com.",
139149
)
140-
_args_schema.update_cycle_type = AAZStrArg(
141-
options=["--update-cycle-type"],
142-
arg_group="Configuration",
143-
help="Update Cycle Type",
144-
enum={"Fast": "Fast", "Preview": "Preview", "Slow": "Slow"},
145-
)
146150
_args_schema.update_info_details = AAZStrArg(
147151
options=["--update-info-details"],
148152
arg_group="Configuration",
@@ -226,7 +230,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
226230
help="Day of week (1-7) that cache node will automatically install software update",
227231
fmt=AAZIntArgFormat(
228232
maximum=7,
229-
minimum=1,
233+
minimum=0,
230234
),
231235
)
232236
cache_node.auto_update_time = AAZStrArg(
@@ -241,7 +245,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
241245
help="Week of month (1-4) that cache node will automatically install software update",
242246
fmt=AAZIntArgFormat(
243247
maximum=5,
244-
minimum=1,
248+
minimum=0,
245249
),
246250
)
247251
cache_node.auto_update_ring = AAZStrArg(
@@ -407,7 +411,7 @@ def url_parameters(self):
407411
def query_parameters(self):
408412
parameters = {
409413
**self.serialize_query_param(
410-
"api-version", "2023-05-01-preview",
414+
"api-version", "2024-11-30-preview",
411415
required=True,
412416
),
413417
}
@@ -449,6 +453,7 @@ def content(self):
449453
additional_cache_node_properties.set_prop("autoUpdateVersion", AAZStrType, ".auto_update_version")
450454
additional_cache_node_properties.set_prop("bgpConfiguration", AAZObjectType, ".bgp_configuration")
451455
additional_cache_node_properties.set_prop("cacheNodePropertiesDetailsIssuesList", AAZListType, ".cache_node_properties_details_issues_list")
456+
additional_cache_node_properties.set_prop("creationMethod", AAZIntType, ".creation_method")
452457
additional_cache_node_properties.set_prop("driveConfiguration", AAZListType, ".cache_drive")
453458
additional_cache_node_properties.set_prop("isProxyRequired", AAZStrType, ".enable_proxy")
454459
additional_cache_node_properties.set_prop("optionalProperty1", AAZStrType, ".optional_property1")
@@ -457,9 +462,7 @@ def content(self):
457462
additional_cache_node_properties.set_prop("optionalProperty4", AAZStrType, ".optional_property4")
458463
additional_cache_node_properties.set_prop("optionalProperty5", AAZStrType, ".optional_property5")
459464
additional_cache_node_properties.set_prop("osType", AAZStrType, ".host_os")
460-
additional_cache_node_properties.set_prop("proxyUrl", AAZStrType, ".proxy_url")
461465
additional_cache_node_properties.set_prop("proxyUrlConfiguration", AAZObjectType)
462-
additional_cache_node_properties.set_prop("updateCycleType", AAZStrType, ".update_cycle_type")
463466
additional_cache_node_properties.set_prop("updateInfoDetails", AAZStrType, ".update_info_details")
464467
additional_cache_node_properties.set_prop("updateRequestedDateTime", AAZStrType, ".update_requested_date_time")
465468

@@ -642,6 +645,13 @@ def _build_schema_on_200_201(cls):
642645
serialized_name="cacheNodeStateShortText",
643646
flags={"read_only": True},
644647
)
648+
additional_cache_node_properties.creation_method = AAZIntType(
649+
serialized_name="creationMethod",
650+
)
651+
additional_cache_node_properties.current_tls_certificate = AAZObjectType(
652+
serialized_name="currentTlsCertificate",
653+
flags={"read_only": True},
654+
)
645655
additional_cache_node_properties.drive_configuration = AAZListType(
646656
serialized_name="driveConfiguration",
647657
)
@@ -652,6 +662,18 @@ def _build_schema_on_200_201(cls):
652662
additional_cache_node_properties.is_proxy_required = AAZStrType(
653663
serialized_name="isProxyRequired",
654664
)
665+
additional_cache_node_properties.issues_count = AAZIntType(
666+
serialized_name="issuesCount",
667+
flags={"read_only": True},
668+
)
669+
additional_cache_node_properties.issues_list = AAZListType(
670+
serialized_name="issuesList",
671+
flags={"read_only": True},
672+
)
673+
additional_cache_node_properties.last_auto_update_info = AAZObjectType(
674+
serialized_name="lastAutoUpdateInfo",
675+
flags={"read_only": True},
676+
)
655677
additional_cache_node_properties.optional_property1 = AAZStrType(
656678
serialized_name="optionalProperty1",
657679
)
@@ -674,14 +696,12 @@ def _build_schema_on_200_201(cls):
674696
serialized_name="productVersion",
675697
flags={"read_only": True},
676698
)
677-
additional_cache_node_properties.proxy_url = AAZStrType(
678-
serialized_name="proxyUrl",
679-
)
680699
additional_cache_node_properties.proxy_url_configuration = AAZObjectType(
681700
serialized_name="proxyUrlConfiguration",
682701
)
683-
additional_cache_node_properties.update_cycle_type = AAZStrType(
684-
serialized_name="updateCycleType",
702+
additional_cache_node_properties.tls_status = AAZStrType(
703+
serialized_name="tlsStatus",
704+
flags={"read_only": True},
685705
)
686706
additional_cache_node_properties.update_info_details = AAZStrType(
687707
serialized_name="updateInfoDetails",
@@ -698,6 +718,34 @@ def _build_schema_on_200_201(cls):
698718
cache_node_properties_details_issues_list = cls._schema_on_200_201.properties.additional_cache_node_properties.cache_node_properties_details_issues_list
699719
cache_node_properties_details_issues_list.Element = AAZStrType()
700720

721+
current_tls_certificate = cls._schema_on_200_201.properties.additional_cache_node_properties.current_tls_certificate
722+
current_tls_certificate.action_required = AAZStrType(
723+
serialized_name="actionRequired",
724+
flags={"read_only": True},
725+
)
726+
current_tls_certificate.certificate_file_name = AAZStrType(
727+
serialized_name="certificateFileName",
728+
flags={"read_only": True},
729+
)
730+
current_tls_certificate.expiry_date = AAZStrType(
731+
serialized_name="expiryDate",
732+
flags={"read_only": True},
733+
)
734+
current_tls_certificate.not_before_date = AAZStrType(
735+
serialized_name="notBeforeDate",
736+
flags={"read_only": True},
737+
)
738+
current_tls_certificate.subject = AAZStrType(
739+
flags={"read_only": True},
740+
)
741+
current_tls_certificate.subject_alt_name = AAZStrType(
742+
serialized_name="subjectAltName",
743+
flags={"read_only": True},
744+
)
745+
current_tls_certificate.thumbprint = AAZStrType(
746+
flags={"read_only": True},
747+
)
748+
701749
drive_configuration = cls._schema_on_200_201.properties.additional_cache_node_properties.drive_configuration
702750
drive_configuration.Element = AAZObjectType()
703751

@@ -715,6 +763,79 @@ def _build_schema_on_200_201(cls):
715763
serialized_name="sizeInGb",
716764
)
717765

766+
issues_list = cls._schema_on_200_201.properties.additional_cache_node_properties.issues_list
767+
issues_list.Element = AAZStrType()
768+
769+
last_auto_update_info = cls._schema_on_200_201.properties.additional_cache_node_properties.last_auto_update_info
770+
last_auto_update_info.auto_update_last_applied_status = AAZIntType(
771+
serialized_name="autoUpdateLastAppliedStatus",
772+
flags={"read_only": True},
773+
)
774+
last_auto_update_info.auto_update_last_applied_status_detailed_text = AAZStrType(
775+
serialized_name="autoUpdateLastAppliedStatusDetailedText",
776+
flags={"read_only": True},
777+
)
778+
last_auto_update_info.auto_update_last_applied_status_text = AAZStrType(
779+
serialized_name="autoUpdateLastAppliedStatusText",
780+
flags={"read_only": True},
781+
)
782+
last_auto_update_info.auto_update_ring_type = AAZIntType(
783+
serialized_name="autoUpdateRingType",
784+
flags={"read_only": True},
785+
)
786+
last_auto_update_info.created_date_time_utc = AAZStrType(
787+
serialized_name="createdDateTimeUtc",
788+
flags={"read_only": True},
789+
)
790+
last_auto_update_info.image_uri_before_update = AAZStrType(
791+
serialized_name="imageUriBeforeUpdate",
792+
flags={"read_only": True},
793+
)
794+
last_auto_update_info.image_uri_targeted = AAZStrType(
795+
serialized_name="imageUriTargeted",
796+
flags={"read_only": True},
797+
)
798+
last_auto_update_info.image_uri_terminal = AAZStrType(
799+
serialized_name="imageUriTerminal",
800+
flags={"read_only": True},
801+
)
802+
last_auto_update_info.moved_to_terminal_state_date_time = AAZStrType(
803+
serialized_name="movedToTerminalStateDateTime",
804+
flags={"read_only": True},
805+
)
806+
last_auto_update_info.plan_change_log_text = AAZStrType(
807+
serialized_name="planChangeLogText",
808+
flags={"read_only": True},
809+
)
810+
last_auto_update_info.plan_id = AAZIntType(
811+
serialized_name="planId",
812+
flags={"read_only": True},
813+
)
814+
last_auto_update_info.rule_requested_day = AAZIntType(
815+
serialized_name="ruleRequestedDay",
816+
flags={"read_only": True},
817+
)
818+
last_auto_update_info.rule_requested_hour = AAZStrType(
819+
serialized_name="ruleRequestedHour",
820+
flags={"read_only": True},
821+
)
822+
last_auto_update_info.rule_requested_minute = AAZStrType(
823+
serialized_name="ruleRequestedMinute",
824+
flags={"read_only": True},
825+
)
826+
last_auto_update_info.rule_requested_week = AAZIntType(
827+
serialized_name="ruleRequestedWeek",
828+
flags={"read_only": True},
829+
)
830+
last_auto_update_info.time_to_go_live_date_time = AAZStrType(
831+
serialized_name="timeToGoLiveDateTime",
832+
flags={"read_only": True},
833+
)
834+
last_auto_update_info.updated_registry_date_time_utc = AAZStrType(
835+
serialized_name="updatedRegistryDateTimeUtc",
836+
flags={"read_only": True},
837+
)
838+
718839
proxy_url_configuration = cls._schema_on_200_201.properties.additional_cache_node_properties.proxy_url_configuration
719840
proxy_url_configuration.proxy_url = AAZStrType(
720841
serialized_name="proxyUrl",
@@ -979,13 +1100,16 @@ def _build_schema_error_detail_read(cls, _schema):
9791100
additional_info.Element = AAZObjectType()
9801101

9811102
_element = _schema_error_detail_read.additional_info.Element
982-
_element.info = AAZObjectType(
1103+
_element.info = AAZDictType(
9831104
flags={"read_only": True},
9841105
)
9851106
_element.type = AAZStrType(
9861107
flags={"read_only": True},
9871108
)
9881109

1110+
info = _schema_error_detail_read.additional_info.Element.info
1111+
info.Element = AAZAnyType()
1112+
9891113
details = _schema_error_detail_read.details
9901114
details.Element = AAZObjectType()
9911115
cls._build_schema_error_detail_read(details.Element)

src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_delete.py

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

1414
@register_command(
1515
"mcc ent node delete",
16-
is_preview=True,
1716
confirmation="Are you sure you want to perform this operation?",
1817
)
1918
class Delete(AAZCommand):
2019
"""Deletes a Microsoft Connected Cache for Enterprise cache node.
20+
21+
:example: Delete MCC Enterprise Cache Node
22+
az mcc ent node delete --mcc-resource-name [MccResourceName] --cache-node-name [MccCacheNodeName] --resource-group [MccResourceRgName]
2123
"""
2224

2325
_aaz_info = {
24-
"version": "2023-05-01-preview",
26+
"version": "2024-11-30-preview",
2527
"resources": [
26-
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2023-05-01-preview"],
28+
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2024-11-30-preview"],
2729
]
2830
}
2931

@@ -161,7 +163,7 @@ def url_parameters(self):
161163
def query_parameters(self):
162164
parameters = {
163165
**self.serialize_query_param(
164-
"api-version", "2023-05-01-preview",
166+
"api-version", "2024-11-30-preview",
165167
required=True,
166168
),
167169
}

0 commit comments

Comments
 (0)