Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ def load_command_table(self, _):
operations_tmpl='azure.mgmt.recoveryservices.operations#VaultsOperations.{}',
client_factory=vaults_cf)

backup_storage_config_sdk = CliCommandType(
operations_tmpl='azure.mgmt.recoveryservices.operations#BackupStorageConfigsOperations.{}',
client_factory=vaults_cf)
# backup_storage_config_sdk = CliCommandType(
# operations_tmpl='azure.mgmt.recoveryservices.operations#BackupStorageConfigsOperations.{}',
# client_factory=vaults_cf)

with self.command_group('backup vault', backup_vaults_sdk, client_factory=vaults_cf) as g:
g.custom_command('create', 'create_vault')
g.show_command('show', 'get')
g.custom_command('list', 'list_vaults')
g.show_command('backup-properties show', 'get', command_type=backup_storage_config_sdk)
# g.show_command('backup-properties show', 'get', command_type=backup_storage_config_sdk)
g.custom_command('backup-properties set', 'set_backup_properties', client_factory=backup_storage_configs_cf)
g.custom_command('delete', 'delete_vault', confirmation=True)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from msrest.paging import Paged
from msrestazure.tools import parse_resource_id, is_valid_resource_id

from azure.mgmt.recoveryservices.models import Vault, VaultProperties, Sku, SkuName, BackupStorageConfig
from azure.mgmt.recoveryservices.models import Vault, VaultProperties, Sku, SkuName
from azure.mgmt.recoveryservicesbackup.models import ProtectedItemResource, AzureIaaSComputeVMProtectedItem, \
AzureIaaSClassicComputeVMProtectedItem, ProtectionState, IaasVMBackupRequest, BackupRequestResource, \
IaasVMRestoreRequest, RestoreRequestResource, BackupManagementType, WorkloadType, OperationStatusValues, \
Expand Down Expand Up @@ -86,6 +86,7 @@ def list_vaults(client, resource_group_name=None):


def set_backup_properties(client, vault_name, resource_group_name, backup_storage_redundancy):
from azure.mgmt.recoveryservices.models import BackupStorageConfig
backup_storage_config = BackupStorageConfig(storage_model_type=backup_storage_redundancy)
client.update(resource_group_name, vault_name, backup_storage_config)

Expand Down
4 changes: 2 additions & 2 deletions src/command_modules/azure-cli-backup/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
]

DEPENDENCIES = [
'azure-mgmt-recoveryservices==0.1.0',
'azure-mgmt-recoveryservicesbackup==0.1.1',
'azure-mgmt-recoveryservices==0.3.0',
'azure-mgmt-recoveryservicesbackup==0.3.0',
'azure-cli-core'
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def load_command_table(self, _):

adla_format_path = 'azure.mgmt.datalake.analytics.{}.operations.{}#{}.{{}}'

dla_account_sdk = CliCommandType(
operations_tmpl=adla_format_path.format('account', 'account_operations', 'AccountOperations'),
client_factory=cf_dla_account)
# dla_account_sdk = CliCommandType(
# operations_tmpl=adla_format_path.format('account', 'account_operations', 'AccountOperations'),
# client_factory=cf_dla_account)

dla_firewall_sdk = CliCommandType(
operations_tmpl=adla_format_path.format('account', 'firewall_rules_operations', 'FirewallRulesOperations'),
Expand Down Expand Up @@ -63,12 +63,12 @@ def load_command_table(self, _):
)

# account operations
with self.command_group('dla account', dla_account_sdk, client_factory=cf_dla_account) as g:
g.custom_command('create', 'create_adla_account')
g.custom_command('update', 'update_adla_account')
g.custom_command('list', 'list_adla_account')
g.show_command('show', 'get')
g.command('delete', 'delete')
# with self.command_group('dla account', dla_account_sdk, client_factory=cf_dla_account) as g:
# g.custom_command('create', 'create_adla_account')
# g.custom_command('update', 'update_adla_account')
# g.custom_command('list', 'list_adla_account')
# g.show_command('show', 'get')
# g.command('delete', 'delete')

# account fire wall operations
with self.command_group('dla account firewall', dla_firewall_sdk, client_factory=cf_dla_account_firewall) as g:
Expand Down
2 changes: 1 addition & 1 deletion src/command_modules/azure-cli-dla/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

DEPENDENCIES = [
'azure-mgmt-datalake-store==0.5.0',
'azure-mgmt-datalake-analytics==0.2.0',
'azure-mgmt-datalake-analytics==0.6.0',
'azure-cli-core',
]

Expand Down