Skip to content
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions azure-mgmt-network/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

Release History
===============

1.5.0rc1 (2017-09-18)
+++++++++++++++++++++

**Features**

- Add ApiVersion 2017-09-01 (new default)
- Add application_security_groups (ASG) operations group
- Add ASG to network_interface operations
- Add ASG to IP operations
- Add source/destination ASGs to network security rules
- Add DDOS protection and VM protection to vnet operations

**Bug fix**

- check_dns_name_availability now correctly defines "domain_name_label" as required and not optional

1.4.0 (2017-08-23)
++++++++++++++++++

Expand Down
4 changes: 2 additions & 2 deletions azure-mgmt-network/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 Network Resource Management Client Library.
This is the Microsoft Azure Network 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 and 3.5.
This package has been tested with Python 2.7, 3.3, 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
134 changes: 127 additions & 7 deletions azure-mgmt-network/azure/mgmt/network/__init__.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion azure-mgmt-network/azure/mgmt/network/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .v2017_06_01.models import *
from .v2017_09_01.models import *
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T15:39:08Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:30:56Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2015_06_15.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2015_06_15.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T15:40:07Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:31:59Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2016_09_01.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2016_09_01.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T15:41:10Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:33:02Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2016_12_01.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class LoadBalancingRule(SubResource):
"""A loag balancing rule for a load balancer.
"""A load balancing rule for a load balancer.

:param id: Resource ID.
:type id: str
Expand All @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2016_12_01.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T15:42:19Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:34:11Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2017_03_01.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


class LoadBalancingRule(SubResource):
"""A loag balancing rule for a load balancer.
"""A load balancing rule for a load balancer.

:param id: Resource ID.
:type id: str
Expand All @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2017_03_01.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T15:43:49Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:35:42Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2017_06_01.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2017_06_01.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"autorest": "1.2.2", "date": "2017-08-17T16:04:55Z", "version": ""}
{"autorest": "1.2.2", "date": "2017-09-13T15:37:29Z", "version": ""}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class InboundNatRule(SubResource):
:type protocol: str or :class:`TransportProtocol
<azure.mgmt.network.v2017_08_01.models.TransportProtocol>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values range
each rule must be unique within the Load Balancer. Acceptable values range
from 1 to 65534.
:type frontend_port: int
:param backend_port: The port used for the internal endpoint. Acceptable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadBalancingRule(SubResource):
:type load_distribution: str or :class:`LoadDistribution
<azure.mgmt.network.v2017_08_01.models.LoadDistribution>`
:param frontend_port: The port for the external endpoint. Port numbers for
each Rule must be unique within the Load Balancer. Acceptable values are
each rule must be unique within the Load Balancer. Acceptable values are
between 1 and 65534.
:type frontend_port: int
:param backend_port: The port used for internal connections on the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ class Usage(Model):
Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource identifier.
:vartype id: str
:ivar unit: An enum describing the unit of measurement. Default value:
"Count" .
:vartype unit: str
Expand All @@ -31,13 +33,15 @@ class Usage(Model):
"""

_validation = {
'id': {'readonly': True},
'unit': {'required': True, 'constant': True},
'current_value': {'required': True},
'limit': {'required': True},
'name': {'required': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'unit': {'key': 'unit', 'type': 'str'},
'current_value': {'key': 'currentValue', 'type': 'long'},
'limit': {'key': 'limit', 'type': 'long'},
Expand All @@ -47,6 +51,7 @@ class Usage(Model):
unit = "Count"

def __init__(self, current_value, limit, name):
self.id = None
self.current_value = current_value
self.limit = limit
self.name = name
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@ def __init__(
self._client, self.config, self._serialize, self._deserialize)

def check_dns_name_availability(
self, location, domain_name_label=None, custom_headers=None, raw=False, **operation_config):
"""Checks whether a domain name in the cloudapp.net zone is available for
use.
self, location, domain_name_label, custom_headers=None, raw=False, **operation_config):
"""Checks whether a domain name in the cloudapp.azure.com zone is
available for use.

:param location: The location of the domain name.
:type location: str
Expand Down Expand Up @@ -291,8 +291,7 @@ def check_dns_name_availability(

# Construct parameters
query_parameters = {}
if domain_name_label is not None:
query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str')
query_parameters['domainNameLabel'] = self._serialize.query("domain_name_label", domain_name_label, 'str')
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):

def list(
self, resource_group_name, network_interface_name, custom_headers=None, raw=False, **operation_config):
"""Get all load balancers in a network interface.
"""List all load balancers in a network interface.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self, client, config, serializer, deserializer):

def list(
self, location, custom_headers=None, raw=False, **operation_config):
"""Lists compute usages for a subscription.
"""List network usages for a subscription.

:param location: The location where resource usage is queried.
:type location: str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,97 @@ def get_long_running_status(status_link, headers=None):

def get_long_running_output(response):

if response.status_code not in [200]:
if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp

deserialized = None

if response.status_code == 200:
deserialized = self._deserialize('str', response)

if raw:
client_raw_response = ClientRawResponse(deserialized, response)
return client_raw_response

return deserialized

if raw:
response = long_running_send()
return get_long_running_output(response)

long_running_operation_timeout = operation_config.get(
'long_running_operation_timeout',
self.config.long_running_operation_timeout)
return AzureOperationPoller(
long_running_send, get_long_running_output,
get_long_running_status, long_running_operation_timeout)

def get_vpn_profile_package_url(
self, resource_group_name, virtual_network_gateway_name, custom_headers=None, raw=False, **operation_config):
"""Gets pre-generated VPN profile for P2S client of the virtual network
gateway in the specified resource group. The profile needs to be
generated first using generateVpnProfile.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param virtual_network_gateway_name: The name of the virtual network
gateway.
:type virtual_network_gateway_name: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
:return:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
instance that returns str or
:class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>` if
raw=true
:rtype:
:class:`AzureOperationPoller<msrestazure.azure_operation.AzureOperationPoller>`
or :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnprofilepackageurl'
path_format_arguments = {
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'virtualNetworkGatewayName': self._serialize.url("virtual_network_gateway_name", virtual_network_gateway_name, 'str'),
'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str')
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {}
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers
header_parameters = {}
header_parameters['Content-Type'] = 'application/json; charset=utf-8'
if self.config.generate_client_request_id:
header_parameters['x-ms-client-request-id'] = str(uuid.uuid1())
if custom_headers:
header_parameters.update(custom_headers)
if self.config.accept_language is not None:
header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str')

# Construct and send request
def long_running_send():

request = self._client.post(url, query_parameters)
return self._client.send(request, header_parameters, **operation_config)

def get_long_running_status(status_link, headers=None):

request = self._client.get(status_link)
if headers:
request.headers.update(headers)
return self._client.send(
request, header_parameters, **operation_config)

def get_long_running_output(response):

if response.status_code not in [200, 202]:
exp = CloudError(response)
exp.request_id = response.headers.get('x-ms-request-id')
raise exp
Expand Down
18 changes: 18 additions & 0 deletions azure-mgmt-network/azure/mgmt/network/v2017_09_01/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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 .network_management_client import NetworkManagementClient
from .version import VERSION

__all__ = ['NetworkManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"autorest": "1.2.2", "date": "2017-09-18T20:16:34Z", "version": ""}
Loading