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
5 changes: 5 additions & 0 deletions src/storage-mover/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
Release History
===============

1.2.0
+++++
* Updated to the 2025-07-01 GA API version.
* Add new endpoints for storage-nfs-file-share and multi-cloud-connector.

1.1.0
++++++
* Update to 2024-07-01 GA api version
Expand Down
52 changes: 52 additions & 0 deletions src/storage-mover/azext_storage_mover/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@
--description endpointFileShareDesc
"""

helps['storage-mover endpoint create-for-storage-nfs-file-share'] = """
type: command
short-summary: Creates an Endpoint resource for storage nfs file share.
examples:
- name: endpoint create-for-storage-nfs-file-share
text: >
az storage-mover endpoint create-for-storage-nfs-file-share -g "rg" --storage-mover-name "mover_name"
-n "endpoint_nfs_file_share" --file-share-name "file_share_name" --storage-account-id "account_id"
--description endpointNfsFileShareDesc
"""

helps['storage-mover endpoint create-for-nfs'] = """
type: command
short-summary: Creates an Endpoint resource for nfs.
Expand All @@ -53,6 +64,17 @@
--password-uri Password!23 --host "vm_ip"
"""

helps['storage-mover endpoint create-for-multi-cloud-connector'] = """
type: command
short-summary: Creates an Endpoint resource for multi cloud connector.
examples:
- name: endpoint create-for-multi-cloud-connector
text: >
az storage-mover endpoint create-for-multi-cloud-connector -g "rg" --storage-mover-name "mover_name"
-n "endpoint_multi_cloud_connector" --multi-cloud-connector-id "connector_id" --aws-s3-bucket-id "bucket_id"
--description endpointMultiCloudConnectorDesc
"""

helps['storage-mover endpoint update-for-storage-container'] = """
type: command
short-summary: Updates an Endpoint resource for storage blob container.
Expand All @@ -73,6 +95,16 @@
-n "endpoint_file_share" --description endpointFileShareDescUpdate
"""

helps['storage-mover endpoint update-for-storage-nfs-file-share'] = """
type: command
short-summary: Updates an Endpoint resource for storage nfs file share.
examples:
- name: endpoint update-for-storage-nfs-file-share
text: >
az storage-mover endpoint update-for-storage-nfs-file-share -g "rg" --storage-mover-name "mover_name"
-n "endpoint_nfs_file_share" --description endpointNfsFileShareDescUpdate
"""

helps['storage-mover endpoint update-for-nfs'] = """
type: command
short-summary: Updates an Endpoint resource for nfs.
Expand All @@ -92,3 +124,23 @@
az storage-mover endpoint update-for-smb -g "rg" --storage-mover-name "mover_name" -n "endpoint_smb"
--description endpointSmbDescUpdate
"""

helps['storage-mover endpoint update-for-multi-cloud-connector'] = """
type: command
short-summary: Updates an Endpoint resource for multi cloud connector.
examples:
- name: endpoint update-for-multi-cloud-connector
text: >
az storage-mover endpoint update-for-multi-cloud-connector -g "rg" --storage-mover-name "mover_name"
-n "endpoint_multi_cloud_connector" --description endpointMultiCloudConnectorDescUpdate
"""

helps['storage-mover endpoint identity assign'] = """
type: command
short-summary: Assigns a managed identity to an Endpoint resource.
examples:
- name: endpoint identity assign
text: >
az storage-mover endpoint identity assign -g "rg" --storage-mover-name "mover_name" -n "endpoint_nfs_file_share"
--mi-system-assigned
"""
10 changes: 10 additions & 0 deletions src/storage-mover/azext_storage_mover/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ def load_arguments(self, _): # pylint: disable=unused-argument
c.argument('storage_account_resource_id', options_list=('--storage-account-id'),
help='The Azure Resource ID of the storage account that is the target destination.')

with self.argument_context('storage-mover endpoint create-for-storage-nfs-file-share') as c:
c.argument('file_share_name', help='The name of the Azure Storage file share.')
c.argument('storage_account_resource_id', options_list=('--storage-account-id'),
help='The Azure Resource ID of the storage account that is the target destination.')

with self.argument_context('storage-mover endpoint create-for-multi-cloud-connector') as c:
c.argument('aws_s3_bucket_id', help='The ID of the AWS S3 bucket.')
c.argument('multi_cloud_connector_id', options_list=('--connector-id', '--multi-cloud-connector-id'),
help='The Azure Resource ID of the multi-cloud connector resource associated with the AWS account.')

with self.argument_context('storage-mover endpoint create-for-smb') as c:
c.argument('host', help='The host name or IP address of the server exporting the file system.')
c.argument('share_name', help='The name of the SMB share being exported from the server.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -148,7 +148,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ class Delete(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -143,7 +143,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ class List(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/providers/microsoft.storagemover/storagemovers", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/providers/microsoft.storagemover/storagemovers", "2025-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers", "2025-07-01"],
]
}

Expand All @@ -51,12 +51,12 @@ def _build_arguments_schema(cls, *args, **kwargs):

def _execute_operations(self):
self.pre_operations()
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
if condition_0:
self.StorageMoversList(ctx=self.ctx)()
if condition_1:
self.StorageMoversListBySubscription(ctx=self.ctx)()
if condition_1:
self.StorageMoversList(ctx=self.ctx)()
self.post_operations()

@register_callback
Expand All @@ -72,7 +72,7 @@ def _output(self, *args, **kwargs):
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
return result, next_link

class StorageMoversList(AAZHttpOperation):
class StorageMoversListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -86,7 +86,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers",
"/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers",
**self.url_parameters
)

Expand All @@ -101,10 +101,6 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand All @@ -116,7 +112,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -151,7 +147,6 @@ def _build_schema_on_200(cls):
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType(
flags={"read_only": True},
Expand Down Expand Up @@ -214,7 +209,7 @@ def _build_schema_on_200(cls):

return cls._schema_on_200

class StorageMoversListBySubscription(AAZHttpOperation):
class StorageMoversList(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -228,7 +223,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Microsoft.StorageMover/storageMovers",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorageMover/storageMovers",
**self.url_parameters
)

Expand All @@ -243,6 +238,10 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand All @@ -254,7 +253,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -289,7 +288,6 @@ def _build_schema_on_200(cls):
_schema_on_200 = cls._schema_on_200
_schema_on_200.next_link = AAZStrType(
serialized_name="nextLink",
flags={"read_only": True},
)
_schema_on_200.value = AAZListType(
flags={"read_only": True},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Show(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -120,7 +120,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ class Update(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -160,7 +160,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -243,7 +243,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-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/microsoft.storagemover/storagemovers/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -116,7 +116,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ class Create(AAZCommand):
"""

_aaz_info = {
"version": "2024-07-01",
"version": "2025-07-01",
"resources": [
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}/agents/{}", "2024-07-01"],
["mgmt-plane", "/subscriptions/{}/resourcegroups/{}/providers/microsoft.storagemover/storagemovers/{}/agents/{}", "2025-07-01"],
]
}

Expand Down Expand Up @@ -105,7 +105,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
required=True,
fmt=AAZIntArgFormat(
maximum=2147483647,
minimum=0,
),
)
_element.start_time = AAZObjectArg(
Expand Down Expand Up @@ -142,10 +141,10 @@ def _build_args_time_create(cls, _schema):
minimum=0,
),
)
time_create.minute = AAZIntArg(
time_create.minute = AAZFloatArg(
options=["minute"],
help="The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.",
default=0,
default=0.0,
enum={"0": 0, "30": 30},
)

Expand Down Expand Up @@ -221,7 +220,7 @@ def url_parameters(self):
def query_parameters(self):
parameters = {
**self.serialize_query_param(
"api-version", "2024-07-01",
"api-version", "2025-07-01",
required=True,
),
}
Expand Down Expand Up @@ -430,7 +429,7 @@ def _build_schema_time_create(cls, _builder):
if _builder is None:
return
_builder.set_prop("hour", AAZIntType, ".hour", typ_kwargs={"flags": {"required": True}})
_builder.set_prop("minute", AAZIntType, ".minute")
_builder.set_prop("minute", AAZFloatType, ".minute")

_schema_time_read = None

Expand All @@ -447,7 +446,7 @@ def _build_schema_time_read(cls, _schema):
time_read.hour = AAZIntType(
flags={"required": True},
)
time_read.minute = AAZIntType()
time_read.minute = AAZFloatType()

_schema.hour = cls._schema_time_read.hour
_schema.minute = cls._schema_time_read.minute
Expand Down
Loading
Loading