Skip to content

Commit 26a3784

Browse files
skraghusudorandom
authored andcommitted
Changes to File volume list and detail commands to display NFS MountPoint for Volumes (#781)
1 parent 1cd8b98 commit 26a3784

7 files changed

Lines changed: 19 additions & 3 deletions

File tree

CONTRIBUTORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Ryan Hanson <ryan@megacosm.net>
2121
Scott Thompson <sthompson@softlayer.com>
2222
Sergio Carlos <carloschilazo@gmail.com>
2323
Shane Poage <spoage@softlayer.com>
24+
Shravan Kumar Raghu <sraghu@us.ibm.com>
2425
simplydave <dgjohns@gmail.com>
2526
SoftLayer <sldn@softlayer.com>
2627
suppandi <suppandi@gmail.com>

SoftLayer/CLI/file/detail.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ def cli(env, volume_id):
5555
file_volume['serviceResourceBackendIpAddress'],
5656
])
5757

58+
if file_volume['fileNetworkMountAddress']:
59+
table.add_row([
60+
'Mount Address',
61+
file_volume['fileNetworkMountAddress'],
62+
])
63+
5864
if file_volume['snapshotCapacityGb']:
5965
table.add_row([
6066
'Snapshot Capacity (GB)',

SoftLayer/CLI/file/list.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
mask="serviceResourceBackendIpAddress"),
2828
column_helper.Column('active_transactions', ('activeTransactionCount',),
2929
mask="activeTransactionCount"),
30+
column_helper.Column('mount_addr', ('fileNetworkMountAddress',),
31+
mask="fileNetworkMountAddress",),
3032
column_helper.Column(
3133
'created_by',
3234
('billingItem', 'orderItem', 'order', 'userRecord', 'username')),
@@ -40,7 +42,8 @@
4042
'capacity_gb',
4143
'bytes_used',
4244
'ip_addr',
43-
'active_transactions'
45+
'active_transactions',
46+
'mount_addr'
4447
]
4548

4649

SoftLayer/fixtures/SoftLayer_Account.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,7 @@
479479
'password': 'pass',
480480
'serviceResourceBackendIpAddress': '127.0.0.1',
481481
'storageType': {'keyName': 'ENDURANCE_STORAGE'},
482+
'fileNetworkMountAddress': '127.0.0.1:/TEST',
482483
}]
483484

484485
getActiveQuotes = [{

SoftLayer/fixtures/SoftLayer_Network_Storage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
}],
3232
'serviceResource': {'datacenter': {'id': 449500, 'name': 'dal05'}},
3333
'serviceResourceBackendIpAddress': '10.1.2.3',
34+
'fileNetworkMountAddress': '127.0.0.1:/TEST',
3435
'serviceResourceName': 'Storage Type 01 Aggregate staaspar0101_pc01',
3536
'username': 'username',
3637
'storageType': {'keyName': 'ENDURANCE_STORAGE'},

SoftLayer/managers/file.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def list_file_volumes(self, datacenter=None, username=None,
3535
'bytesUsed',
3636
'serviceResource.datacenter[name]',
3737
'serviceResourceBackendIpAddress',
38-
'activeTransactionCount'
38+
'activeTransactionCount',
39+
'fileNetworkMountAddress'
3940
]
4041
kwargs['mask'] = ','.join(items)
4142

@@ -81,6 +82,7 @@ def get_file_volume_details(self, volume_id, **kwargs):
8182
'storageType.keyName',
8283
'serviceResource.datacenter[name]',
8384
'serviceResourceBackendIpAddress',
85+
'fileNetworkMountAddress',
8486
'storageTierLevel',
8587
'iops',
8688
'lunId',

tests/CLI/modules/file_tests.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ def test_volume_list(self):
8686
'ip_addr': '127.0.0.1',
8787
'storage_type': 'ENDURANCE',
8888
'username': 'user',
89-
'active_transactions': None
89+
'active_transactions': None,
90+
'mount_addr': '127.0.0.1:/TEST'
9091
}],
9192
json.loads(result.output))
9293

@@ -122,6 +123,7 @@ def test_volume_detail(self):
122123
'Used Space': '0B',
123124
'Endurance Tier': '2 IOPS per GB',
124125
'IOPs': 1000,
126+
'Mount Address': '127.0.0.1:/TEST',
125127
'Snapshot Capacity (GB)': '10',
126128
'Snapshot Used (Bytes)': 1024,
127129
'Capacity (GB)': '20GB',

0 commit comments

Comments
 (0)