Skip to content

Commit e08dc98

Browse files
author
SDKAuto
committed
CodeGen from PR 31273 in Azure/azure-rest-api-specs
Merge a20e9d73e0ed846272cbadbcc03e9d99fdce3573 into ecf1283ebb48d885af6b09f467416f9d502ba77d
1 parent 5b78782 commit e08dc98

File tree

286 files changed

+239022
-5
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+239022
-5
lines changed

sdk/network/azure-mgmt-network/_meta.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
"commit": "d79d73bea550b643c312dde6a7e817840c1ac914",
2+
"commit": "d1e289fdaea8cc56b682cc2464676e6383b834f2",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.10.2",
55
"use": [
66
"@autorest/[email protected]",
77
"@autorest/[email protected]"
88
],
9-
"autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
9+
"autorest_command": "autorest specification/network/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
1010
"readme": "specification/network/resource-manager/readme.md",
1111
"package-2015-06split": "2019-06-13 02:17:06 +0300 f0f79bfa8191ac30cfb0f87665411769bd2063a6 Microsoft.Network/stable/2015-06-15/virtualNetworkGateway.json",
1212
"package-2017-10": "2019-06-13 02:23:37 +0300 e19543a6a361096e5ca11a42424a39025fd008fa Microsoft.Network/stable/2017-10-01/applicationGateway.json",
@@ -37,5 +37,5 @@
3737
"package-2023-09": "2024-08-05 12:54:01 +0800 0699892cadd5825057a797244d8b704e6529631d Microsoft.Network/stable/2023-09-01/ipAllocation.json",
3838
"package-2023-11": "2024-08-05 18:42:45 -0700 9fc2f7eda170fad2fe721788d2824e572a6c4c38 Microsoft.Network/stable/2023-11-01/securityPartnerProvider.json",
3939
"package-2024-01": "2024-09-09 15:04:01 -0700 1ad29756bd141a47cac770140105a706d065ae1b Microsoft.Network/preview/2024-01-01-preview/networkVerifier.json",
40-
"package-2024-03": "2024-08-27 11:05:40 +0530 5164430697eba3c27388fe9112de8eba40f85664 Microsoft.Network/stable/2024-03-01/vmssPublicIpAddress.json"
40+
"package-2024-03": "2024-10-28 12:45:23 -0700 a20e9d73e0ed846272cbadbcc03e9d99fdce3573 Microsoft.Network/stable/2024-03-01/networkInterface.json"
4141
}

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 = "27.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4392,6 +4392,9 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
43924392
:ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports
43934393
encryption.
43944394
:vartype vnet_encryption_supported: bool
4395+
:ivar default_outbound_connectivity_enabled: Whether default outbound connectivity for nic was
4396+
configured or not.
4397+
:vartype default_outbound_connectivity_enabled: bool
43954398
:ivar enable_accelerated_networking: If the network interface is configured for accelerated
43964399
networking. Not applicable to VM sizes which require accelerated networking.
43974400
:vartype enable_accelerated_networking: bool
@@ -4440,6 +4443,7 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
44404443
"mac_address": {"readonly": True},
44414444
"primary": {"readonly": True},
44424445
"vnet_encryption_supported": {"readonly": True},
4446+
"default_outbound_connectivity_enabled": {"readonly": True},
44434447
"hosted_workloads": {"readonly": True},
44444448
"dscp_configuration": {"readonly": True},
44454449
"resource_guid": {"readonly": True},
@@ -4463,6 +4467,10 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
44634467
"mac_address": {"key": "properties.macAddress", "type": "str"},
44644468
"primary": {"key": "properties.primary", "type": "bool"},
44654469
"vnet_encryption_supported": {"key": "properties.vnetEncryptionSupported", "type": "bool"},
4470+
"default_outbound_connectivity_enabled": {
4471+
"key": "properties.defaultOutboundConnectivityEnabled",
4472+
"type": "bool",
4473+
},
44664474
"enable_accelerated_networking": {"key": "properties.enableAcceleratedNetworking", "type": "bool"},
44674475
"disable_tcp_state_tracking": {"key": "properties.disableTcpStateTracking", "type": "bool"},
44684476
"enable_ip_forwarding": {"key": "properties.enableIPForwarding", "type": "bool"},
@@ -4555,6 +4563,7 @@ def __init__( # pylint: disable=too-many-locals
45554563
self.mac_address = None
45564564
self.primary = None
45574565
self.vnet_encryption_supported = None
4566+
self.default_outbound_connectivity_enabled = None
45584567
self.enable_accelerated_networking = enable_accelerated_networking
45594568
self.disable_tcp_state_tracking = disable_tcp_state_tracking
45604569
self.enable_ip_forwarding = enable_ip_forwarding

sdk/network/azure-mgmt-network/azure/mgmt/network/v2024_03_01/_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 = "27.0.0"
9+
VERSION = "1.0.0b1"

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23624,6 +23624,9 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
2362423624
:ivar vnet_encryption_supported: Whether the virtual machine this nic is attached to supports
2362523625
encryption.
2362623626
:vartype vnet_encryption_supported: bool
23627+
:ivar default_outbound_connectivity_enabled: Whether default outbound connectivity for nic was
23628+
configured or not.
23629+
:vartype default_outbound_connectivity_enabled: bool
2362723630
:ivar enable_accelerated_networking: If the network interface is configured for accelerated
2362823631
networking. Not applicable to VM sizes which require accelerated networking.
2362923632
:vartype enable_accelerated_networking: bool
@@ -23672,6 +23675,7 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
2367223675
"mac_address": {"readonly": True},
2367323676
"primary": {"readonly": True},
2367423677
"vnet_encryption_supported": {"readonly": True},
23678+
"default_outbound_connectivity_enabled": {"readonly": True},
2367523679
"hosted_workloads": {"readonly": True},
2367623680
"dscp_configuration": {"readonly": True},
2367723681
"resource_guid": {"readonly": True},
@@ -23695,6 +23699,10 @@ class NetworkInterface(Resource): # pylint: disable=too-many-instance-attribute
2369523699
"mac_address": {"key": "properties.macAddress", "type": "str"},
2369623700
"primary": {"key": "properties.primary", "type": "bool"},
2369723701
"vnet_encryption_supported": {"key": "properties.vnetEncryptionSupported", "type": "bool"},
23702+
"default_outbound_connectivity_enabled": {
23703+
"key": "properties.defaultOutboundConnectivityEnabled",
23704+
"type": "bool",
23705+
},
2369823706
"enable_accelerated_networking": {"key": "properties.enableAcceleratedNetworking", "type": "bool"},
2369923707
"disable_tcp_state_tracking": {"key": "properties.disableTcpStateTracking", "type": "bool"},
2370023708
"enable_ip_forwarding": {"key": "properties.enableIPForwarding", "type": "bool"},
@@ -23787,6 +23795,7 @@ def __init__( # pylint: disable=too-many-locals
2378723795
self.mac_address = None
2378823796
self.primary = None
2378923797
self.vnet_encryption_supported = None
23798+
self.default_outbound_connectivity_enabled = None
2379023799
self.enable_accelerated_networking = enable_accelerated_networking
2379123800
self.disable_tcp_state_tracking = disable_tcp_state_tracking
2379223801
self.enable_ip_forwarding = enable_ip_forwarding
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
import os
9+
import pytest
10+
from dotenv import load_dotenv
11+
from devtools_testutils import (
12+
test_proxy,
13+
add_general_regex_sanitizer,
14+
add_body_key_sanitizer,
15+
add_header_regex_sanitizer,
16+
)
17+
18+
load_dotenv()
19+
20+
21+
# aovid record sensitive identity information in recordings
22+
@pytest.fixture(scope="session", autouse=True)
23+
def add_sanitizers(test_proxy):
24+
networkmanagement_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
25+
networkmanagement_tenant_id = os.environ.get("AZURE_TENANT_ID", "00000000-0000-0000-0000-000000000000")
26+
networkmanagement_client_id = os.environ.get("AZURE_CLIENT_ID", "00000000-0000-0000-0000-000000000000")
27+
networkmanagement_client_secret = os.environ.get("AZURE_CLIENT_SECRET", "00000000-0000-0000-0000-000000000000")
28+
add_general_regex_sanitizer(regex=networkmanagement_subscription_id, value="00000000-0000-0000-0000-000000000000")
29+
add_general_regex_sanitizer(regex=networkmanagement_tenant_id, value="00000000-0000-0000-0000-000000000000")
30+
add_general_regex_sanitizer(regex=networkmanagement_client_id, value="00000000-0000-0000-0000-000000000000")
31+
add_general_regex_sanitizer(regex=networkmanagement_client_secret, value="00000000-0000-0000-0000-000000000000")
32+
33+
add_header_regex_sanitizer(key="Set-Cookie", value="[set-cookie;]")
34+
add_header_regex_sanitizer(key="Cookie", value="cookie;")
35+
add_body_key_sanitizer(json_path="$..access_token", value="access_token")
Lines changed: 223 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,223 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for license information.
5+
# Code generated by Microsoft (R) AutoRest Code Generator.
6+
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
7+
# --------------------------------------------------------------------------
8+
import pytest
9+
from azure.mgmt.network import NetworkManagementClient
10+
11+
from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
12+
13+
AZURE_LOCATION = "eastus"
14+
15+
16+
@pytest.mark.skip("you may need to update the auto-generated test case before run it")
17+
class TestNetworkManagement(AzureMgmtRecordedTestCase):
18+
def setup_method(self, method):
19+
self.client = self.create_mgmt_client(NetworkManagementClient)
20+
21+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
22+
@recorded_by_proxy
23+
def test_begin_put_bastion_shareable_link(self, resource_group):
24+
response = self.client.begin_put_bastion_shareable_link(
25+
resource_group_name=resource_group.name,
26+
bastion_host_name="str",
27+
bsl_request={
28+
"vms": [
29+
{
30+
"vm": {"id": "str", "location": "str", "name": "str", "tags": {"str": "str"}, "type": "str"},
31+
"bsl": "str",
32+
"createdAt": "str",
33+
"message": "str",
34+
}
35+
]
36+
},
37+
api_version="2024-03-01",
38+
).result() # call '.result()' to poll until service return final result
39+
result = [r for r in response]
40+
# please add some check logic here by yourself
41+
# ...
42+
43+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
44+
@recorded_by_proxy
45+
def test_begin_delete_bastion_shareable_link(self, resource_group):
46+
response = self.client.begin_delete_bastion_shareable_link(
47+
resource_group_name=resource_group.name,
48+
bastion_host_name="str",
49+
bsl_request={
50+
"vms": [
51+
{
52+
"vm": {"id": "str", "location": "str", "name": "str", "tags": {"str": "str"}, "type": "str"},
53+
"bsl": "str",
54+
"createdAt": "str",
55+
"message": "str",
56+
}
57+
]
58+
},
59+
api_version="2024-03-01",
60+
).result() # call '.result()' to poll until service return final result
61+
62+
# please add some check logic here by yourself
63+
# ...
64+
65+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
66+
@recorded_by_proxy
67+
def test_begin_delete_bastion_shareable_link_by_token(self, resource_group):
68+
response = self.client.begin_delete_bastion_shareable_link_by_token(
69+
resource_group_name=resource_group.name,
70+
bastion_host_name="str",
71+
bsl_token_request={"tokens": ["str"]},
72+
api_version="2024-03-01",
73+
).result() # call '.result()' to poll until service return final result
74+
75+
# please add some check logic here by yourself
76+
# ...
77+
78+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
79+
@recorded_by_proxy
80+
def test_get_bastion_shareable_link(self, resource_group):
81+
response = self.client.get_bastion_shareable_link(
82+
resource_group_name=resource_group.name,
83+
bastion_host_name="str",
84+
bsl_request={
85+
"vms": [
86+
{
87+
"vm": {"id": "str", "location": "str", "name": "str", "tags": {"str": "str"}, "type": "str"},
88+
"bsl": "str",
89+
"createdAt": "str",
90+
"message": "str",
91+
}
92+
]
93+
},
94+
api_version="2024-03-01",
95+
)
96+
result = [r for r in response]
97+
# please add some check logic here by yourself
98+
# ...
99+
100+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
101+
@recorded_by_proxy
102+
def test_begin_get_active_sessions(self, resource_group):
103+
response = self.client.begin_get_active_sessions(
104+
resource_group_name=resource_group.name,
105+
bastion_host_name="str",
106+
api_version="2024-03-01",
107+
).result() # call '.result()' to poll until service return final result
108+
result = [r for r in response]
109+
# please add some check logic here by yourself
110+
# ...
111+
112+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
113+
@recorded_by_proxy
114+
def test_disconnect_active_sessions(self, resource_group):
115+
response = self.client.disconnect_active_sessions(
116+
resource_group_name=resource_group.name,
117+
bastion_host_name="str",
118+
session_ids={"sessionIds": ["str"]},
119+
api_version="2024-03-01",
120+
)
121+
result = [r for r in response]
122+
# please add some check logic here by yourself
123+
# ...
124+
125+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
126+
@recorded_by_proxy
127+
def test_check_dns_name_availability(self, resource_group):
128+
response = self.client.check_dns_name_availability(
129+
location="str",
130+
domain_name_label="str",
131+
api_version="2024-03-01",
132+
)
133+
134+
# please add some check logic here by yourself
135+
# ...
136+
137+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
138+
@recorded_by_proxy
139+
def test_express_route_provider_port(self, resource_group):
140+
response = self.client.express_route_provider_port(
141+
providerport="str",
142+
api_version="2024-03-01",
143+
)
144+
145+
# please add some check logic here by yourself
146+
# ...
147+
148+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
149+
@recorded_by_proxy
150+
def test_list_active_connectivity_configurations(self, resource_group):
151+
response = self.client.list_active_connectivity_configurations(
152+
resource_group_name=resource_group.name,
153+
network_manager_name="str",
154+
parameters={"regions": ["str"], "skipToken": "str"},
155+
api_version="2024-03-01",
156+
)
157+
158+
# please add some check logic here by yourself
159+
# ...
160+
161+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
162+
@recorded_by_proxy
163+
def test_list_active_security_admin_rules(self, resource_group):
164+
response = self.client.list_active_security_admin_rules(
165+
resource_group_name=resource_group.name,
166+
network_manager_name="str",
167+
parameters={"regions": ["str"], "skipToken": "str"},
168+
api_version="2024-03-01",
169+
)
170+
171+
# please add some check logic here by yourself
172+
# ...
173+
174+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
175+
@recorded_by_proxy
176+
def test_list_network_manager_effective_connectivity_configurations(self, resource_group):
177+
response = self.client.list_network_manager_effective_connectivity_configurations(
178+
resource_group_name=resource_group.name,
179+
virtual_network_name="str",
180+
parameters={"skipToken": "str"},
181+
api_version="2024-03-01",
182+
)
183+
184+
# please add some check logic here by yourself
185+
# ...
186+
187+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
188+
@recorded_by_proxy
189+
def test_list_network_manager_effective_security_admin_rules(self, resource_group):
190+
response = self.client.list_network_manager_effective_security_admin_rules(
191+
resource_group_name=resource_group.name,
192+
virtual_network_name="str",
193+
parameters={"skipToken": "str"},
194+
api_version="2024-03-01",
195+
)
196+
197+
# please add some check logic here by yourself
198+
# ...
199+
200+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
201+
@recorded_by_proxy
202+
def test_supported_security_providers(self, resource_group):
203+
response = self.client.supported_security_providers(
204+
resource_group_name=resource_group.name,
205+
virtual_wan_name="str",
206+
api_version="2024-03-01",
207+
)
208+
209+
# please add some check logic here by yourself
210+
# ...
211+
212+
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
213+
@recorded_by_proxy
214+
def test_begin_generatevirtualwanvpnserverconfigurationvpnprofile(self, resource_group):
215+
response = self.client.begin_generatevirtualwanvpnserverconfigurationvpnprofile(
216+
resource_group_name=resource_group.name,
217+
virtual_wan_name="str",
218+
vpn_client_params={"authenticationMethod": "str", "vpnServerConfigurationResourceId": "str"},
219+
api_version="2024-03-01",
220+
).result() # call '.result()' to poll until service return final result
221+
222+
# please add some check logic here by yourself
223+
# ...

0 commit comments

Comments
 (0)