Skip to content

Commit

Permalink
Migrate dataprotection backup-vault to AAZ-dev-tools and add suppor…
Browse files Browse the repository at this point in the history
…t for immutable vaults and soft delete (#5813)

* In progress: dpp backup-vault migration

* dpp backup-vault migrated with breaking change

* Added examples for dpp

* Quickfix: double az

* Moving data-protection (testing) module to dataprotection (actual)

* Fixed singular-option, added help text for --immutability-state

* lint

* fixed unicode quote issue

* DPP Softdelete, DPP Tests passing.

In order to fix failing DPP tests, I had to enable soft-delete setting
modification from the CLI extension.

* Shorter aliases for linter

* Change storag-settings options

* Updated help text for --storage-settings

* updated help text for lint issues

* Fix lint issues

* Removed all autorest generated backup vault code

* Updated history.rst and setup.py to 0.7.0

* re-recorded test

---------

Co-authored-by: Zubair Abid <[email protected]>
  • Loading branch information
zubairabid and Zubair Abid authored Feb 13, 2023
1 parent 09aa566 commit 6914765
Show file tree
Hide file tree
Showing 25 changed files with 15,106 additions and 5,613 deletions.
5 changes: 5 additions & 0 deletions src/dataprotection/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Release History
===============
0.7.0
++++++
* `az dataprotection backup-vault create`: Add support for optional `--immutability-state`, `--soft-delete-state`, `--soft-delete-retention` parameters, corresponding to new Immutable Vault and Enhanced Soft Delete features
* `az dataprotection backup-vault update`: Add support for optional `--soft-delete-state`, `--soft-delete-retention` parameters.

0.6.0
++++++
* `az dataprotection backup-instance initialize`: Add optional `--tags` parameter
Expand Down
11 changes: 11 additions & 0 deletions src/dataprotection/azext_dataprotection/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ def __init__(self, cli_ctx=None):

def load_command_table(self, args):
from azext_dataprotection.generated.commands import load_command_table
from azure.cli.core.aaz import load_aaz_command_table
try:
from . import aaz
except ImportError:
aaz = None
if aaz:
load_aaz_command_table(
loader=self,
aaz_pkg_name=aaz.__name__,
args=args
)
load_command_table(self, args)
try:
from azext_dataprotection.manual.commands import load_command_table as load_command_table_manual
Expand Down
6 changes: 6 additions & 0 deletions src/dataprotection/azext_dataprotection/aaz/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"dataprotection",
is_experimental=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage Data Protection.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"dataprotection backup-vault",
is_experimental=True,
)
class __CMDGroup(AAZCommandGroup):
"""Manage backup vault with dataprotection.
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
from ._wait import *
Loading

0 comments on commit 6914765

Please sign in to comment.