@@ -42,16 +42,16 @@ def cli(env, prices, location=None):
4242def _block_ios_get_table (items , prices ):
4343 if prices :
4444 table = formatting .Table (['Id' , 'Description' , 'KeyName' , 'Prices' ], title = 'IOPS' )
45- for item in items :
46- if item ['itemCategory' ]['categoryCode' ] == 'storage_tier_level' :
47- table .add_row ([item .get ('id' ), item .get ('description' ),
48- item .get ('keyName' ), item ['prices' ][0 ]['recurringFee' ]])
45+ for block_item in items :
46+ if block_item ['itemCategory' ]['categoryCode' ] == 'storage_tier_level' :
47+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
48+ block_item .get ('keyName' ), block_item ['prices' ][0 ]['recurringFee' ]])
4949 else :
5050 table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'IOPS' )
51- for item in items :
52- if item ['itemCategory' ]['categoryCode' ] == 'storage_tier_level' :
53- table .add_row ([item .get ('id' ), item .get ('description' ),
54- item .get ('keyName' )])
51+ for block_item in items :
52+ if block_item ['itemCategory' ]['categoryCode' ] == 'storage_tier_level' :
53+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
54+ block_item .get ('keyName' )])
5555 table .sortby = 'Id'
5656 table .align = 'l'
5757 return table
@@ -60,17 +60,17 @@ def _block_ios_get_table(items, prices):
6060def _block_storage_table (items , prices ):
6161 if prices :
6262 table = formatting .Table (['Id' , 'Description' , 'KeyName' , 'Capacity Minimum' , 'Prices' ], title = 'Storage' )
63- for item in items :
64- if item ['itemCategory' ]['categoryCode' ] == 'performance_storage_space' :
65- table .add_row ([item .get ('id' ), item .get ('description' ),
66- item .get ('keyName' ), item .get ('capacityMinimum' ) or '-' ,
67- item ['prices' ][0 ]['recurringFee' ]])
63+ for block_item in items :
64+ if block_item ['itemCategory' ]['categoryCode' ] == 'performance_storage_space' :
65+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
66+ block_item .get ('keyName' ), block_item .get ('capacityMinimum' ) or '-' ,
67+ block_item ['prices' ][0 ]['recurringFee' ]])
6868 else :
6969 table = formatting .Table (['Id' , 'Description' , 'KeyName' , 'Capacity Minimum' ], title = 'Storage' )
70- for item in items :
71- if item ['itemCategory' ]['categoryCode' ] == 'performance_storage_space' :
72- table .add_row ([item .get ('id' ), item .get ('description' ),
73- item .get ('keyName' ), item .get ('capacityMinimum' ) or '-' , ])
70+ for block_item in items :
71+ if block_item ['itemCategory' ]['categoryCode' ] == 'performance_storage_space' :
72+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
73+ block_item .get ('keyName' ), block_item .get ('capacityMinimum' ) or '-' , ])
7474 table .sortby = 'Id'
7575 table .align = 'l'
7676 return table
@@ -79,16 +79,16 @@ def _block_storage_table(items, prices):
7979def _block_snapshot_get_table (items , prices ):
8080 if prices :
8181 table = formatting .Table (['Id' , 'Description' , 'KeyName' , 'Prices' ], title = 'Snapshot' )
82- for item in items :
83- if item ['itemCategory' ]['categoryCode' ] == 'storage_snapshot_space' :
84- table .add_row ([item .get ('id' ), item .get ('description' ),
85- item .get ('keyName' ), item ['prices' ][0 ]['recurringFee' ]])
82+ for block_item in items :
83+ if block_item ['itemCategory' ]['categoryCode' ] == 'storage_snapshot_space' :
84+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
85+ block_item .get ('keyName' ), block_item ['prices' ][0 ]['recurringFee' ]])
8686 else :
8787 table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'Snapshot' )
88- for item in items :
89- if item ['itemCategory' ]['categoryCode' ] == 'storage_snapshot_space' :
90- table .add_row ([item .get ('id' ), item .get ('description' ),
91- item .get ('keyName' )])
88+ for block_item in items :
89+ if block_item ['itemCategory' ]['categoryCode' ] == 'storage_snapshot_space' :
90+ table .add_row ([block_item .get ('id' ), block_item .get ('description' ),
91+ block_item .get ('keyName' )])
9292 table .sortby = 'Id'
9393 table .align = 'l'
9494 return table
0 commit comments