@@ -24,13 +24,28 @@ def cli(env, prices, location=None):
2424 items = order_manager .get_items (PACKAGE_STORAGE )
2525 datacenters = order_manager .get_regions (PACKAGE_STORAGE , location )
2626
27+ network = SoftLayer .NetworkManager (env .client )
28+
29+ pods = network .get_closed_pods ()
30+
31+ iops_table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'IOPS' )
32+ snapshot_table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'Snapshot' )
33+ storage_table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'Storage' )
2734 tables = []
2835 datacenter_table = formatting .Table (['Id' , 'Description' , 'KeyName' ], title = 'Datacenter' )
2936
3037 for datacenter in datacenters :
38+ closure = []
39+ for pod in pods :
40+ if datacenter ['location' ]['location' ]['name' ] in str (pod ['name' ]):
41+ closure .append (pod ['name' ])
42+
43+ notes = '-'
44+ if len (closure ) > 0 :
45+ notes = 'closed soon: %s' % (', ' .join (closure ))
3146 datacenter_table .add_row ([datacenter ['location' ]['locationId' ],
3247 datacenter .get ('description' ),
33- datacenter ['keyname' ]])
48+ datacenter ['keyname' ], notes ])
3449
3550 tables .append (datacenter_table )
3651 tables .append (_block_ios_get_table (items , prices ))
0 commit comments