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
282 changes: 196 additions & 86 deletions azure-mgmt-network/azure/mgmt/network/models/__init__.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class ApplicationGatewayBackendHttpSettings(SubResource):
:param provisioning_state: Provisioning state of the backend http settings
resource. Possible values are: 'Updating', 'Deleting', and 'Failed'.
:type provisioning_state: str
:param connection_draining: Connection draining of the backend http
settings resource.
:type connection_draining: :class:`ApplicationGatewayConnectionDraining
<azure.mgmt.network.models.ApplicationGatewayConnectionDraining>`
:param name: Name of the resource that is unique within a resource group.
This name can be used to access the resource.
:type name: str
Expand All @@ -58,11 +62,12 @@ class ApplicationGatewayBackendHttpSettings(SubResource):
'probe': {'key': 'properties.probe', 'type': 'SubResource'},
'authentication_certificates': {'key': 'properties.authenticationCertificates', 'type': '[SubResource]'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'connection_draining': {'key': 'properties.connectionDraining', 'type': 'ApplicationGatewayConnectionDraining'},
'name': {'key': 'name', 'type': 'str'},
'etag': {'key': 'etag', 'type': 'str'},
}

def __init__(self, id=None, port=None, protocol=None, cookie_based_affinity=None, request_timeout=None, probe=None, authentication_certificates=None, provisioning_state=None, name=None, etag=None):
def __init__(self, id=None, port=None, protocol=None, cookie_based_affinity=None, request_timeout=None, probe=None, authentication_certificates=None, provisioning_state=None, connection_draining=None, name=None, etag=None):
super(ApplicationGatewayBackendHttpSettings, self).__init__(id=id)
self.port = port
self.protocol = protocol
Expand All @@ -71,5 +76,6 @@ def __init__(self, id=None, port=None, protocol=None, cookie_based_affinity=None
self.probe = probe
self.authentication_certificates = authentication_certificates
self.provisioning_state = provisioning_state
self.connection_draining = connection_draining
self.name = name
self.etag = etag
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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 ApplicationGatewayConnectionDraining(Model):
"""Connection draining allows open connections to a backend server to be
active for a specified time after the backend server got removed from the
configuration.

:param enabled: Whether connection draining is enabled or not.
:type enabled: bool
:param drain_timeout_in_sec: The number of seconds connection draining is
active. Acceptable values are from 1 second to 3600 seconds.
:type drain_timeout_in_sec: int
"""

_validation = {
'enabled': {'required': True},
'drain_timeout_in_sec': {'required': True, 'maximum': 3600, 'minimum': 1},
}

_attribute_map = {
'enabled': {'key': 'enabled', 'type': 'bool'},
'drain_timeout_in_sec': {'key': 'drainTimeoutInSec', 'type': 'int'},
}

def __init__(self, enabled, drain_timeout_in_sec):
self.enabled = enabled
self.drain_timeout_in_sec = drain_timeout_in_sec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ApplicationGatewaySslPolicy(Model):
"""

_attribute_map = {
'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[ApplicationGatewaySslProtocol]'},
'disabled_ssl_protocols': {'key': 'disabledSslProtocols', 'type': '[str]'},
}

def __init__(self, disabled_ssl_protocols=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class ApplicationGatewayWebApplicationFirewallConfiguration(Model):
"""Application gateway web application firewall configuration.

:param enabled: Whether the web application firewall is enabled.
:param enabled: Whether the web application firewall is enabled or not.
:type enabled: bool
:param firewall_mode: Web application firewall mode. Possible values are:
'Detection' and 'Prevention'. Possible values include: 'Detection',
Expand Down
42 changes: 42 additions & 0 deletions azure-mgmt-network/azure/mgmt/network/models/bgp_community.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 BGPCommunity(Model):
"""Contains bgp community information offered in Service Community resources.

:param region: The region which the service support. e.g. For O365, region
is Global.
:type region: str
:param community_name: The name of the bgp community. e.g. Skype.
:type community_name: str
:param community_value: The value of the bgp community. For more
information:
https://docs.microsoft.com/en-us/azure/expressroute/expressroute-routing.
:type community_value: str
:param community_prefixes: The prefixes that the bgp community contains.
:type community_prefixes: list of str
"""

_attribute_map = {
'region': {'key': 'region', 'type': 'str'},
'community_name': {'key': 'communityName', 'type': 'str'},
'community_value': {'key': 'communityValue', 'type': 'str'},
'community_prefixes': {'key': 'communityPrefixes', 'type': '[str]'},
}

def __init__(self, region=None, community_name=None, community_value=None, community_prefixes=None):
self.region = region
self.community_name = community_name
self.community_value = community_value
self.community_prefixes = community_prefixes
71 changes: 71 additions & 0 deletions azure-mgmt-network/azure/mgmt/network/models/bgp_peer_status.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 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 BgpPeerStatus(Model):
"""BgpPeerStatus.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar local_address: The virtual network gateway's local address
:vartype local_address: str
:ivar neighbor: The remote BGP peer
:vartype neighbor: str
:ivar asn: The autonomous system number of the remote BGP peer
:vartype asn: int
:ivar state: The BGP peer state. Possible values include: 'Unknown',
'Stopped', 'Idle', 'Connecting', 'Connected'
:vartype state: str or :class:`BgpPeerState
<azure.mgmt.network.models.BgpPeerState>`
:ivar connected_duration: For how long the peering has been up
:vartype connected_duration: str
:ivar routes_received: The number of routes learned from this peer
:vartype routes_received: long
:ivar messages_sent: The number of BGP messages sent
:vartype messages_sent: long
:ivar messages_received: The number of BGP messages received
:vartype messages_received: int
"""

_validation = {
'local_address': {'readonly': True},
'neighbor': {'readonly': True},
'asn': {'readonly': True},
'state': {'readonly': True},
'connected_duration': {'readonly': True},
'routes_received': {'readonly': True},
'messages_sent': {'readonly': True},
'messages_received': {'readonly': True},
}

_attribute_map = {
'local_address': {'key': 'localAddress', 'type': 'str'},
'neighbor': {'key': 'neighbor', 'type': 'str'},
'asn': {'key': 'asn', 'type': 'int'},
'state': {'key': 'state', 'type': 'str'},
'connected_duration': {'key': 'connectedDuration', 'type': 'str'},
'routes_received': {'key': 'routesReceived', 'type': 'long'},
'messages_sent': {'key': 'messagesSent', 'type': 'long'},
'messages_received': {'key': 'messagesReceived', 'type': 'int'},
}

def __init__(self):
self.local_address = None
self.neighbor = None
self.asn = None
self.state = None
self.connected_duration = None
self.routes_received = None
self.messages_sent = None
self.messages_received = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 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 BgpPeerStatusListResult(Model):
"""Response for list BGP peer status API service call.

:param value: List of BGP peers
:type value: list of :class:`BgpPeerStatus
<azure.mgmt.network.models.BgpPeerStatus>`
"""

_attribute_map = {
'value': {'key': 'value', 'type': '[BgpPeerStatus]'},
}

def __init__(self, value=None):
self.value = value
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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 .resource import Resource


class BgpServiceCommunity(Resource):
"""Service Community Properties.

Variables are only populated by the server, and will be ignored when
sending a request.

:param id: Resource ID.
:type id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param location: Resource location.
:type location: str
:param tags: Resource tags.
:type tags: dict
:param communities: Get a list of bgp communities.
:type communities: list of :class:`BGPCommunity
<azure.mgmt.network.models.BGPCommunity>`
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'communities': {'key': 'properties.communities', 'type': '[BGPCommunity]'},
}

def __init__(self, id=None, location=None, tags=None, communities=None):
super(BgpServiceCommunity, self).__init__(id=id, location=location, tags=tags)
self.communities = communities
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class BgpServiceCommunityPaged(Paged):
"""
A paging container for iterating over a list of BgpServiceCommunity object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[BgpServiceCommunity]'}
}

def __init__(self, *args, **kwargs):

super(BgpServiceCommunityPaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,15 @@ class ExpressRouteCircuit(Resource):
:type provisioning_state: str
:param gateway_manager_etag: The GatewayManager Etag.
:type gateway_manager_etag: str
:param etag: Gets a unique read-only string that changes whenever the
:ivar etag: Gets a unique read-only string that changes whenever the
resource is updated.
:type etag: str
:vartype etag: str
"""

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

_attribute_map = {
Expand All @@ -93,7 +94,7 @@ class ExpressRouteCircuit(Resource):
'etag': {'key': 'etag', 'type': 'str'},
}

def __init__(self, id=None, location=None, tags=None, sku=None, allow_classic_operations=None, circuit_provisioning_state=None, service_provider_provisioning_state=None, authorizations=None, peerings=None, service_key=None, service_provider_notes=None, service_provider_properties=None, provisioning_state=None, gateway_manager_etag=None, etag=None):
def __init__(self, id=None, location=None, tags=None, sku=None, allow_classic_operations=None, circuit_provisioning_state=None, service_provider_provisioning_state=None, authorizations=None, peerings=None, service_key=None, service_provider_notes=None, service_provider_properties=None, provisioning_state=None, gateway_manager_etag=None):
super(ExpressRouteCircuit, self).__init__(id=id, location=location, tags=tags)
self.sku = sku
self.allow_classic_operations = allow_classic_operations
Expand All @@ -106,4 +107,4 @@ def __init__(self, id=None, location=None, tags=None, sku=None, allow_classic_op
self.service_provider_properties = service_provider_properties
self.provisioning_state = provisioning_state
self.gateway_manager_etag = gateway_manager_etag
self.etag = etag
self.etag = None
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
class ExpressRouteCircuitAuthorization(SubResource):
"""Authorization in an ExpressRouteCircuit resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:param id: Resource ID.
:type id: str
:param authorization_key: The authorization key.
Expand All @@ -30,11 +33,15 @@ class ExpressRouteCircuitAuthorization(SubResource):
:param name: Gets name of the resource that is unique within a resource
group. This name can be used to access the resource.
:type name: str
:param etag: A unique read-only string that changes whenever the resource
:ivar etag: A unique read-only string that changes whenever the resource
is updated.
:type etag: str
:vartype etag: str
"""

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

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'authorization_key': {'key': 'properties.authorizationKey', 'type': 'str'},
Expand All @@ -44,10 +51,10 @@ class ExpressRouteCircuitAuthorization(SubResource):
'etag': {'key': 'etag', 'type': 'str'},
}

def __init__(self, id=None, authorization_key=None, authorization_use_status=None, provisioning_state=None, name=None, etag=None):
def __init__(self, id=None, authorization_key=None, authorization_use_status=None, provisioning_state=None, name=None):
super(ExpressRouteCircuitAuthorization, self).__init__(id=id)
self.authorization_key = authorization_key
self.authorization_use_status = authorization_use_status
self.provisioning_state = provisioning_state
self.name = name
self.etag = etag
self.etag = None
Loading