Revision 84e110aa lib/client/gnt_network.py
b/lib/client/gnt_network.py | ||
---|---|---|
24 | 24 |
# W0401: Wildcard import ganeti.cli |
25 | 25 |
# W0614: Unused import %s from wildcard import (since we need cli) |
26 | 26 |
|
27 |
import textwrap |
|
28 |
|
|
27 | 29 |
from ganeti.cli import * |
28 | 30 |
from ganeti import constants |
29 | 31 |
from ganeti import opcodes |
30 | 32 |
from ganeti import utils |
31 | 33 |
from ganeti import errors |
32 |
from textwrap import wrap |
|
33 | 34 |
|
34 | 35 |
|
35 | 36 |
#: default list of fields for L{ListNetworks} |
... | ... | |
215 | 216 |
100 * float(free_count) / float(size)) |
216 | 217 |
ToStdout(" Usage map:") |
217 | 218 |
idx = 0 |
218 |
for line in wrap(mapping, width=64): |
|
219 |
for line in textwrap.wrap(mapping, width=64):
|
|
219 | 220 |
ToStdout(" %s %s %d", str(idx).rjust(3), line.ljust(64), idx + 63) |
220 | 221 |
idx += 64 |
221 | 222 |
ToStdout(" (X) used (.) free") |
222 | 223 |
|
223 | 224 |
if ext_res: |
224 | 225 |
ToStdout(" externally reserved IPs:") |
225 |
for line in wrap(ext_res, width=64): |
|
226 |
for line in textwrap.wrap(ext_res, width=64):
|
|
226 | 227 |
ToStdout(" %s" % line) |
227 | 228 |
|
228 | 229 |
if group_list: |
Also available in: Unified diff