forked from ungleich-public/cdist
implement Object state
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
4f398a834f
commit
022b17d700
1 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,11 @@ class Object(object):
|
|||
|
||||
"""
|
||||
|
||||
# Constants for use with Object.state
|
||||
STATE_PREPARED = "prepared"
|
||||
STATE_RUNNING = "running"
|
||||
STATE_DONE = "done"
|
||||
|
||||
@classmethod
|
||||
def list_objects(cls, object_base_path, type_base_path):
|
||||
"""Return a list of object instances"""
|
||||
|
@ -127,6 +132,7 @@ class Object(object):
|
|||
changed = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "changed"))
|
||||
prepared = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "prepared"))
|
||||
ran = fsproperty.FileBooleanProperty(lambda obj: os.path.join(obj.absolute_path, "ran"))
|
||||
state = fsproperty.FileStringProperty(lambda obj: os.path.join(obj.absolute_path, "state"))
|
||||
source = fsproperty.FileListProperty(lambda obj: os.path.join(obj.absolute_path, "source"))
|
||||
code_local = fsproperty.FileStringProperty(lambda obj: os.path.join(obj.base_path, obj.code_local_path))
|
||||
code_remote = fsproperty.FileStringProperty(lambda obj: os.path.join(obj.base_path, obj.code_remote_path))
|
||||
|
|
Loading…
Reference in a new issue