begin to actually prepare the object/type explorers
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
97ac276433
commit
f31f33418f
1 changed files with 9 additions and 2 deletions
11
bin/cdist
11
bin/cdist
|
@ -187,7 +187,7 @@ class Cdist:
|
||||||
|
|
||||||
return object_paths
|
return object_paths
|
||||||
|
|
||||||
def get_type_from_object(cdist_object):
|
def get_type_from_object(self, cdist_object):
|
||||||
return cdist_object.split(os.sep)[0]
|
return cdist_object.split(os.sep)[0]
|
||||||
|
|
||||||
def list_objects(self, starting_point = False):
|
def list_objects(self, starting_point = False):
|
||||||
|
@ -250,11 +250,13 @@ class Cdist:
|
||||||
self.remote_run_or_fail(cmd, stdout=output_fd)
|
self.remote_run_or_fail(cmd, stdout=output_fd)
|
||||||
output_fd.close()
|
output_fd.close()
|
||||||
|
|
||||||
def run_type_explorer(self, object):
|
def run_type_explorer(self, cdist_object):
|
||||||
"""Run type specific explorers for objects"""
|
"""Run type specific explorers for objects"""
|
||||||
# Based on bin/cdist-object-explorer-run
|
# Based on bin/cdist-object-explorer-run
|
||||||
|
|
||||||
# Transfering explorers for this type
|
# Transfering explorers for this type
|
||||||
|
type = self.get_type_from_object(cdist_object)
|
||||||
|
self.transfer_type_explorers(type)
|
||||||
|
|
||||||
def init_deploy(self):
|
def init_deploy(self):
|
||||||
log.info("Creating clean directory structure")
|
log.info("Creating clean directory structure")
|
||||||
|
@ -295,6 +297,11 @@ class Cdist:
|
||||||
self.run_global_explores()
|
self.run_global_explores()
|
||||||
self.run_initial_manifest()
|
self.run_initial_manifest()
|
||||||
|
|
||||||
|
objects = self.list_objects()
|
||||||
|
|
||||||
|
for cdist_object in objects:
|
||||||
|
self.run_type_explorer(cdist_object)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(description='cdist ' + VERSION)
|
parser = argparse.ArgumentParser(description='cdist ' + VERSION)
|
||||||
|
|
Loading…
Reference in a new issue