|
| 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