File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 99
1010
1111@click .command ()
12+ @click .option ('--limit' ,
13+ type = int ,
14+ default = 10 ,
15+ help = "Result limit" )
1216@environment .pass_env
13- def cli (env ):
17+ def cli (env , limit ):
1418 """List object storage accounts."""
1519
1620 mgr = SoftLayer .ObjectStorageManager (env .client )
17- accounts = mgr .list_accounts ()
21+ accounts = mgr .list_accounts (limit = limit )
1822 table = formatting .Table (['id' , 'name' , 'apiType' ])
1923 table .sortby = 'id'
2024 api_type = None
Original file line number Diff line number Diff line change @@ -27,10 +27,10 @@ class ObjectStorageManager(object):
2727 def __init__ (self , client ):
2828 self .client = client
2929
30- def list_accounts (self ):
30+ def list_accounts (self , limit = 10 ):
3131 """Lists your object storage accounts."""
3232 return self .client .call ('Account' , 'getHubNetworkStorage' ,
33- mask = LIST_ACCOUNTS_MASK )
33+ mask = LIST_ACCOUNTS_MASK , iter = True , limit = limit )
3434
3535 def list_endpoints (self ):
3636 """Lists the known object storage endpoints."""
You can’t perform that action at this time.
0 commit comments