File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -82,20 +82,19 @@ def create_vnet(credentials,
82
82
print ("Resource group created...\n " )
83
83
84
84
# Create virtual network
85
- async_vnet_creation = network_client .virtual_networks .create_or_update (
86
- resource_name_vnet ,
87
- vnet_name ,
88
- {
85
+ async_vnet_creation = network_client .virtual_networks .begin_create_or_update (
86
+ resource_group_name = resource_name_vnet ,
87
+ virtual_network_name = vnet_name ,
88
+ parameters = {
89
+ 'location' : location ,
89
90
'address_space' : {
90
91
'address_prefixes' : [vnet_cidr ]
91
- },
92
- 'location' : location
93
-
92
+ }
94
93
}
95
94
)
96
95
97
- # Wait for the virtual network creation
98
- async_vnet_creation .wait ()
96
+ # Wait for the virtual network creation to complete
97
+ async_vnet_creation .result ()
99
98
100
99
print ("Added a virtual network... \n " )
101
100
You can’t perform that action at this time.
0 commit comments