Example #1
0
def disable_auto_for_azure_wl(cmd, client, resource_group_name, vault_name,
                              protectable_item_name, protectable_item_type,
                              server_name, workload_type):
    protectable_items_client = backup_protectable_items_cf(cmd.cli_ctx)
    protectable_item = show_protectable_item(cmd, protectable_items_client,
                                             resource_group_name, vault_name,
                                             protectable_item_name,
                                             server_name,
                                             protectable_item_type,
                                             workload_type)
    custom_help.validate_protectable_item(protectable_item)

    return custom_wl.disable_auto_for_azure_wl(cmd, client,
                                               resource_group_name, vault_name,
                                               protectable_item)
Example #2
0
def auto_enable_for_azure_wl(cmd, client, resource_group_name, vault_name,
                             policy_name, protectable_item_name,
                             protectable_item_type, server_name,
                             workload_type):
    policy_object = show_policy(protection_policies_cf(cmd.cli_ctx),
                                resource_group_name, vault_name, policy_name)
    custom_help.validate_policy(policy_object)

    protectable_items_client = backup_protectable_items_cf(cmd.cli_ctx)
    protectable_item = show_protectable_item(cmd, protectable_items_client,
                                             resource_group_name, vault_name,
                                             protectable_item_name,
                                             server_name,
                                             protectable_item_type,
                                             workload_type)
    custom_help.validate_protectable_item(protectable_item)

    return custom_wl.auto_enable_for_azure_wl(client, resource_group_name,
                                              vault_name, policy_object,
                                              protectable_item)