6
6
The available commands are:
7
7
list List NAS accounts
9
# :copyright: (c) 2013, SoftLayer Technologies, Inc. All rights reserved.
10
9
# :license: MIT, see LICENSE for more details.
12
11
from SoftLayer.CLI import CLIRunnable, Table, FormattedItem
26
25
def execute(self, args):
27
26
account = self.client['Account']
29
nas = account.getNasNetworkStorage(
28
nas_accounts = account.getNasNetworkStorage(
30
29
mask='eventCount,serviceResource[datacenter.name]')
31
nas = [NestedDict(n) for n in nas]
33
t = Table(['id', 'datacenter', 'size', 'username', 'password',
39
n['serviceResource']['datacenter'].get('name', blank()),
30
nas_accounts = [NestedDict(n) for n in nas_accounts]
32
table = Table(['id', 'datacenter', 'size', 'username', 'password',
35
for nas_account in nas_accounts:
38
nas_account['serviceResource']['datacenter'].get('name',
41
n.get('capacityGb', blank()),
42
"%dGB" % n.get('capacityGb', 0)),
43
n.get('username', blank()),
44
n.get('password', blank()),
45
n.get('serviceResourceBackendIpAddress', blank())])
41
nas_account.get('capacityGb', blank()),
42
"%dGB" % nas_account.get('capacityGb', 0)),
43
nas_account.get('username', blank()),
44
nas_account.get('password', blank()),
45
nas_account.get('serviceResourceBackendIpAddress', blank())])