Revision 979096dd image_creator/os_type/__init__.py
b/image_creator/os_type/__init__.py | ||
---|---|---|
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
from image_creator.util import output |
|
35 |
|
|
34 | 36 |
import re |
35 |
from clint.textui import indent, puts |
|
36 | 37 |
|
37 | 38 |
|
38 | 39 |
def add_prefix(target): |
... | ... | |
113 | 114 |
def data_cleanup(self): |
114 | 115 |
"""Cleanup sensitive data out of the OS image.""" |
115 | 116 |
|
116 |
puts('Cleaning up sensitive data out of the OS image:')
|
|
117 |
output('Cleaning up sensitive data out of the OS image:')
|
|
117 | 118 |
|
118 | 119 |
is_cleanup = lambda x: x.startswith('data_cleanup_') and \ |
119 | 120 |
callable(getattr(self, x)) |
... | ... | |
122 | 123 |
cnt = 0 |
123 | 124 |
for task in tasks: |
124 | 125 |
cnt += 1 |
125 |
puts(('(%d/%d)' % (cnt, size)).ljust(7), False)
|
|
126 |
output(('(%d/%d)' % (cnt, size)).ljust(7), False)
|
|
126 | 127 |
task() |
127 |
puts()
|
|
128 |
output()
|
|
128 | 129 |
|
129 | 130 |
def sysprep(self): |
130 | 131 |
"""Prepere system for image creation.""" |
131 | 132 |
|
132 |
puts('Preparing system for image creation:')
|
|
133 |
output('Preparing system for image creation:')
|
|
133 | 134 |
|
134 | 135 |
is_sysprep = lambda x: x.startswith('sysprep_') and \ |
135 | 136 |
callable(getattr(self, x)) |
... | ... | |
138 | 139 |
cnt = 0 |
139 | 140 |
for task in tasks: |
140 | 141 |
cnt += 1 |
141 |
puts(('(%d/%d)' % (cnt, size)).ljust(7), False)
|
|
142 |
output(('(%d/%d)' % (cnt, size)).ljust(7), False)
|
|
142 | 143 |
task() |
143 |
puts()
|
|
144 |
output()
|
|
144 | 145 |
|
145 | 146 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
Also available in: Unified diff