@@ -19,7 +19,7 @@ class Create(AAZCommand):
1919 """Create a storage pool
2020
2121 :example: StoragePools_Create
22- az pscloud pool create --resource-group rgpurestorage --storage-pool-name storagePoolname --availability- zone vknyl --vnet-injection "{subnet-id:tnlctolrxdvnkjiphlrdxq, vnet-id:zbumtytyqwewjcyckwqchiypshv}" --provisioned-bandwidth 17 --reservation-id xiowoxnbtcotutcmmrofvgdi --type None --user-assigned-identities "{key4211:{}}" --tags "{key7593:vsyiygyurvwlfaezpuqu}" --location lonlc
22+ az pscloud pool create --resource-group rgpurestorage --storage-pool-name storagePoolname --zone 1 --subnet-id /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} -- vnet-id /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName} --provisioned-bandwidth 100 --reservation-id /subscriptions/{subscriptionId}/providers/PureStorage.Block/reservations/{reservationName} --location eastus
2323 """
2424
2525 _aaz_info = {
@@ -60,58 +60,25 @@ def _build_arguments_schema(cls, *args, **kwargs):
6060 ),
6161 )
6262
63- # define Arg Group "Identity"
64-
65- _args_schema = cls ._args_schema
66- _args_schema .mi_system_assigned = AAZStrArg (
67- options = ["--system-assigned" , "--mi-system-assigned" ],
68- arg_group = "Identity" ,
69- help = "Set the system managed identity." ,
70- blank = "True" ,
71- )
72- _args_schema .mi_user_assigned = AAZListArg (
73- options = ["--user-assigned" , "--mi-user-assigned" ],
74- arg_group = "Identity" ,
75- help = "Set the user managed identities." ,
76- blank = [],
77- )
78-
79- mi_user_assigned = cls ._args_schema .mi_user_assigned
80- mi_user_assigned .Element = AAZStrArg ()
81-
8263 # define Arg Group "Properties"
8364
8465 _args_schema = cls ._args_schema
85- _args_schema .availability_zone = AAZStrArg (
86- options = ["--availability -zone" ],
66+ _args_schema .zone = AAZStrArg (
67+ options = ["-z" , "- -zone" ],
8768 arg_group = "Properties" ,
8869 help = "Azure Availability Zone the Pool is located in" ,
70+ required = True ,
8971 )
9072 _args_schema .provisioned_bandwidth = AAZIntArg (
9173 options = ["--provisioned-bandwidth" ],
9274 arg_group = "Properties" ,
9375 help = "Total bandwidth provisioned for the pool, in MB/s" ,
76+ required = True ,
9477 )
9578 _args_schema .reservation_id = AAZStrArg (
9679 options = ["--reservation-id" ],
9780 arg_group = "Properties" ,
9881 help = "Azure resource ID of the Pure Storage Cloud service (reservation resource) this storage pool belongs to" ,
99- )
100- _args_schema .vnet_injection = AAZObjectArg (
101- options = ["--vnet-injection" ],
102- arg_group = "Properties" ,
103- help = "Network properties of the storage pool" ,
104- )
105-
106- vnet_injection = cls ._args_schema .vnet_injection
107- vnet_injection .subnet_id = AAZStrArg (
108- options = ["subnet-id" ],
109- help = "Azure resource ID of the Virtual Network subnet where the storage pool will be connected" ,
110- required = True ,
111- )
112- vnet_injection .vnet_id = AAZStrArg (
113- options = ["vnet-id" ],
114- help = "Azure resource ID of the Virtual Network in which the subnet is located" ,
11582 required = True ,
11683 )
11784
@@ -134,6 +101,22 @@ def _build_arguments_schema(cls, *args, **kwargs):
134101
135102 tags = cls ._args_schema .tags
136103 tags .Element = AAZStrArg ()
104+
105+ # define Arg Group "VnetInjection"
106+
107+ _args_schema = cls ._args_schema
108+ _args_schema .subnet_id = AAZStrArg (
109+ options = ["--subnet-id" ],
110+ arg_group = "VnetInjection" ,
111+ help = "Azure resource ID of the Virtual Network subnet where the storage pool will be connected" ,
112+ required = True ,
113+ )
114+ _args_schema .vnet_id = AAZStrArg (
115+ options = ["--vnet-id" ],
116+ arg_group = "VnetInjection" ,
117+ help = "Azure resource ID of the Virtual Network in which the subnet is located" ,
118+ required = True ,
119+ )
137120 return cls ._args_schema
138121
139122 def _execute_operations (self ):
@@ -242,26 +225,16 @@ def content(self):
242225 typ = AAZObjectType ,
243226 typ_kwargs = {"flags" : {"required" : True , "client_flatten" : True }}
244227 )
245- _builder .set_prop ("identity" , AAZIdentityObjectType )
246228 _builder .set_prop ("location" , AAZStrType , ".location" , typ_kwargs = {"flags" : {"required" : True }})
247229 _builder .set_prop ("properties" , AAZObjectType , typ_kwargs = {"flags" : {"client_flatten" : True }})
248230 _builder .set_prop ("tags" , AAZDictType , ".tags" )
249231
250- identity = _builder .get (".identity" )
251- if identity is not None :
252- identity .set_prop ("userAssigned" , AAZListType , ".mi_user_assigned" , typ_kwargs = {"flags" : {"action" : "create" }})
253- identity .set_prop ("systemAssigned" , AAZStrType , ".mi_system_assigned" , typ_kwargs = {"flags" : {"action" : "create" }})
254-
255- user_assigned = _builder .get (".identity.userAssigned" )
256- if user_assigned is not None :
257- user_assigned .set_elements (AAZStrType , "." )
258-
259232 properties = _builder .get (".properties" )
260233 if properties is not None :
261- properties .set_prop ("availabilityZone" , AAZStrType , ".availability_zone " , typ_kwargs = {"flags" : {"required" : True }})
234+ properties .set_prop ("availabilityZone" , AAZStrType , ".zone " , typ_kwargs = {"flags" : {"required" : True }})
262235 properties .set_prop ("provisionedBandwidthMbPerSec" , AAZIntType , ".provisioned_bandwidth" , typ_kwargs = {"flags" : {"required" : True }})
263236 properties .set_prop ("reservationResourceId" , AAZStrType , ".reservation_id" , typ_kwargs = {"flags" : {"required" : True }})
264- properties .set_prop ("vnetInjection" , AAZObjectType , ".vnet_injection " , typ_kwargs = {"flags" : {"required" : True }})
237+ properties .set_prop ("vnetInjection" , AAZObjectType , "." , typ_kwargs = {"flags" : {"required" : True }})
265238
266239 vnet_injection = _builder .get (".properties.vnetInjection" )
267240 if vnet_injection is not None :
0 commit comments