Skip to content

Commit 0d4bea2

Browse files
caberoscaberos
authored andcommitted
fix the merge conflicts
2 parents f0b41d2 + 0c0c799 commit 0d4bea2

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

SoftLayer/CLI/block/options.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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))

SoftLayer/CLI/file/options.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,27 @@ def cli(env, prices, location=None):
2525
datacenters = order_manager.get_regions(PACKAGE_STORAGE, location)
2626

2727
tables = []
28+
network = SoftLayer.NetworkManager(env.client)
29+
30+
pods = network.get_closed_pods()
31+
32+
iops_table = formatting.Table(['Id', 'Description', 'KeyName'], title='IOPS')
33+
snapshot_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Snapshot')
34+
file_storage_table = formatting.Table(['Id', 'Description', 'KeyName'], title='Storage')
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(_file_ios_get_table(items, prices))

0 commit comments

Comments
 (0)