Skip to content

Commit be449c5

Browse files
author
SDKAuto
committed
CodeGen from PR 33286 in Azure/azure-rest-api-specs
Merge c0a805808b29552b063b18f4b6f470922e81d2d3 into bf8a7b6e07d929b421527186ce7c90277957adee
1 parent 71ef1ea commit be449c5

File tree

4 files changed

+23
-21
lines changed

4 files changed

+23
-21
lines changed

sdk/network/azure-mgmt-network/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pip install azure-identity
2424

2525
### Authentication
2626

27-
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
27+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
2828

2929
- `AZURE_CLIENT_ID` for Azure client ID.
3030
- `AZURE_TENANT_ID` for Azure tenant ID.

sdk/network/azure-mgmt-network/azure/mgmt/network/_serialization.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def _create_xml_node(tag, prefix=None, ns=None):
310310
return ET.Element(tag)
311311

312312

313-
class Model(object):
313+
class Model:
314314
"""Mixin for all client request body/response body models to support
315315
serialization and deserialization.
316316
"""
@@ -563,7 +563,7 @@ def _decode_attribute_map_key(key):
563563
return key.replace("\\.", ".")
564564

565565

566-
class Serializer(object): # pylint: disable=too-many-public-methods
566+
class Serializer: # pylint: disable=too-many-public-methods
567567
"""Request object model serializer."""
568568

569569
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -1441,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
14411441
return children[0]
14421442

14431443

1444-
class Deserializer(object):
1444+
class Deserializer:
14451445
"""Response object model deserializer.
14461446
14471447
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1683,17 +1683,21 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
16831683
subtype = getattr(response, "_subtype_map", {})
16841684
try:
16851685
readonly = [
1686-
k for k, v in response._validation.items() if v.get("readonly") # pylint: disable=protected-access
1686+
k
1687+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1688+
if v.get("readonly")
16871689
]
16881690
const = [
1689-
k for k, v in response._validation.items() if v.get("constant") # pylint: disable=protected-access
1691+
k
1692+
for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
1693+
if v.get("constant")
16901694
]
16911695
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
16921696
response_obj = response(**kwargs)
16931697
for attr in readonly:
16941698
setattr(response_obj, attr, attrs.get(attr))
16951699
if additional_properties:
1696-
response_obj.additional_properties = additional_properties
1700+
response_obj.additional_properties = additional_properties # type: ignore
16971701
return response_obj
16981702
except TypeError as err:
16991703
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore

sdk/network/azure-mgmt-network/azure/mgmt/network/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "28.1.0"
9+
VERSION = "28.0.0"

sdk/network/azure-mgmt-network/azure/mgmt/network/models/_models_py3.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3748,7 +3748,7 @@ class ApplicationGatewayOnDemandProbe(_serialization.Model):
37483748
:ivar host: Host name to send the probe to.
37493749
:vartype host: str
37503750
:ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to
3751-
:code:`<Protocol>`://:code:`<host>`::code:`<port>`:code:`<path>`.
3751+
:code:`<Protocol>`://\\ :code:`<host>`:\\ :code:`<port>`\\ :code:`<path>`.
37523752
:vartype path: str
37533753
:ivar timeout: The probe timeout in seconds. Probe marked as failed if valid response is not
37543754
received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
@@ -3797,7 +3797,7 @@ def __init__(
37973797
:keyword host: Host name to send the probe to.
37983798
:paramtype host: str
37993799
:keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to
3800-
:code:`<Protocol>`://:code:`<host>`::code:`<port>`:code:`<path>`.
3800+
:code:`<Protocol>`://\\ :code:`<host>`:\\ :code:`<port>`\\ :code:`<path>`.
38013801
:paramtype path: str
38023802
:keyword timeout: The probe timeout in seconds. Probe marked as failed if valid response is not
38033803
received with this timeout period. Acceptable values are from 1 second to 86400 seconds.
@@ -4301,7 +4301,7 @@ class ApplicationGatewayProbe(SubResource):
43014301
:ivar host: Host name to send the probe to.
43024302
:vartype host: str
43034303
:ivar path: Relative path of probe. Valid path starts from '/'. Probe is sent to
4304-
:code:`<Protocol>`://:code:`<host>`::code:`<port>`:code:`<path>`.
4304+
:code:`<Protocol>`://\\ :code:`<host>`:\\ :code:`<port>`\\ :code:`<path>`.
43054305
:vartype path: str
43064306
:ivar interval: The probing interval in seconds. This is the time interval between two
43074307
consecutive probes. Acceptable values are from 1 second to 86400 seconds.
@@ -4391,7 +4391,7 @@ def __init__(
43914391
:keyword host: Host name to send the probe to.
43924392
:paramtype host: str
43934393
:keyword path: Relative path of probe. Valid path starts from '/'. Probe is sent to
4394-
:code:`<Protocol>`://:code:`<host>`::code:`<port>`:code:`<path>`.
4394+
:code:`<Protocol>`://\\ :code:`<host>`:\\ :code:`<port>`\\ :code:`<path>`.
43954395
:paramtype path: str
43964396
:keyword interval: The probing interval in seconds. This is the time interval between two
43974397
consecutive probes. Acceptable values are from 1 second to 86400 seconds.
@@ -24702,7 +24702,7 @@ class NetworkInterfaceIPConfiguration(SubResource):
2470224702
:ivar load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules.
2470324703
:vartype load_balancer_inbound_nat_rules: list[~azure.mgmt.network.models.InboundNatRule]
2470424704
:ivar private_ip_address: Private IP address of the IP configuration. It can be a single IP
24705-
address or a CIDR block in the format :code:`<address>`/:code:`<prefix-length>`.
24705+
address or a CIDR block in the format :code:`<address>`/\\ :code:`<prefix-length>`.
2470624706
:vartype private_ip_address: str
2470724707
:ivar private_ip_address_prefix_length: The private IP address prefix length. If specified and
2470824708
the allocation method is dynamic, the service will allocate a CIDR block instead of a single IP
@@ -24822,7 +24822,7 @@ def __init__(
2482224822
:keyword load_balancer_inbound_nat_rules: A list of references of LoadBalancerInboundNatRules.
2482324823
:paramtype load_balancer_inbound_nat_rules: list[~azure.mgmt.network.models.InboundNatRule]
2482424824
:keyword private_ip_address: Private IP address of the IP configuration. It can be a single IP
24825-
address or a CIDR block in the format :code:`<address>`/:code:`<prefix-length>`.
24825+
address or a CIDR block in the format :code:`<address>`/\\ :code:`<prefix-length>`.
2482624826
:paramtype private_ip_address: str
2482724827
:keyword private_ip_address_prefix_length: The private IP address prefix length. If specified
2482824828
and the allocation method is dynamic, the service will allocate a CIDR block instead of a
@@ -35043,8 +35043,6 @@ class StaticRoutesConfig(_serialization.Model):
3504335043
"""Configuration for static routes on this HubVnetConnectionConfiguration for static routes on
3504435044
this HubVnetConnection.
3504535045

35046-
Variables are only populated by the server, and will be ignored when sending a request.
35047-
3504835046
:ivar propagate_static_routes: Boolean indicating whether static routes on this connection are
3504935047
automatically propagate to route tables which this connection propagates to.
3505035048
:vartype propagate_static_routes: bool
@@ -35054,10 +35052,6 @@ class StaticRoutesConfig(_serialization.Model):
3505435052
~azure.mgmt.network.models.VnetLocalRouteOverrideCriteria
3505535053
"""
3505635054

35057-
_validation = {
35058-
"propagate_static_routes": {"readonly": True},
35059-
}
35060-
3506135055
_attribute_map = {
3506235056
"propagate_static_routes": {"key": "propagateStaticRoutes", "type": "bool"},
3506335057
"vnet_local_route_override_criteria": {"key": "vnetLocalRouteOverrideCriteria", "type": "str"},
@@ -35066,17 +35060,21 @@ class StaticRoutesConfig(_serialization.Model):
3506635060
def __init__(
3506735061
self,
3506835062
*,
35063+
propagate_static_routes: Optional[bool] = None,
3506935064
vnet_local_route_override_criteria: Optional[Union[str, "_models.VnetLocalRouteOverrideCriteria"]] = None,
3507035065
**kwargs: Any
3507135066
) -> None:
3507235067
"""
35068+
:keyword propagate_static_routes: Boolean indicating whether static routes on this connection
35069+
are automatically propagate to route tables which this connection propagates to.
35070+
:paramtype propagate_static_routes: bool
3507335071
:keyword vnet_local_route_override_criteria: Parameter determining whether NVA in spoke vnet is
3507435072
bypassed for traffic with destination in spoke. Known values are: "Contains" and "Equal".
3507535073
:paramtype vnet_local_route_override_criteria: str or
3507635074
~azure.mgmt.network.models.VnetLocalRouteOverrideCriteria
3507735075
"""
3507835076
super().__init__(**kwargs)
35079-
self.propagate_static_routes = None
35077+
self.propagate_static_routes = propagate_static_routes
3508035078
self.vnet_local_route_override_criteria = vnet_local_route_override_criteria
3508135079

3508235080

0 commit comments

Comments
 (0)