File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -105,12 +105,14 @@ def create_vnet(credentials,
105
105
106
106
# Create Subnet
107
107
subnet_name = "subnet_" + str (i ) + "-" + str (uuid .uuid4 ())
108
- async_subnet_creation = network_client .subnets .create_or_update (
109
- resource_name_vnet ,
110
- vnet_name ,
111
- subnet_name ,
112
- {'address_prefix' : subnets_cidr [i - 1 ]}
113
- )
108
+ async_subnet_creation = network_client .subnets .begin_create_or_update (
109
+ resource_group_name = resource_name_vnet ,
110
+ virtual_network_name = vnet_name ,
111
+ subnet_name = subnet_name ,
112
+ subnet_parameters = {
113
+ 'address_prefix' : subnets_cidr [i - 1 ]
114
+ }
115
+ )
114
116
subnet_info = async_subnet_creation .result ()
115
117
# Add created subnet name to subnet_names array
116
118
subnet_names .append (subnet_info .name )
You can’t perform that action at this time.
0 commit comments