Revision 22a6d232 image_creator/os_type/__init__.py
b/image_creator/os_type/__init__.py | ||
---|---|---|
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 | 34 |
import re |
35 |
from clint.textui import indent, puts |
|
35 | 36 |
|
36 | 37 |
|
37 | 38 |
def add_prefix(target): |
... | ... | |
111 | 112 |
|
112 | 113 |
def data_cleanup(self): |
113 | 114 |
"""Cleanup sensitive data out of the OS image.""" |
114 |
raise NotImplementedError |
|
115 |
|
|
116 |
puts('Cleaning up sensitive data out of the OS image:') |
|
117 |
with indent(4): |
|
118 |
for name in dir(self): |
|
119 |
attr = getattr(self, name) |
|
120 |
if name.startswith('data_cleanup_') and callable(attr): |
|
121 |
attr() |
|
122 |
puts() |
|
115 | 123 |
|
116 | 124 |
def sysprep(self): |
117 | 125 |
"""Prepere system for image creation.""" |
118 |
raise NotImplementedError |
|
126 |
|
|
127 |
puts('Preparing system for image creation:') |
|
128 |
with indent(4): |
|
129 |
for name in dir(self): |
|
130 |
attr = getattr(self, name) |
|
131 |
if name.startswith('sysprep_') and callable(attr): |
|
132 |
attr() |
|
133 |
puts() |
|
119 | 134 |
|
120 | 135 |
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : |
Also available in: Unified diff