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

[AutoPR] recoveryservicesbackup/resource-manager #2033

Merged
merged 4 commits into from
May 25, 2018
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 36 additions & 0 deletions azure-mgmt-recoveryservicesbackup/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,42 @@
Release History
===============

0.2.0 (2018-05-25)
++++++++++++++++++

**Features**

- Client class can be used as a context manager to keep the underlying HTTP session open for performance

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

**Bugfixes**

- Compatibility of the sdist with wheel 0.31.0

0.1.1 (2017-08-09)
++++++++++++++++++

Expand Down
10 changes: 5 additions & 5 deletions azure-mgmt-recoveryservicesbackup/README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Microsoft Azure SDK for Python
==============================

This is the Microsoft Azure Recovery Services Backup Client Library.
This is the Microsoft Azure Recovery Services Backup Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -36,9 +36,9 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
Usage
=====

For code examples, see `Recovery Services Backup
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-recoveryservicesbackup.html>`__
on readthedocs.org.
For code examples, see `Recovery Services Backup Management
<https://docs.microsoft.com/python/api/overview/azure/recovery-services-backup>`__
on docs.microsoft.com.


Provide Feedback
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,23 @@
class AzureBackupServerContainer(ProtectionContainer):
"""AzureBackupServer (DPMVenus) workload-specific protection container.

Variables are only populated by the server, and will be ignored when
sending a request.
All required parameters must be populated in order to send to Azure.

:param friendly_name: Friendly name of the container.
:type friendly_name: str
:param backup_management_type: Type of backup managemenent for the
container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB',
'DPM', 'AzureBackupServer', 'AzureSql'
:type backup_management_type: str or :class:`BackupManagementType
<azure.mgmt.recoveryservicesbackup.models.BackupManagementType>`
'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload',
'DefaultBackup'
:type backup_management_type: str or
~azure.mgmt.recoveryservicesbackup.models.BackupManagementType
:param registration_status: Status of registration of the container with
the Recovery Services Vault.
:type registration_status: str
:param health_status: Status of health of the container.
:type health_status: str
:ivar container_type: Type of the container. The value of this property
for: 1. Compute Azure VM is Microsoft.Compute/virtualMachines 2. Classic
Compute Azure VM is Microsoft.ClassicCompute/virtualMachines 3. Windows
machines (like MAB, DPM etc) is Windows 4. Azure SQL instance is
AzureSqlContainer. Possible values include: 'Invalid', 'Unknown',
'IaasVMContainer', 'IaasVMServiceContainer', 'DPMContainer',
'AzureBackupServerContainer', 'MABContainer', 'Cluster',
'AzureSqlContainer', 'Windows', 'VCenter'
:vartype container_type: str or :class:`ContainerType
<azure.mgmt.recoveryservicesbackup.models.ContainerType>`
:param protectable_object_type: Polymorphic Discriminator
:type protectable_object_type: str
:param container_type: Required. Constant filled by server.
:type container_type: str
:param can_re_register: Specifies whether the container is re-registrable.
:type can_re_register: bool
:param container_id: ID of container.
Expand All @@ -51,19 +41,18 @@ class AzureBackupServerContainer(ProtectionContainer):
:param dpm_agent_version: Backup engine Agent version
:type dpm_agent_version: str
:param dpm_servers: List of BackupEngines protecting the container
:type dpm_servers: list of str
:type dpm_servers: list[str]
:param upgrade_available: To check if upgrade available
:type upgrade_available: bool
:param protection_status: Protection status of the container.
:type protection_status: str
:param extended_info: Extended Info of the container.
:type extended_info: :class:`DPMContainerExtendedInfo
<azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo>`
:type extended_info:
~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo
"""

_validation = {
'container_type': {'readonly': True},
'protectable_object_type': {'required': True},
'container_type': {'required': True},
}

_attribute_map = {
Expand All @@ -72,25 +61,24 @@ class AzureBackupServerContainer(ProtectionContainer):
'registration_status': {'key': 'registrationStatus', 'type': 'str'},
'health_status': {'key': 'healthStatus', 'type': 'str'},
'container_type': {'key': 'containerType', 'type': 'str'},
'protectable_object_type': {'key': 'protectableObjectType', 'type': 'str'},
'can_re_register': {'key': 'canReRegister', 'type': 'bool'},
'container_id': {'key': 'containerId', 'type': 'str'},
'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'},
'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'},
'dpm_servers': {'key': 'DPMServers', 'type': '[str]'},
'upgrade_available': {'key': 'UpgradeAvailable', 'type': 'bool'},
'dpm_servers': {'key': 'dpmServers', 'type': '[str]'},
'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'},
'protection_status': {'key': 'protectionStatus', 'type': 'str'},
'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'},
}

def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, health_status=None, can_re_register=None, container_id=None, protected_item_count=None, dpm_agent_version=None, dpm_servers=None, upgrade_available=None, protection_status=None, extended_info=None):
super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status)
self.can_re_register = can_re_register
self.container_id = container_id
self.protected_item_count = protected_item_count
self.dpm_agent_version = dpm_agent_version
self.dpm_servers = dpm_servers
self.upgrade_available = upgrade_available
self.protection_status = protection_status
self.extended_info = extended_info
self.protectable_object_type = 'AzureBackupServerContainer'
def __init__(self, **kwargs):
super(AzureBackupServerContainer, self).__init__(**kwargs)
self.can_re_register = kwargs.get('can_re_register', None)
self.container_id = kwargs.get('container_id', None)
self.protected_item_count = kwargs.get('protected_item_count', None)
self.dpm_agent_version = kwargs.get('dpm_agent_version', None)
self.dpm_servers = kwargs.get('dpm_servers', None)
self.upgrade_available = kwargs.get('upgrade_available', None)
self.protection_status = kwargs.get('protection_status', None)
self.extended_info = kwargs.get('extended_info', None)
self.container_type = 'AzureBackupServerContainer'
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# coding=utf-8
# --------------------------------------------------------------------------
# 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 Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .protection_container_py3 import ProtectionContainer


class AzureBackupServerContainer(ProtectionContainer):
"""AzureBackupServer (DPMVenus) workload-specific protection container.

All required parameters must be populated in order to send to Azure.

:param friendly_name: Friendly name of the container.
:type friendly_name: str
:param backup_management_type: Type of backup managemenent for the
container. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB',
'DPM', 'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload',
'DefaultBackup'
:type backup_management_type: str or
~azure.mgmt.recoveryservicesbackup.models.BackupManagementType
:param registration_status: Status of registration of the container with
the Recovery Services Vault.
:type registration_status: str
:param health_status: Status of health of the container.
:type health_status: str
:param container_type: Required. Constant filled by server.
:type container_type: str
:param can_re_register: Specifies whether the container is re-registrable.
:type can_re_register: bool
:param container_id: ID of container.
:type container_id: str
:param protected_item_count: Number of protected items in the BackupEngine
:type protected_item_count: long
:param dpm_agent_version: Backup engine Agent version
:type dpm_agent_version: str
:param dpm_servers: List of BackupEngines protecting the container
:type dpm_servers: list[str]
:param upgrade_available: To check if upgrade available
:type upgrade_available: bool
:param protection_status: Protection status of the container.
:type protection_status: str
:param extended_info: Extended Info of the container.
:type extended_info:
~azure.mgmt.recoveryservicesbackup.models.DPMContainerExtendedInfo
"""

_validation = {
'container_type': {'required': True},
}

_attribute_map = {
'friendly_name': {'key': 'friendlyName', 'type': 'str'},
'backup_management_type': {'key': 'backupManagementType', 'type': 'str'},
'registration_status': {'key': 'registrationStatus', 'type': 'str'},
'health_status': {'key': 'healthStatus', 'type': 'str'},
'container_type': {'key': 'containerType', 'type': 'str'},
'can_re_register': {'key': 'canReRegister', 'type': 'bool'},
'container_id': {'key': 'containerId', 'type': 'str'},
'protected_item_count': {'key': 'protectedItemCount', 'type': 'long'},
'dpm_agent_version': {'key': 'dpmAgentVersion', 'type': 'str'},
'dpm_servers': {'key': 'dpmServers', 'type': '[str]'},
'upgrade_available': {'key': 'upgradeAvailable', 'type': 'bool'},
'protection_status': {'key': 'protectionStatus', 'type': 'str'},
'extended_info': {'key': 'extendedInfo', 'type': 'DPMContainerExtendedInfo'},
}

def __init__(self, *, friendly_name: str=None, backup_management_type=None, registration_status: str=None, health_status: str=None, can_re_register: bool=None, container_id: str=None, protected_item_count: int=None, dpm_agent_version: str=None, dpm_servers=None, upgrade_available: bool=None, protection_status: str=None, extended_info=None, **kwargs) -> None:
super(AzureBackupServerContainer, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, health_status=health_status, **kwargs)
self.can_re_register = can_re_register
self.container_id = container_id
self.protected_item_count = protected_item_count
self.dpm_agent_version = dpm_agent_version
self.dpm_servers = dpm_servers
self.upgrade_available = upgrade_available
self.protection_status = protection_status
self.extended_info = extended_info
self.container_type = 'AzureBackupServerContainer'
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,16 @@
class AzureBackupServerEngine(BackupEngineBase):
"""Backup engine type when Azure Backup Server is used to manage the backups.

All required parameters must be populated in order to send to Azure.

:param friendly_name: Friendly name of the backup engine.
:type friendly_name: str
:param backup_management_type: Type of backup management for the backup
engine. Possible values include: 'Invalid', 'AzureIaasVM', 'MAB', 'DPM',
'AzureBackupServer', 'AzureSql'
:type backup_management_type: str or :class:`BackupManagementType
<azure.mgmt.recoveryservicesbackup.models.BackupManagementType>`
'AzureBackupServer', 'AzureSql', 'AzureStorage', 'AzureWorkload',
'DefaultBackup'
:type backup_management_type: str or
~azure.mgmt.recoveryservicesbackup.models.BackupManagementType
:param registration_status: Registration status of the backup engine with
the Recovery Services Vault.
:type registration_status: str
Expand All @@ -46,16 +49,32 @@ class AzureBackupServerEngine(BackupEngineBase):
available
:type is_dpm_upgrade_available: bool
:param extended_info: Extended info of the backupengine
:type extended_info: :class:`BackupEngineExtendedInfo
<azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo>`
:param backup_engine_type: Polymorphic Discriminator
:type extended_info:
~azure.mgmt.recoveryservicesbackup.models.BackupEngineExtendedInfo
:param backup_engine_type: Required. Constant filled by server.
:type backup_engine_type: str
"""

_validation = {
'backup_engine_type': {'required': True},
}

def __init__(self, friendly_name=None, backup_management_type=None, registration_status=None, backup_engine_state=None, health_status=None, can_re_register=None, backup_engine_id=None, dpm_version=None, azure_backup_agent_version=None, is_azure_backup_agent_upgrade_available=None, is_dpm_upgrade_available=None, extended_info=None):
super(AzureBackupServerEngine, self).__init__(friendly_name=friendly_name, backup_management_type=backup_management_type, registration_status=registration_status, backup_engine_state=backup_engine_state, health_status=health_status, can_re_register=can_re_register, backup_engine_id=backup_engine_id, dpm_version=dpm_version, azure_backup_agent_version=azure_backup_agent_version, is_azure_backup_agent_upgrade_available=is_azure_backup_agent_upgrade_available, is_dpm_upgrade_available=is_dpm_upgrade_available, extended_info=extended_info)
_attribute_map = {
'friendly_name': {'key': 'friendlyName', 'type': 'str'},
'backup_management_type': {'key': 'backupManagementType', 'type': 'str'},
'registration_status': {'key': 'registrationStatus', 'type': 'str'},
'backup_engine_state': {'key': 'backupEngineState', 'type': 'str'},
'health_status': {'key': 'healthStatus', 'type': 'str'},
'can_re_register': {'key': 'canReRegister', 'type': 'bool'},
'backup_engine_id': {'key': 'backupEngineId', 'type': 'str'},
'dpm_version': {'key': 'dpmVersion', 'type': 'str'},
'azure_backup_agent_version': {'key': 'azureBackupAgentVersion', 'type': 'str'},
'is_azure_backup_agent_upgrade_available': {'key': 'isAzureBackupAgentUpgradeAvailable', 'type': 'bool'},
'is_dpm_upgrade_available': {'key': 'isDpmUpgradeAvailable', 'type': 'bool'},
'extended_info': {'key': 'extendedInfo', 'type': 'BackupEngineExtendedInfo'},
'backup_engine_type': {'key': 'backupEngineType', 'type': 'str'},
}

def __init__(self, **kwargs):
super(AzureBackupServerEngine, self).__init__(**kwargs)
self.backup_engine_type = 'AzureBackupServerEngine'
Loading