Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Databox] az databox job create: Add new parameters --transfer-all-blobs and --transfer-all-files to support setting transfer all details #6585

Merged
merged 3 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/databox/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.1
kairu-ms marked this conversation as resolved.
Show resolved Hide resolved
++++++
* `az databox job create`: Add new parameters `--transfer-all-blobs` and `--transfer-all-files` to support setting transfer all details

1.0.0
++++++
* `az databox job create`: Add new parameter `--transfer-type` `--transfer-configuration-type` `--transfer-filter-details` `--data-box-customer-disk` to support managing import or export` jobs
Expand Down
16 changes: 13 additions & 3 deletions src/databox/azext_databox/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class JobCreate(_JobCreate):
@classmethod
def _build_arguments_schema(cls, *args, **kwargs):
from azure.cli.core.aaz import AAZResourceIdArg, AAZResourceIdArgFormat, AAZListArg, AAZStrArg, AAZArgEnum, AAZFreeFormDictArg, AAZFreeFormDictArgFormat
from azure.cli.core.aaz import AAZResourceIdArg, AAZResourceIdArgFormat, AAZListArg, AAZStrArg, AAZArgEnum, AAZFreeFormDictArg, AAZFreeFormDictArgFormat, AAZBoolArg
args_schema = super()._build_arguments_schema(*args, **kwargs)
args_schema.storage_accounts = AAZListArg(
options=["--storage-account"],
Expand Down Expand Up @@ -51,6 +51,16 @@ def _build_arguments_schema(cls, *args, **kwargs):
help="Path to the map of filter type and the details to filter.",
fmt=AAZFreeFormDictArgFormat()
)
args_schema.transfer_all_blobs = AAZBoolArg(
options=["--transfer-all-blobs"],
help="To indicate if all Azure blobs have to be transferred",
default=False
)
args_schema.transfer_all_files = AAZBoolArg(
options=["--transfer-all-files"],
help="To indicate if all Azure files have to be transferred",
default=False
)
args_schema.data_box._registered = False
args_schema.data_box_disk._registered = False
args_schema.data_box_heavy._registered = False
Expand Down Expand Up @@ -108,8 +118,8 @@ def pre_operations(self):
'transfer_all_details': {
'include': {
'data_account_type': data_account_type,
'transfer_all_blobs': True,
'transfer_all_files': True
'transfer_all_blobs': args.transfer_all_blobs,
'transfer_all_files': args.transfer_all_files
}
}
}
Expand Down
Loading