projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
2e50092
)
Add sysprep_info method in os_type classes
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Wed, 20 Jun 2012 13:28:52 +0000
(16:28 +0300)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Wed, 20 Jun 2012 13:28:52 +0000
(16:28 +0300)
This method takes a sysprep object as argument and returns the name
and a description for this object.
image_creator/os_type/__init__.py
patch
|
blob
|
history
diff --git
a/image_creator/os_type/__init__.py
b/image_creator/os_type/__init__.py
index
e1481d1
..
a48a370
100644
(file)
--- a/
image_creator/os_type/__init__.py
+++ b/
image_creator/os_type/__init__.py
@@
-92,6
+92,11
@@
class OSBase(object):
return [x for x in objs if self._is_sysprep(x)]
+ def sysprep_info(self, obj):
+ assert self._is_sysprep(obj), "Object is not a sysprep"
+
+ return (obj.__name__.replace('_', '-'), textwrap.dedent(obj.__doc__))
+
def _sysprep_change_status(self, name, status):
error_msg = "Syprep operation %s does not exist for %s" % \