Revision 5391d6b5 tools/cloud

b/tools/cloud
45 45

  
46 46
TOKEN = '46e427d657b20defe352804f0eb6f8a2'
47 47

  
48
MARGIN = 14
48 49

  
49 50
commands = {}
50 51

  
......
57 58

  
58 59
def print_addresses(networks):
59 60
    for i, net in enumerate(networks):
60
        key = 'addresses:'.rjust(13) if i == 0 else ' ' * 13
61
        key = 'addresses:'.rjust(MARGIN + 1) if i == 0 else ' ' * (MARGIN + 1)
61 62
        addr = ''
62 63
        if 'values' in net:
63 64
            addr = '[%s]' % ' '.join(ip['addr'] for ip in net['values'])
......
77 78
        elif key == 'servers':
78 79
            val = ', '.join(str(server_id) for server_id in val['values'])
79 80
        if val or show_empty:
80
            print '%s: %s' % (key.rjust(12), val)
81
            print '%s: %s' % (key.rjust(MARGIN), val)
81 82

  
82 83

  
83 84
class Command(object):

Also available in: Unified diff