Skip to content

Commit

Permalink
[TrafficManager] Update (#1597)
Browse files Browse the repository at this point in the history
* Generated from 342d0f9

* Rebuild by #1597
  • Loading branch information
AutorestCI authored and lmazuel committed Feb 22, 2018
1 parent af67c66 commit 43788d2
Show file tree
Hide file tree
Showing 27 changed files with 927 additions and 108 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
from .resource import Resource
from .tracked_resource import TrackedResource
from .proxy_resource import ProxyResource
from .heat_map_endpoint import HeatMapEndpoint
from .query_experience import QueryExperience
from .traffic_flow import TrafficFlow
from .heat_map_model import HeatMapModel
from .traffic_manager_user_metrics_key_model import TrafficManagerUserMetricsKeyModel
from .profile_paged import ProfilePaged
from .traffic_manager_management_client_enums import (
EndpointStatus,
Expand All @@ -44,6 +49,11 @@
'Resource',
'TrackedResource',
'ProxyResource',
'HeatMapEndpoint',
'QueryExperience',
'TrafficFlow',
'HeatMapModel',
'TrafficManagerUserMetricsKeyModel',
'ProfilePaged',
'EndpointStatus',
'EndpointMonitorStatus',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,6 @@ class CheckTrafficManagerRelativeDnsNameAvailabilityParameters(Model):
}

def __init__(self, name=None, type=None):
super(CheckTrafficManagerRelativeDnsNameAvailabilityParameters, self).__init__()
self.name = name
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ class DeleteOperationResult(Model):
}

def __init__(self):
super(DeleteOperationResult, self).__init__()
self.operation_result = None
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class DnsConfig(Model):
}

def __init__(self, relative_name=None, ttl=None):
super(DnsConfig, self).__init__()
self.relative_name = relative_name
self.fqdn = None
self.ttl = ttl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class Endpoint(ProxyResource):
:param endpoint_status: The status of the endpoint. If the endpoint is
Enabled, it is probed for endpoint health and is included in the traffic
routing method. Possible values include: 'Enabled', 'Disabled'
:type endpoint_status: str or :class:`EndpointStatus
<azure.mgmt.trafficmanager.models.EndpointStatus>`
:type endpoint_status: str or
~azure.mgmt.trafficmanager.models.EndpointStatus
:param weight: The weight of this endpoint when using the 'Weighted'
traffic routing method. Possible values are from 1 to 1000.
:type weight: long
Expand All @@ -53,8 +53,8 @@ class Endpoint(ProxyResource):
:param endpoint_monitor_status: The monitoring status of the endpoint.
Possible values include: 'CheckingEndpoint', 'Online', 'Degraded',
'Disabled', 'Inactive', 'Stopped'
:type endpoint_monitor_status: str or :class:`EndpointMonitorStatus
<azure.mgmt.trafficmanager.models.EndpointMonitorStatus>`
:type endpoint_monitor_status: str or
~azure.mgmt.trafficmanager.models.EndpointMonitorStatus
:param min_child_endpoints: The minimum number of endpoints that must be
available in the child profile in order for the parent profile to be
considered available. Only applicable to endpoint of type
Expand All @@ -63,7 +63,7 @@ class Endpoint(ProxyResource):
:param geo_mapping: The list of countries/regions mapped to this endpoint
when using the ‘Geographic’ traffic routing method. Please consult Traffic
Manager Geographic documentation for a full list of accepted values.
:type geo_mapping: list of str
:type geo_mapping: list[str]
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 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 HeatMapEndpoint(Model):
"""Class which is a sparse representation of a Traffic Manager endpoint.
:param resource_id: The ARM Resource ID of this Traffic Manager endpoint.
:type resource_id: str
:param endpoint_id: A number uniquely identifying this endpoint in query
experiences.
:type endpoint_id: int
"""

_attribute_map = {
'resource_id': {'key': 'resourceId', 'type': 'str'},
'endpoint_id': {'key': 'endpointId', 'type': 'int'},
}

def __init__(self, resource_id=None, endpoint_id=None):
super(HeatMapEndpoint, self).__init__()
self.resource_id = resource_id
self.endpoint_id = endpoint_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# 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 .proxy_resource import ProxyResource


class HeatMapModel(ProxyResource):
"""Class representing a Traffic Manager HeatMap.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Fully qualified resource Id for the resource. Ex -
/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{resourceName}
:vartype id: str
:ivar name: The name of the resource
:vartype name: str
:ivar type: The type of the resource. Ex-
Microsoft.Network/trafficmanagerProfiles.
:vartype type: str
:param start_time: The beginning of the time window for this HeatMap,
inclusive.
:type start_time: datetime
:param end_time: The ending of the time window for this HeatMap,
exclusive.
:type end_time: datetime
:param endpoints: The endpoints used in this HeatMap calculation.
:type endpoints: list[~azure.mgmt.trafficmanager.models.HeatMapEndpoint]
:param traffic_flows: The traffic flows produced in this HeatMap
calculation.
:type traffic_flows: list[~azure.mgmt.trafficmanager.models.TrafficFlow]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'},
'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'},
'endpoints': {'key': 'properties.endpoints', 'type': '[HeatMapEndpoint]'},
'traffic_flows': {'key': 'properties.trafficFlows', 'type': '[TrafficFlow]'},
}

def __init__(self, start_time=None, end_time=None, endpoints=None, traffic_flows=None):
super(HeatMapModel, self).__init__()
self.start_time = start_time
self.end_time = end_time
self.endpoints = endpoints
self.traffic_flows = traffic_flows
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ class MonitorConfig(Model):
:param profile_monitor_status: The profile-level monitoring status of the
Traffic Manager profile. Possible values include: 'CheckingEndpoints',
'Online', 'Degraded', 'Disabled', 'Inactive'
:type profile_monitor_status: str or :class:`ProfileMonitorStatus
<azure.mgmt.trafficmanager.models.ProfileMonitorStatus>`
:type profile_monitor_status: str or
~azure.mgmt.trafficmanager.models.ProfileMonitorStatus
:param protocol: The protocol (HTTP, HTTPS or TCP) used to probe for
endpoint health. Possible values include: 'HTTP', 'HTTPS', 'TCP'
:type protocol: str or :class:`MonitorProtocol
<azure.mgmt.trafficmanager.models.MonitorProtocol>`
:type protocol: str or ~azure.mgmt.trafficmanager.models.MonitorProtocol
:param port: The TCP port used to probe for endpoint health.
:type port: long
:param path: The path relative to the endpoint domain name used to probe
Expand Down Expand Up @@ -54,6 +53,7 @@ class MonitorConfig(Model):
}

def __init__(self, profile_monitor_status=None, protocol=None, port=None, path=None, interval_in_seconds=None, timeout_in_seconds=None, tolerated_number_of_failures=None):
super(MonitorConfig, self).__init__()
self.profile_monitor_status = profile_monitor_status
self.protocol = protocol
self.port = port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,25 @@ class Profile(TrackedResource):
Microsoft.Network/trafficmanagerProfiles.
:vartype type: str
:param tags: Resource tags.
:type tags: dict
:type tags: dict[str, str]
:param location: The Azure Region where the resource lives
:type location: str
:param profile_status: The status of the Traffic Manager profile. Possible
values include: 'Enabled', 'Disabled'
:type profile_status: str or :class:`ProfileStatus
<azure.mgmt.trafficmanager.models.ProfileStatus>`
:type profile_status: str or
~azure.mgmt.trafficmanager.models.ProfileStatus
:param traffic_routing_method: The traffic routing method of the Traffic
Manager profile. Possible values include: 'Performance', 'Priority',
'Weighted', 'Geographic'
:type traffic_routing_method: str or :class:`TrafficRoutingMethod
<azure.mgmt.trafficmanager.models.TrafficRoutingMethod>`
:type traffic_routing_method: str or
~azure.mgmt.trafficmanager.models.TrafficRoutingMethod
:param dns_config: The DNS settings of the Traffic Manager profile.
:type dns_config: :class:`DnsConfig
<azure.mgmt.trafficmanager.models.DnsConfig>`
:type dns_config: ~azure.mgmt.trafficmanager.models.DnsConfig
:param monitor_config: The endpoint monitoring settings of the Traffic
Manager profile.
:type monitor_config: :class:`MonitorConfig
<azure.mgmt.trafficmanager.models.MonitorConfig>`
:type monitor_config: ~azure.mgmt.trafficmanager.models.MonitorConfig
:param endpoints: The list of endpoints in the Traffic Manager profile.
:type endpoints: list of :class:`Endpoint
<azure.mgmt.trafficmanager.models.Endpoint>`
:type endpoints: list[~azure.mgmt.trafficmanager.models.Endpoint]
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class ProfilePaged(Paged):
"""
A paging container for iterating over a list of Profile object
A paging container for iterating over a list of :class:`Profile <azure.mgmt.trafficmanager.models.Profile>` object
"""

_attribute_map = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 QueryExperience(Model):
"""Class representing a Traffic Manager HeatMap query experience properties.
:param endpoint_id: The id of the endpoint from the 'endpoints' array
which these queries were routed to.
:type endpoint_id: int
:param query_count: The number of queries originating from this location.
:type query_count: int
:param latency: The latency experienced by queries originating from this
location.
:type latency: float
"""

_validation = {
'endpoint_id': {'required': True},
'query_count': {'required': True},
}

_attribute_map = {
'endpoint_id': {'key': 'endpointId', 'type': 'int'},
'query_count': {'key': 'queryCount', 'type': 'int'},
'latency': {'key': 'latency', 'type': 'float'},
}

def __init__(self, endpoint_id, query_count, latency=None):
super(QueryExperience, self).__init__()
self.endpoint_id = endpoint_id
self.query_count = query_count
self.latency = latency
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ class Region(Model):
:type name: str
:param regions: The list of Regions grouped under this Region in the
Geographic Hierarchy.
:type regions: list of :class:`Region
<azure.mgmt.trafficmanager.models.Region>`
:type regions: list[~azure.mgmt.trafficmanager.models.Region]
"""

_attribute_map = {
Expand All @@ -33,6 +32,7 @@ class Region(Model):
}

def __init__(self, code=None, name=None, regions=None):
super(Region, self).__init__()
self.code = code
self.name = name
self.regions = regions
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Resource(Model):
}

def __init__(self):
super(Resource, self).__init__()
self.id = None
self.name = None
self.type = None
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class TrackedResource(Resource):
Microsoft.Network/trafficmanagerProfiles.
:vartype type: str
:param tags: Resource tags.
:type tags: dict
:type tags: dict[str, str]
:param location: The Azure Region where the resource lives
:type location: str
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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 TrafficFlow(Model):
"""Class representing a Traffic Manager HeatMap traffic flow properties.
:param source_ip: The IP address that this query experience originated
from.
:type source_ip: str
:param latitude: The approximate latitude that these queries originated
from.
:type latitude: float
:param longitude: The approximate longitude that these queries originated
from.
:type longitude: float
:param query_experiences: The query experiences produced in this HeatMap
calculation.
:type query_experiences:
list[~azure.mgmt.trafficmanager.models.QueryExperience]
"""

_attribute_map = {
'source_ip': {'key': 'sourceIp', 'type': 'str'},
'latitude': {'key': 'latitude', 'type': 'float'},
'longitude': {'key': 'longitude', 'type': 'float'},
'query_experiences': {'key': 'queryExperiences', 'type': '[QueryExperience]'},
}

def __init__(self, source_ip=None, latitude=None, longitude=None, query_experiences=None):
super(TrafficFlow, self).__init__()
self.source_ip = source_ip
self.latitude = latitude
self.longitude = longitude
self.query_experiences = query_experiences
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class TrafficManagerGeographicHierarchy(ProxyResource):
:vartype type: str
:param geographic_hierarchy: The region at the root of the hierarchy from
all the regions in the hierarchy can be retrieved.
:type geographic_hierarchy: :class:`Region
<azure.mgmt.trafficmanager.models.Region>`
:type geographic_hierarchy: ~azure.mgmt.trafficmanager.models.Region
"""

_validation = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class TrafficManagerNameAvailability(Model):
}

def __init__(self, name=None, type=None, name_available=None, reason=None, message=None):
super(TrafficManagerNameAvailability, self).__init__()
self.name = name
self.type = type
self.name_available = name_available
Expand Down
Loading

0 comments on commit 43788d2

Please sign in to comment.