Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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/mcc/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b3 (2025-06-17)
++++++
* Refactored commands to use new GA API version for MCC.

1.0.0b1 (2024-10-16)
++++++
* Initial release.
1 change: 0 additions & 1 deletion src/mcc/azext_mcc/aaz/latest/mcc/__cmd_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mcc",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Microsoft Connected Cache CLI Commands
Expand Down
1 change: 0 additions & 1 deletion src/mcc/azext_mcc/aaz/latest/mcc/ent/__cmd_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mcc ent",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Microsoft Connected Cache for Enterprise CLI commands
Expand Down
1 change: 0 additions & 1 deletion src/mcc/azext_mcc/aaz/latest/mcc/ent/node/__cmd_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@register_command_group(
"mcc ent node",
is_preview=True,
)
class __CMDGroup(AAZCommandGroup):
"""Microsoft Connected Cache for Enterprise cache node CLI commands
Expand Down
173 changes: 147 additions & 26 deletions src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@

@register_command(
"mcc ent node create",
is_preview=True,
)
class Create(AAZCommand):
"""Creates a Microsoft Connected Cache for Enterprise cache node with specified parameters.
"""

_aaz_info = {
"version": "2023-05-01-preview",
"version": "2024-11-30-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2023-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2024-11-30-preview"],
]
}

Expand Down Expand Up @@ -67,6 +66,19 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
)

# define Arg Group "AdditionalCacheNodeProperties"

_args_schema = cls._args_schema
_args_schema.creation_method = AAZIntArg(
options=["--creation-method"],
arg_group="AdditionalCacheNodeProperties",
help="Resource creation method of mcc cache node resource, cli or portal",
fmt=AAZIntArgFormat(
maximum=5,
minimum=0,
),
)

# define Arg Group "Configuration"

_args_schema = cls._args_schema
Expand Down Expand Up @@ -94,7 +106,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
options=["--enable-proxy"],
arg_group="Configuration",
help="Cache node resource requires a proxy",
enum={"Disabled": "Disabled", "Enabled": "Enabled", "None": "None", "Required": "Required"},
enum={"None": "None", "Required": "Required"},
)
_args_schema.optional_property1 = AAZStrArg(
options=["--optional-property1"],
Expand Down Expand Up @@ -127,22 +139,11 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Host operating system of the cache node.",
enum={"Eflow": "Eflow", "Linux": "Linux", "Windows": "Windows"},
)
_args_schema.proxy_url = AAZStrArg(
options=["--proxy-url"],
arg_group="Configuration",
help="Host proxy address configuration. Ex: xxx.xxx.x.x or http://exampleproxy.com.",
)
_args_schema.proxy_host = AAZStrArg(
options=["--proxy-host"],
arg_group="Configuration",
help="Host proxy address configuration. Ex: xxx.xxx.x.x or http://exampleproxy.com.",
)
_args_schema.update_cycle_type = AAZStrArg(
options=["--update-cycle-type"],
arg_group="Configuration",
help="Update Cycle Type",
enum={"Fast": "Fast", "Preview": "Preview", "Slow": "Slow"},
)
_args_schema.update_info_details = AAZStrArg(
options=["--update-info-details"],
arg_group="Configuration",
Expand Down Expand Up @@ -226,7 +227,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Day of week (1-7) that cache node will automatically install software update",
fmt=AAZIntArgFormat(
maximum=7,
minimum=1,
minimum=0,
),
)
cache_node.auto_update_time = AAZStrArg(
Expand All @@ -241,7 +242,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Week of month (1-4) that cache node will automatically install software update",
fmt=AAZIntArgFormat(
maximum=5,
minimum=1,
minimum=0,
),
)
cache_node.auto_update_ring = AAZStrArg(
Expand Down Expand Up @@ -407,7 +408,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01-preview",
"api-version", "2024-11-30-preview",
required=True,
),
}
Expand Down Expand Up @@ -449,6 +450,7 @@ def content(self):
additional_cache_node_properties.set_prop("autoUpdateVersion", AAZStrType, ".auto_update_version")
additional_cache_node_properties.set_prop("bgpConfiguration", AAZObjectType, ".bgp_configuration")
additional_cache_node_properties.set_prop("cacheNodePropertiesDetailsIssuesList", AAZListType, ".cache_node_properties_details_issues_list")
additional_cache_node_properties.set_prop("creationMethod", AAZIntType, ".creation_method")
additional_cache_node_properties.set_prop("driveConfiguration", AAZListType, ".cache_drive")
additional_cache_node_properties.set_prop("isProxyRequired", AAZStrType, ".enable_proxy")
additional_cache_node_properties.set_prop("optionalProperty1", AAZStrType, ".optional_property1")
Expand All @@ -457,9 +459,7 @@ def content(self):
additional_cache_node_properties.set_prop("optionalProperty4", AAZStrType, ".optional_property4")
additional_cache_node_properties.set_prop("optionalProperty5", AAZStrType, ".optional_property5")
additional_cache_node_properties.set_prop("osType", AAZStrType, ".host_os")
additional_cache_node_properties.set_prop("proxyUrl", AAZStrType, ".proxy_url")
additional_cache_node_properties.set_prop("proxyUrlConfiguration", AAZObjectType)
additional_cache_node_properties.set_prop("updateCycleType", AAZStrType, ".update_cycle_type")
additional_cache_node_properties.set_prop("updateInfoDetails", AAZStrType, ".update_info_details")
additional_cache_node_properties.set_prop("updateRequestedDateTime", AAZStrType, ".update_requested_date_time")

Expand Down Expand Up @@ -642,6 +642,13 @@ def _build_schema_on_200_201(cls):
serialized_name="cacheNodeStateShortText",
flags={"read_only": True},
)
additional_cache_node_properties.creation_method = AAZIntType(
serialized_name="creationMethod",
)
additional_cache_node_properties.current_tls_certificate = AAZObjectType(
serialized_name="currentTlsCertificate",
flags={"read_only": True},
)
additional_cache_node_properties.drive_configuration = AAZListType(
serialized_name="driveConfiguration",
)
Expand All @@ -652,6 +659,18 @@ def _build_schema_on_200_201(cls):
additional_cache_node_properties.is_proxy_required = AAZStrType(
serialized_name="isProxyRequired",
)
additional_cache_node_properties.issues_count = AAZIntType(
serialized_name="issuesCount",
flags={"read_only": True},
)
additional_cache_node_properties.issues_list = AAZListType(
serialized_name="issuesList",
flags={"read_only": True},
)
additional_cache_node_properties.last_auto_update_info = AAZObjectType(
serialized_name="lastAutoUpdateInfo",
flags={"read_only": True},
)
additional_cache_node_properties.optional_property1 = AAZStrType(
serialized_name="optionalProperty1",
)
Expand All @@ -674,14 +693,12 @@ def _build_schema_on_200_201(cls):
serialized_name="productVersion",
flags={"read_only": True},
)
additional_cache_node_properties.proxy_url = AAZStrType(
serialized_name="proxyUrl",
)
additional_cache_node_properties.proxy_url_configuration = AAZObjectType(
serialized_name="proxyUrlConfiguration",
)
additional_cache_node_properties.update_cycle_type = AAZStrType(
serialized_name="updateCycleType",
additional_cache_node_properties.tls_status = AAZStrType(
serialized_name="tlsStatus",
flags={"read_only": True},
)
additional_cache_node_properties.update_info_details = AAZStrType(
serialized_name="updateInfoDetails",
Expand All @@ -698,6 +715,34 @@ def _build_schema_on_200_201(cls):
cache_node_properties_details_issues_list = cls._schema_on_200_201.properties.additional_cache_node_properties.cache_node_properties_details_issues_list
cache_node_properties_details_issues_list.Element = AAZStrType()

current_tls_certificate = cls._schema_on_200_201.properties.additional_cache_node_properties.current_tls_certificate
current_tls_certificate.action_required = AAZStrType(
serialized_name="actionRequired",
flags={"read_only": True},
)
current_tls_certificate.certificate_file_name = AAZStrType(
serialized_name="certificateFileName",
flags={"read_only": True},
)
current_tls_certificate.expiry_date = AAZStrType(
serialized_name="expiryDate",
flags={"read_only": True},
)
current_tls_certificate.not_before_date = AAZStrType(
serialized_name="notBeforeDate",
flags={"read_only": True},
)
current_tls_certificate.subject = AAZStrType(
flags={"read_only": True},
)
current_tls_certificate.subject_alt_name = AAZStrType(
serialized_name="subjectAltName",
flags={"read_only": True},
)
current_tls_certificate.thumbprint = AAZStrType(
flags={"read_only": True},
)

drive_configuration = cls._schema_on_200_201.properties.additional_cache_node_properties.drive_configuration
drive_configuration.Element = AAZObjectType()

Expand All @@ -715,6 +760,79 @@ def _build_schema_on_200_201(cls):
serialized_name="sizeInGb",
)

issues_list = cls._schema_on_200_201.properties.additional_cache_node_properties.issues_list
issues_list.Element = AAZStrType()

last_auto_update_info = cls._schema_on_200_201.properties.additional_cache_node_properties.last_auto_update_info
last_auto_update_info.auto_update_last_applied_status = AAZIntType(
serialized_name="autoUpdateLastAppliedStatus",
flags={"read_only": True},
)
last_auto_update_info.auto_update_last_applied_status_detailed_text = AAZStrType(
serialized_name="autoUpdateLastAppliedStatusDetailedText",
flags={"read_only": True},
)
last_auto_update_info.auto_update_last_applied_status_text = AAZStrType(
serialized_name="autoUpdateLastAppliedStatusText",
flags={"read_only": True},
)
last_auto_update_info.auto_update_ring_type = AAZIntType(
serialized_name="autoUpdateRingType",
flags={"read_only": True},
)
last_auto_update_info.created_date_time_utc = AAZStrType(
serialized_name="createdDateTimeUtc",
flags={"read_only": True},
)
last_auto_update_info.image_uri_before_update = AAZStrType(
serialized_name="imageUriBeforeUpdate",
flags={"read_only": True},
)
last_auto_update_info.image_uri_targeted = AAZStrType(
serialized_name="imageUriTargeted",
flags={"read_only": True},
)
last_auto_update_info.image_uri_terminal = AAZStrType(
serialized_name="imageUriTerminal",
flags={"read_only": True},
)
last_auto_update_info.moved_to_terminal_state_date_time = AAZStrType(
serialized_name="movedToTerminalStateDateTime",
flags={"read_only": True},
)
last_auto_update_info.plan_change_log_text = AAZStrType(
serialized_name="planChangeLogText",
flags={"read_only": True},
)
last_auto_update_info.plan_id = AAZIntType(
serialized_name="planId",
flags={"read_only": True},
)
last_auto_update_info.rule_requested_day = AAZIntType(
serialized_name="ruleRequestedDay",
flags={"read_only": True},
)
last_auto_update_info.rule_requested_hour = AAZStrType(
serialized_name="ruleRequestedHour",
flags={"read_only": True},
)
last_auto_update_info.rule_requested_minute = AAZStrType(
serialized_name="ruleRequestedMinute",
flags={"read_only": True},
)
last_auto_update_info.rule_requested_week = AAZIntType(
serialized_name="ruleRequestedWeek",
flags={"read_only": True},
)
last_auto_update_info.time_to_go_live_date_time = AAZStrType(
serialized_name="timeToGoLiveDateTime",
flags={"read_only": True},
)
last_auto_update_info.updated_registry_date_time_utc = AAZStrType(
serialized_name="updatedRegistryDateTimeUtc",
flags={"read_only": True},
)

proxy_url_configuration = cls._schema_on_200_201.properties.additional_cache_node_properties.proxy_url_configuration
proxy_url_configuration.proxy_url = AAZStrType(
serialized_name="proxyUrl",
Expand Down Expand Up @@ -979,13 +1097,16 @@ def _build_schema_error_detail_read(cls, _schema):
additional_info.Element = AAZObjectType()

_element = _schema_error_detail_read.additional_info.Element
_element.info = AAZObjectType(
_element.info = AAZDictType(
flags={"read_only": True},
)
_element.type = AAZStrType(
flags={"read_only": True},
)

info = _schema_error_detail_read.additional_info.Element.info
info.Element = AAZAnyType()

details = _schema_error_detail_read.details
details.Element = AAZObjectType()
cls._build_schema_error_detail_read(details.Element)
Expand Down
7 changes: 3 additions & 4 deletions src/mcc/azext_mcc/aaz/latest/mcc/ent/node/_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@

@register_command(
"mcc ent node delete",
is_preview=True,
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Deletes a Microsoft Connected Cache for Enterprise cache node.
"""

_aaz_info = {
"version": "2023-05-01-preview",
"version": "2024-11-30-preview",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2023-05-01-preview"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.connectedcache/enterprisemcccustomers/{}/enterprisemcccachenodes/{}", "2024-11-30-preview"],
]
}

Expand Down Expand Up @@ -161,7 +160,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2023-05-01-preview",
"api-version", "2024-11-30-preview",
required=True,
),
}
Expand Down
Loading
Loading