diff --git a/SoftLayer/CLI/block/detail.py b/SoftLayer/CLI/block/detail.py index cf283a7b3..1328c3fc8 100644 --- a/SoftLayer/CLI/block/detail.py +++ b/SoftLayer/CLI/block/detail.py @@ -80,10 +80,10 @@ def cli(env, volume_id): table.add_row(['Replication Status', "%s" % block_volume['replicationStatus']]) - replicant_list = [] for replicant in block_volume['replicationPartners']: - replicant_table = formatting.Table(['Replicant ID', - replicant['id']]) + replicant_table = formatting.Table(['Name', + 'Value']) + replicant_table.add_row(['Replicant Id', replicant['id']]) replicant_table.add_row([ 'Volume Name', utils.lookup(replicant, 'username')]) @@ -98,8 +98,7 @@ def cli(env, volume_id): 'Schedule', utils.lookup(replicant, 'replicationSchedule', 'type', 'keyname')]) - replicant_list.append(replicant_table) - table.add_row(['Replicant Volumes', replicant_list]) + table.add_row(['Replicant Volumes', replicant_table]) if block_volume.get('originalVolumeSize'): original_volume_info = formatting.Table(['Property', 'Value']) diff --git a/tests/CLI/modules/block_tests.py b/tests/CLI/modules/block_tests.py index 5b082b701..aba9e592e 100644 --- a/tests/CLI/modules/block_tests.py +++ b/tests/CLI/modules/block_tests.py @@ -67,7 +67,7 @@ def test_volume_detail(self): 'LUN Id': '2', 'Notes': "{'status': 'available'}", 'Endurance Tier': 'READHEAVY_TIER', - 'IOPs': 1000, + 'IOPs': 1000.0, 'Snapshot Capacity (GB)': '10', 'Snapshot Used (Bytes)': 1024, 'Capacity (GB)': '20GB', @@ -80,17 +80,12 @@ def test_volume_detail(self): 'Replicant Count': '1', 'Replication Status': 'Replicant Volume Provisioning ' 'has completed.', - 'Replicant Volumes': [[ - {'Replicant ID': 'Volume Name', '1784': 'TEST_REP_1'}, - {'Replicant ID': 'Target IP', '1784': '10.3.174.79'}, - {'Replicant ID': 'Data Center', '1784': 'wdc01'}, - {'Replicant ID': 'Schedule', '1784': 'REPLICATION_HOURLY'}, - ], [ - {'Replicant ID': 'Volume Name', '1785': 'TEST_REP_2'}, - {'Replicant ID': 'Target IP', '1785': '10.3.177.84'}, - {'Replicant ID': 'Data Center', '1785': 'dal01'}, - {'Replicant ID': 'Schedule', '1785': 'REPLICATION_DAILY'}, - ]], + 'Replicant Volumes': [ + {'Name': 'Replicant Id', 'Value': 1785}, + {'Name': 'Volume Name', 'Value': 'TEST_REP_2'}, + {'Name': 'Target IP', 'Value': '10.3.177.84'}, + {'Name': 'Data Center', 'Value': 'dal01'}, + {'Name': 'Schedule', 'Value': 'REPLICATION_DAILY'}], 'Original Volume Properties': [ {'Property': 'Original Volume Size', 'Value': '20'},