From 34f2999e146aa10ca72dc72a9c4d8c3621c756e9 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 12:59:29 +0200 Subject: [PATCH 01/10] Type: implement manifest_path Signed-off-by: Steven Armstrong --- lib/cdist/core/type.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/cdist/core/type.py b/lib/cdist/core/type.py index 7856c92f..36f6c276 100644 --- a/lib/cdist/core/type.py +++ b/lib/cdist/core/type.py @@ -70,11 +70,6 @@ class Type(object): except KeyError as e: raise cdist.MissingEnvironmentVariableError(e.args[0]) - # FIXME: probably wrong place for this - @property - def remote_explorer_dir(self): - return os.path.join(self.remote_path, "explorer") - @classmethod def list_types(cls): """Return a list of type instances""" @@ -112,6 +107,15 @@ class Type(object): self.name ) + # FIXME: probably wrong place for this + @property + def remote_explorer_dir(self): + return os.path.join(self.remote_path, "explorer") + + @property + def manifest_path(self): + return os.path.join(self.path, "manifest") + @property def is_singleton(self): """Check whether a type is a singleton.""" From d3ae8b7c9017d49ff81ae9d3d969f3753809f34b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 12:59:53 +0200 Subject: [PATCH 02/10] --todo Signed-off-by: Steven Armstrong --- doc/dev/todo/steven | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven index a2a4740e..d35565eb 100644 --- a/doc/dev/todo/steven +++ b/doc/dev/todo/steven @@ -10,7 +10,6 @@ Object: Type: - type.manifest_path GlobalExplorer: From 4f33e5222dda3bb2477281b613277ac3214172d0 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:04:00 +0200 Subject: [PATCH 03/10] Type: implement gencode, gencode_remote Signed-off-by: Steven Armstrong --- lib/cdist/core/type.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/cdist/core/type.py b/lib/cdist/core/type.py index 36f6c276..f679bb04 100644 --- a/lib/cdist/core/type.py +++ b/lib/cdist/core/type.py @@ -116,6 +116,14 @@ class Type(object): def manifest_path(self): return os.path.join(self.path, "manifest") + @property + def gencode(self): + return os.path.join(self.path, "gencode-local") + + @property + def gencode_remote(self): + return os.path.join(self.path, "gencode-remote") + @property def is_singleton(self): """Check whether a type is a singleton.""" From 9482f9ef439aabffe2640a1a5eaec37ab1d0aea7 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:05:06 +0200 Subject: [PATCH 04/10] --todo Signed-off-by: Steven Armstrong --- doc/dev/todo/steven | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven index d35565eb..0bf8aed1 100644 --- a/doc/dev/todo/steven +++ b/doc/dev/todo/steven @@ -1,10 +1,6 @@ Object: code_remote code - gencode - gencode_remote - - path_remote explorer_out_dir From 3ef97980987bd113ad618bc31dcd14212bfa74a9 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:06:56 +0200 Subject: [PATCH 05/10] implement code, code_remote Signed-off-by: Steven Armstrong --- lib/cdist/core/object.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/core/object.py b/lib/cdist/core/object.py index 85822a24..65abc012 100644 --- a/lib/cdist/core/object.py +++ b/lib/cdist/core/object.py @@ -108,6 +108,13 @@ class Object(object): DOT_CDIST ) + @property + def code(self): + return os.path.join(self.path, "code-local") + + @property + def code_remote(self): + return os.path.join(self.path, "code-remote") ### requirements @property From 36803d16dbaccc689bdb2d16adc1cedcdb3e619e Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:07:13 +0200 Subject: [PATCH 06/10] --todo Signed-off-by: Steven Armstrong --- doc/dev/todo/steven | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven index 0bf8aed1..144c4150 100644 --- a/doc/dev/todo/steven +++ b/doc/dev/todo/steven @@ -1,6 +1,4 @@ Object: - code_remote - code explorer_out_dir From 6e011dc289c4545c4d078f3dec86b3f038a45295 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:15:11 +0200 Subject: [PATCH 07/10] implement explorer_out_dir Signed-off-by: Steven Armstrong --- lib/cdist/core/object.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/cdist/core/object.py b/lib/cdist/core/object.py index 65abc012..e224a18f 100644 --- a/lib/cdist/core/object.py +++ b/lib/cdist/core/object.py @@ -116,6 +116,13 @@ class Object(object): def code_remote(self): return os.path.join(self.path, "code-remote") + @property + def explorer_out_dir(self): + path = os.path.join(self.path, "explorer") + if not os.path.isdir(path): + os.mkdir(path) + return path + ### requirements @property def requirements(self): From d36ab75b1a38066b7195b47685997827e76a874b Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:15:23 +0200 Subject: [PATCH 08/10] --todo Signed-off-by: Steven Armstrong --- doc/dev/todo/steven | 2 -- 1 file changed, 2 deletions(-) diff --git a/doc/dev/todo/steven b/doc/dev/todo/steven index 144c4150..262255d7 100644 --- a/doc/dev/todo/steven +++ b/doc/dev/todo/steven @@ -1,7 +1,5 @@ Object: - explorer_out_dir - Type: From d9f86e26d96afd6adcc6115bd01e3be13a8a6795 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:15:52 +0200 Subject: [PATCH 09/10] consistent naming Signed-off-by: Steven Armstrong --- lib/cdist/core/object.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cdist/core/object.py b/lib/cdist/core/object.py index e224a18f..c47fc905 100644 --- a/lib/cdist/core/object.py +++ b/lib/cdist/core/object.py @@ -109,7 +109,7 @@ class Object(object): ) @property - def code(self): + def code_local(self): return os.path.join(self.path, "code-local") @property From 4db02516e7952d6ab3219d1beb84b4db7f7a6c3d Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Fri, 7 Oct 2011 13:16:14 +0200 Subject: [PATCH 10/10] consistent naming Signed-off-by: Steven Armstrong --- lib/cdist/core/type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cdist/core/type.py b/lib/cdist/core/type.py index f679bb04..8439464e 100644 --- a/lib/cdist/core/type.py +++ b/lib/cdist/core/type.py @@ -117,7 +117,7 @@ class Type(object): return os.path.join(self.path, "manifest") @property - def gencode(self): + def gencode_local(self): return os.path.join(self.path, "gencode-local") @property