Skip to content

Commit

Permalink
azure-mgmt-trafficmanager 0.50.0 (#2038)
Browse files Browse the repository at this point in the history
* [TrafficManager] Update (#1597)

* Generated from 342d0f9

* Rebuild by #1597

* Generated from 522734738313c7d5b08453d1edc8427d89ce2810 (#2479)

Introduce Azure Traffic Manager 2018-03-01 API version with custom headers and status code ranges options.

* Generated from 0a167ffd54481f34ac2101552224462d416857f1 (#2564)

Adding 2018-02-01 Traffic Manager API version.

* Rebuild by #2038

* azure-mgmt-trafficmanager packaging

* azure-mgmt-trafficmanager 0.50.0
  • Loading branch information
lmazuel authored May 25, 2018
1 parent c298b61 commit a68d867
Show file tree
Hide file tree
Showing 53 changed files with 1,640 additions and 290 deletions.
42 changes: 42 additions & 0 deletions azure-mgmt-trafficmanager/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,48 @@
Release History
===============

0.50.0 (2018-05-25)
+++++++++++++++++++

**Features**

- Model Endpoint has a new parameter custom_headers
- Model MonitorConfig has a new parameter custom_headers
- Model MonitorConfig has a new parameter expected_status_code_ranges
- Model Profile has a new parameter traffic_view_enrollment_status
- Added operation group HeatMapOperations
- 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.40.0 (2017-07-03)
+++++++++++++++++++

Expand Down
6 changes: 3 additions & 3 deletions azure-mgmt-trafficmanager/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure Traffic Manager 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 @@ -37,8 +37,8 @@ Usage
=====

For code examples, see `Traffic Manager
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-mgmt-trafficmanager.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/traffic-manager>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,46 @@
# regenerated.
# --------------------------------------------------------------------------

from .delete_operation_result import DeleteOperationResult
from .endpoint import Endpoint
from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters
from .dns_config import DnsConfig
from .monitor_config import MonitorConfig
from .profile import Profile
from .traffic_manager_name_availability import TrafficManagerNameAvailability
from .region import Region
from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy
from .resource import Resource
from .tracked_resource import TrackedResource
from .proxy_resource import ProxyResource
try:
from .delete_operation_result_py3 import DeleteOperationResult
from .endpoint_properties_custom_headers_item_py3 import EndpointPropertiesCustomHeadersItem
from .heat_map_endpoint_py3 import HeatMapEndpoint
from .query_experience_py3 import QueryExperience
from .traffic_flow_py3 import TrafficFlow
from .heat_map_model_py3 import HeatMapModel
from .endpoint_py3 import Endpoint
from .check_traffic_manager_relative_dns_name_availability_parameters_py3 import CheckTrafficManagerRelativeDnsNameAvailabilityParameters
from .dns_config_py3 import DnsConfig
from .monitor_config_custom_headers_item_py3 import MonitorConfigCustomHeadersItem
from .monitor_config_expected_status_code_ranges_item_py3 import MonitorConfigExpectedStatusCodeRangesItem
from .monitor_config_py3 import MonitorConfig
from .profile_py3 import Profile
from .traffic_manager_name_availability_py3 import TrafficManagerNameAvailability
from .region_py3 import Region
from .traffic_manager_geographic_hierarchy_py3 import TrafficManagerGeographicHierarchy
from .resource_py3 import Resource
from .tracked_resource_py3 import TrackedResource
from .proxy_resource_py3 import ProxyResource
except (SyntaxError, ImportError):
from .delete_operation_result import DeleteOperationResult
from .endpoint_properties_custom_headers_item import EndpointPropertiesCustomHeadersItem
from .heat_map_endpoint import HeatMapEndpoint
from .query_experience import QueryExperience
from .traffic_flow import TrafficFlow
from .heat_map_model import HeatMapModel
from .endpoint import Endpoint
from .check_traffic_manager_relative_dns_name_availability_parameters import CheckTrafficManagerRelativeDnsNameAvailabilityParameters
from .dns_config import DnsConfig
from .monitor_config_custom_headers_item import MonitorConfigCustomHeadersItem
from .monitor_config_expected_status_code_ranges_item import MonitorConfigExpectedStatusCodeRangesItem
from .monitor_config import MonitorConfig
from .profile import Profile
from .traffic_manager_name_availability import TrafficManagerNameAvailability
from .region import Region
from .traffic_manager_geographic_hierarchy import TrafficManagerGeographicHierarchy
from .resource import Resource
from .tracked_resource import TrackedResource
from .proxy_resource import ProxyResource
from .profile_paged import ProfilePaged
from .traffic_manager_management_client_enums import (
EndpointStatus,
Expand All @@ -29,13 +57,21 @@
MonitorProtocol,
ProfileStatus,
TrafficRoutingMethod,
TrafficViewEnrollmentStatus,
)

__all__ = [
'DeleteOperationResult',
'EndpointPropertiesCustomHeadersItem',
'HeatMapEndpoint',
'QueryExperience',
'TrafficFlow',
'HeatMapModel',
'Endpoint',
'CheckTrafficManagerRelativeDnsNameAvailabilityParameters',
'DnsConfig',
'MonitorConfigCustomHeadersItem',
'MonitorConfigExpectedStatusCodeRangesItem',
'MonitorConfig',
'Profile',
'TrafficManagerNameAvailability',
Expand All @@ -51,4 +87,5 @@
'MonitorProtocol',
'ProfileStatus',
'TrafficRoutingMethod',
'TrafficViewEnrollmentStatus',
]
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model):
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, name=None, type=None):
self.name = name
self.type = type
def __init__(self, **kwargs):
super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 msrest.serialization import Model


class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model):
"""Parameters supplied to check Traffic Manager name operation.
:param name: The name of the resource.
:type name: str
:param type: The type of the resource.
:type type: str
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str=None, type: str=None, **kwargs) -> None:
super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__(**kwargs)
self.name = name
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ class DeleteOperationResult(Model):
'operation_result': {'key': 'boolean', 'type': 'bool'},
}

def __init__(self):
def __init__(self, **kwargs):
super(DeleteOperationResult, self).__init__(**kwargs)
self.operation_result = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 msrest.serialization import Model


class DeleteOperationResult(Model):
"""The result of the request or operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar operation_result: The result of the operation or request.
:vartype operation_result: bool
"""

_validation = {
'operation_result': {'readonly': True},
}

_attribute_map = {
'operation_result': {'key': 'boolean', 'type': 'bool'},
}

def __init__(self, **kwargs) -> None:
super(DeleteOperationResult, self).__init__(**kwargs)
self.operation_result = None
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class DnsConfig(Model):
'ttl': {'key': 'ttl', 'type': 'long'},
}

def __init__(self, relative_name=None, ttl=None):
self.relative_name = relative_name
def __init__(self, **kwargs):
super(DnsConfig, self).__init__(**kwargs)
self.relative_name = kwargs.get('relative_name', None)
self.fqdn = None
self.ttl = ttl
self.ttl = kwargs.get('ttl', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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 msrest.serialization import Model


class DnsConfig(Model):
"""Class containing DNS settings in a Traffic Manager profile.
Variables are only populated by the server, and will be ignored when
sending a request.
:param relative_name: The relative DNS name provided by this Traffic
Manager profile. This value is combined with the DNS domain name used by
Azure Traffic Manager to form the fully-qualified domain name (FQDN) of
the profile.
:type relative_name: str
:ivar fqdn: The fully-qualified domain name (FQDN) of the Traffic Manager
profile. This is formed from the concatenation of the RelativeName with
the DNS domain used by Azure Traffic Manager.
:vartype fqdn: str
:param ttl: The DNS Time-To-Live (TTL), in seconds. This informs the local
DNS resolvers and DNS clients how long to cache DNS responses provided by
this Traffic Manager profile.
:type ttl: long
"""

_validation = {
'fqdn': {'readonly': True},
}

_attribute_map = {
'relative_name': {'key': 'relativeName', 'type': 'str'},
'fqdn': {'key': 'fqdn', 'type': 'str'},
'ttl': {'key': 'ttl', 'type': 'long'},
}

def __init__(self, *, relative_name: str=None, ttl: int=None, **kwargs) -> None:
super(DnsConfig, self).__init__(**kwargs)
self.relative_name = relative_name
self.fqdn = None
self.ttl = ttl
Loading

0 comments on commit a68d867

Please sign in to comment.