@@ -29,6 +29,8 @@ class List(AAZCommand):
2929 ]
3030 }
3131
32+ AZ_SUPPORT_PAGINATION = True
33+
3234 def _handler (self , command_args ):
3335 super ()._handler (command_args )
3436 return self .build_paging (self ._execute_operations , self ._output )
@@ -49,12 +51,12 @@ def _build_arguments_schema(cls, *args, **kwargs):
4951
5052 def _execute_operations (self ):
5153 self .pre_operations ()
52- condition_0 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
53- condition_1 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
54+ condition_0 = has_value (self .ctx .subscription_id ) and has_value (self .ctx .args . resource_group ) is not True
55+ condition_1 = has_value (self .ctx .args . resource_group ) and has_value (self .ctx .subscription_id )
5456 if condition_0 :
55- self .VirtualHubsListByResourceGroup (ctx = self .ctx )()
56- if condition_1 :
5757 self .VirtualHubsList (ctx = self .ctx )()
58+ if condition_1 :
59+ self .VirtualHubsListByResourceGroup (ctx = self .ctx )()
5860 self .post_operations ()
5961
6062 @register_callback
@@ -70,7 +72,7 @@ def _output(self, *args, **kwargs):
7072 next_link = self .deserialize_output (self .ctx .vars .instance .next_link )
7173 return result , next_link
7274
73- class VirtualHubsListByResourceGroup (AAZHttpOperation ):
75+ class VirtualHubsList (AAZHttpOperation ):
7476 CLIENT_TYPE = "MgmtClient"
7577
7678 def __call__ (self , * args , ** kwargs ):
@@ -84,7 +86,7 @@ def __call__(self, *args, **kwargs):
8486 @property
8587 def url (self ):
8688 return self .client .format_url (
87- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.Network/virtualHubs" ,
89+ "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs" ,
8890 ** self .url_parameters
8991 )
9092
@@ -99,10 +101,6 @@ def error_format(self):
99101 @property
100102 def url_parameters (self ):
101103 parameters = {
102- ** self .serialize_url_param (
103- "resourceGroupName" , self .ctx .args .resource_group ,
104- required = True ,
105- ),
106104 ** self .serialize_url_param (
107105 "subscriptionId" , self .ctx .subscription_id ,
108106 required = True ,
@@ -335,7 +333,7 @@ def _build_schema_on_200(cls):
335333
336334 return cls ._schema_on_200
337335
338- class VirtualHubsList (AAZHttpOperation ):
336+ class VirtualHubsListByResourceGroup (AAZHttpOperation ):
339337 CLIENT_TYPE = "MgmtClient"
340338
341339 def __call__ (self , * args , ** kwargs ):
@@ -349,7 +347,7 @@ def __call__(self, *args, **kwargs):
349347 @property
350348 def url (self ):
351349 return self .client .format_url (
352- "/subscriptions/{subscriptionId}/providers/Microsoft.Network/virtualHubs" ,
350+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.Network/virtualHubs" ,
353351 ** self .url_parameters
354352 )
355353
@@ -364,6 +362,10 @@ def error_format(self):
364362 @property
365363 def url_parameters (self ):
366364 parameters = {
365+ ** self .serialize_url_param (
366+ "resourceGroupName" , self .ctx .args .resource_group ,
367+ required = True ,
368+ ),
367369 ** self .serialize_url_param (
368370 "subscriptionId" , self .ctx .subscription_id ,
369371 required = True ,
0 commit comments