@@ -5827,6 +5827,14 @@ exports.init = function (cli) {
5827
5827
var subscription = profile . current . getSubscription ( options . subscription ) ;
5828
5828
var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5829
5829
var result = computeManagementClient . virtualMachineScaleSets . list ( resourceGroupName , _ ) ;
5830
+ var nextPageLink = result . nextPageLink ;
5831
+ while ( nextPageLink ) {
5832
+ var pageResult = computeManagementClient . virtualMachineScaleSets . listNext ( nextPageLink , _ ) ;
5833
+ pageResult . forEach ( function ( item ) {
5834
+ result . push ( item ) ;
5835
+ } ) ;
5836
+ nextPageLink = pageResult . nextPageLink ;
5837
+ }
5830
5838
cli . output . json ( result ) ;
5831
5839
} ) ;
5832
5840
/*
@@ -5843,44 +5851,14 @@ exports.init = function (cli) {
5843
5851
var subscription = profile . current . getSubscription ( options . subscription ) ;
5844
5852
var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5845
5853
var result = computeManagementClient . virtualMachineScaleSets . listAll ( _ ) ;
5846
- cli . output . json ( result ) ;
5847
- } ) ;
5848
- /*
5849
- VirtualMachineScaleSets ListAllNext
5850
- --next-page-link
5851
- */
5852
- var virtualMachineScaleSetsListAllNext = cli . category ( 'vmss' )
5853
- . description ( $ ( 'Commands to manage your virtual machine scale sets. ' ) ) ;
5854
- virtualMachineScaleSetsListAllNext . command ( 'list-all-next [next-page-link]' )
5855
- . description ( $ ( 'Commands to manage your virtual machine scale sets by the list-all-next method.' ) )
5856
- . usage ( '[options] <next-page-link>' )
5857
- . option ( '--next-page-link <next-page-link>' , $ ( 'next-page-link' ) )
5858
- . option ( '--parameter-file <parameter-file>' , $ ( 'the input parameter file' ) )
5859
- . option ( '-s, --subscription <subscription>' , $ ( 'the subscription identifier' ) )
5860
- . execute ( function ( nextPageLink , options , _ ) {
5861
- cli . output . verbose ( 'nextPageLink = ' + nextPageLink ) ;
5862
- var subscription = profile . current . getSubscription ( options . subscription ) ;
5863
- var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5864
- var result = computeManagementClient . virtualMachineScaleSets . listAllNext ( nextPageLink , _ ) ;
5865
- cli . output . json ( result ) ;
5866
- } ) ;
5867
- /*
5868
- VirtualMachineScaleSets ListNext
5869
- --next-page-link
5870
- */
5871
- var virtualMachineScaleSetsListNext = cli . category ( 'vmss' )
5872
- . description ( $ ( 'Commands to manage your virtual machine scale sets. ' ) ) ;
5873
- virtualMachineScaleSetsListNext . command ( 'list-next [next-page-link]' )
5874
- . description ( $ ( 'Commands to manage your virtual machine scale sets by the list-next method.' ) )
5875
- . usage ( '[options] <next-page-link>' )
5876
- . option ( '--next-page-link <next-page-link>' , $ ( 'next-page-link' ) )
5877
- . option ( '--parameter-file <parameter-file>' , $ ( 'the input parameter file' ) )
5878
- . option ( '-s, --subscription <subscription>' , $ ( 'the subscription identifier' ) )
5879
- . execute ( function ( nextPageLink , options , _ ) {
5880
- cli . output . verbose ( 'nextPageLink = ' + nextPageLink ) ;
5881
- var subscription = profile . current . getSubscription ( options . subscription ) ;
5882
- var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5883
- var result = computeManagementClient . virtualMachineScaleSets . listNext ( nextPageLink , _ ) ;
5854
+ var nextPageLink = result . nextPageLink ;
5855
+ while ( nextPageLink ) {
5856
+ var pageResult = computeManagementClient . virtualMachineScaleSets . listAllNext ( nextPageLink , _ ) ;
5857
+ pageResult . forEach ( function ( item ) {
5858
+ result . push ( item ) ;
5859
+ } ) ;
5860
+ nextPageLink = pageResult . nextPageLink ;
5861
+ }
5884
5862
cli . output . json ( result ) ;
5885
5863
} ) ;
5886
5864
/*
@@ -5903,25 +5881,14 @@ exports.init = function (cli) {
5903
5881
var subscription = profile . current . getSubscription ( options . subscription ) ;
5904
5882
var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5905
5883
var result = computeManagementClient . virtualMachineScaleSets . listSkus ( resourceGroupName , vMScaleSetName , _ ) ;
5906
- cli . output . json ( result ) ;
5907
- } ) ;
5908
- /*
5909
- VirtualMachineScaleSets ListSkusNext
5910
- --next-page-link
5911
- */
5912
- var virtualMachineScaleSetsListSkusNext = cli . category ( 'vmss' )
5913
- . description ( $ ( 'Commands to manage your virtual machine scale sets. ' ) ) ;
5914
- virtualMachineScaleSetsListSkusNext . command ( 'list-skus-next [next-page-link]' )
5915
- . description ( $ ( 'Commands to manage your virtual machine scale sets by the list-skus-next method.' ) )
5916
- . usage ( '[options] <next-page-link>' )
5917
- . option ( '--next-page-link <next-page-link>' , $ ( 'next-page-link' ) )
5918
- . option ( '--parameter-file <parameter-file>' , $ ( 'the input parameter file' ) )
5919
- . option ( '-s, --subscription <subscription>' , $ ( 'the subscription identifier' ) )
5920
- . execute ( function ( nextPageLink , options , _ ) {
5921
- cli . output . verbose ( 'nextPageLink = ' + nextPageLink ) ;
5922
- var subscription = profile . current . getSubscription ( options . subscription ) ;
5923
- var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
5924
- var result = computeManagementClient . virtualMachineScaleSets . listSkusNext ( nextPageLink , _ ) ;
5884
+ var nextPageLink = result . nextPageLink ;
5885
+ while ( nextPageLink ) {
5886
+ var pageResult = computeManagementClient . virtualMachineScaleSets . listSkusNext ( nextPageLink , _ ) ;
5887
+ pageResult . forEach ( function ( item ) {
5888
+ result . push ( item ) ;
5889
+ } ) ;
5890
+ nextPageLink = pageResult . nextPageLink ;
5891
+ }
5925
5892
cli . output . json ( result ) ;
5926
5893
} ) ;
5927
5894
/*
@@ -6188,47 +6155,30 @@ exports.init = function (cli) {
6188
6155
VirtualMachineScaleSetVMs List
6189
6156
--resource-group-name
6190
6157
--virtual-machine-scale-set-name
6191
- --odata-query
6192
- --select
6193
6158
*/
6194
6159
var virtualMachineScaleSetVMsList = cli . category ( 'vmssvm' )
6195
6160
. description ( $ ( 'Commands to manage your virtual machine scale set vm. ' ) ) ;
6196
- virtualMachineScaleSetVMsList . command ( 'list [resource-group-name] [virtual-machine-scale-set-name] [odata-query] [select] ' )
6161
+ virtualMachineScaleSetVMsList . command ( 'list [resource-group-name] [virtual-machine-scale-set-name]' )
6197
6162
. description ( $ ( 'Commands to manage your virtual machine scale set vm by the list method.' ) )
6198
- . usage ( '[options] <resource-group-name> <virtual-machine-scale-set-name> <odata-query> <select> ' )
6163
+ . usage ( '[options] <resource-group-name> <virtual-machine-scale-set-name>' )
6199
6164
. option ( '-g, --resource-group-name <resource-group-name>' , $ ( 'resource-group-name' ) )
6200
6165
. option ( '-n, --virtual-machine-scale-set-name <virtual-machine-scale-set-name>' , $ ( 'virtual-machine-scale-set-name' ) )
6201
- . option ( '--odata-query <odata-query>' , $ ( 'odata-query' ) )
6202
- . option ( '--select <select>' , $ ( 'select' ) )
6203
6166
. option ( '--parameter-file <parameter-file>' , $ ( 'the input parameter file' ) )
6204
6167
. option ( '-s, --subscription <subscription>' , $ ( 'the subscription identifier' ) )
6205
- . execute ( function ( resourceGroupName , virtualMachineScaleSetName , odataQuery , select , options , _ ) {
6168
+ . execute ( function ( resourceGroupName , virtualMachineScaleSetName , options , _ ) {
6206
6169
cli . output . verbose ( 'resourceGroupName = ' + resourceGroupName ) ;
6207
6170
cli . output . verbose ( 'virtualMachineScaleSetName = ' + virtualMachineScaleSetName ) ;
6208
- cli . output . verbose ( 'odataQuery = ' + odataQuery ) ;
6209
- cli . output . verbose ( 'select = ' + select ) ;
6210
6171
var subscription = profile . current . getSubscription ( options . subscription ) ;
6211
6172
var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
6212
- var result = computeManagementClient . virtualMachineScaleSetVMs . list ( resourceGroupName , virtualMachineScaleSetName , odataQuery , select , _ ) ;
6213
- cli . output . json ( result ) ;
6214
- } ) ;
6215
- /*
6216
- VirtualMachineScaleSetVMs ListNext
6217
- --next-page-link
6218
- */
6219
- var virtualMachineScaleSetVMsListNext = cli . category ( 'vmssvm' )
6220
- . description ( $ ( 'Commands to manage your virtual machine scale set vm. ' ) ) ;
6221
- virtualMachineScaleSetVMsListNext . command ( 'list-next [next-page-link]' )
6222
- . description ( $ ( 'Commands to manage your virtual machine scale set vm by the list-next method.' ) )
6223
- . usage ( '[options] <next-page-link>' )
6224
- . option ( '--next-page-link <next-page-link>' , $ ( 'next-page-link' ) )
6225
- . option ( '--parameter-file <parameter-file>' , $ ( 'the input parameter file' ) )
6226
- . option ( '-s, --subscription <subscription>' , $ ( 'the subscription identifier' ) )
6227
- . execute ( function ( nextPageLink , options , _ ) {
6228
- cli . output . verbose ( 'nextPageLink = ' + nextPageLink ) ;
6229
- var subscription = profile . current . getSubscription ( options . subscription ) ;
6230
- var computeManagementClient = utils . createComputeManagementClient ( subscription ) ;
6231
- var result = computeManagementClient . virtualMachineScaleSetVMs . listNext ( nextPageLink , _ ) ;
6173
+ var result = computeManagementClient . virtualMachineScaleSetVMs . list ( resourceGroupName , virtualMachineScaleSetName , _ ) ;
6174
+ var nextPageLink = result . nextPageLink ;
6175
+ while ( nextPageLink ) {
6176
+ var pageResult = computeManagementClient . virtualMachineScaleSetVMs . listNext ( nextPageLink , _ ) ;
6177
+ pageResult . forEach ( function ( item ) {
6178
+ result . push ( item ) ;
6179
+ } ) ;
6180
+ nextPageLink = pageResult . nextPageLink ;
6181
+ }
6232
6182
cli . output . json ( result ) ;
6233
6183
} ) ;
6234
6184
/*
0 commit comments