Skip to content

Commit 08fe066

Browse files
authored
Update deploy.py to add uuid to subnet name
1 parent f24235d commit 08fe066

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

healthcheck/testtools/deploy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import urllib.request, json
22
import azure.functions as func
3+
import uuid
34

45
from azure.mgmt.resource.resources.models import DeploymentMode
56
from azure.mgmt.compute import ComputeManagementClient
@@ -102,7 +103,7 @@ def create_vnet(credentials,
102103
for i in range(1, len(subnets_cidr) + 1):
103104

104105
# Create Subnet
105-
subnet_name = "subnet" + str(i)
106+
subnet_name = "subnet_" + str(i) + "_" + str(uuid.uuid4())
106107
async_subnet_creation = network_client.subnets.create_or_update(
107108
resource_name_vnet,
108109
vnet_name,
@@ -122,4 +123,4 @@ def delete_resourcegroup(credentials, subscription_id, resource_group_name) :
122123
print("Deleting the deployment... \n\n")
123124
deployment_deletion = resource_client.resource_groups.delete(resource_group_name)
124125
print(deployment_deletion)
125-
#return deployment_deletion
126+
#return deployment_deletion

0 commit comments

Comments
 (0)