Skip to content

Commit 047f7e6

Browse files
committed
Changed subnet name to subnet list
1 parent 784d34a commit 047f7e6

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

healthcheck/healthcheck_webapps_refarch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,13 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
3535
resource_name_vnet = 'vnet_resource_group'
3636
# Deploy a resource group with a virtual network and specified number of subnets
3737
try:
38-
subnet_name, vnet_name = DeployOp.create_vnet(credentials,
38+
subnet_name_list, vnet_name = DeployOp.create_vnet(credentials,
3939
subscription_id,
4040
location,
4141
subnets_cidr,
4242
resource_name_vnet,
4343
vnet_cidr)
44+
subnet_name = subnet_name_list[0]
4445
network_client = NetworkManagementClient(credentials, subscription_id)
4546
# Add service endpoint to subnets
4647
subnet = network_client.subnets.get(resource_name_vnet, vnet_name, subnet_name)
@@ -49,7 +50,7 @@ def main(tenant_id_arg, client_id_arg, client_secret_arg, subscription_id_arg, u
4950
subnet.service_endpoints.append(
5051
ServiceEndpointPropertiesFormat(service='Microsoft.Storage')
5152
)
52-
updated_subnet = network_client.subnets.create_or_update(
53+
updated_subnet = network_client.subnets.begin_create_or_update(
5354
resource_name_vnet,
5455
vnet_name,
5556
subnet_name,

healthcheck/testtools/AzureAuthentication.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from azure.common import credentials
22
from azure.common.credentials import ServicePrincipalCredentials
3-
# from azure.identity import DefaultAzureCredential
43
from azure.identity import ClientSecretCredential
54
import adal
65

@@ -15,7 +14,6 @@ def authenticate_client_key(tenant_id, client_id, client_secret):
1514

1615
context = adal.AuthenticationContext(authority_uri, api_version=None)
1716
mgmt_token = context.acquire_token_with_client_credentials(resource_uri, client_id, client_secret)
18-
# credentials = DefaultAzureCredential()
1917
credentials = ClientSecretCredential(tenant_id, client_id, client_secret)
2018

2119
return credentials

0 commit comments

Comments
 (0)