Skip to content

Commit

Permalink
[Databox] az databox job create: Add new parameters `--transfer-all…
Browse files Browse the repository at this point in the history
…-blobs` and `--transfer-all-files` to support setting transfer all details (#6585)
  • Loading branch information
Jing-song authored Aug 8, 2023
1 parent 6f266c3 commit cbb3ec2
Show file tree
Hide file tree
Showing 5 changed files with 4,667 additions and 4 deletions.
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.1.0
++++++
* `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

0 comments on commit cbb3ec2

Please sign in to comment.