begin run_object_gencode() and import missing FIXME bits deploy_to()
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								f5c2ae3049
							
						
					
				
			
			
				commit
				
					
						74c280911b
					
				
			
		
					 1 changed files with 28 additions and 0 deletions
				
			
		
							
								
								
									
										28
									
								
								bin/cdist
									
										
									
									
									
								
							
							
						
						
									
										28
									
								
								bin/cdist
									
										
									
									
									
								
							| 
						 | 
					@ -429,6 +429,23 @@ class Cdist:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      self.shell_run_or_debug_fail(manifest, [manifest], env=env)
 | 
					      self.shell_run_or_debug_fail(manifest, [manifest], env=env)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   def run_object_gencode(self, cdist_object):
 | 
				
			||||||
 | 
					      """Run the gencode scripts for the object"""
 | 
				
			||||||
 | 
					      log.info("Running manifest %s, env=%s", manifest, extra_env)
 | 
				
			||||||
 | 
					      env = os.environ.copy()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      env['__target_host']    = self.target_host
 | 
				
			||||||
 | 
					      env['__global']         = self.out_dir
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # FIXME: if -local, -remote...
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # Other environment stuff
 | 
				
			||||||
 | 
					      if extra_env:
 | 
				
			||||||
 | 
					         env.update(extra_env)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      self.shell_run_or_debug_fail(manifest, [manifest], env=env)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   def deploy_to(self):
 | 
					   def deploy_to(self):
 | 
				
			||||||
      """Mimic the old deploy to: Deploy to one host"""
 | 
					      """Mimic the old deploy to: Deploy to one host"""
 | 
				
			||||||
| 
						 | 
					@ -451,6 +468,17 @@ class Cdist:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
         objects = self.list_objects()
 | 
					         objects = self.list_objects()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      # Now do the final steps over the existing objects
 | 
				
			||||||
 | 
					      for cdist_object in objects:
 | 
				
			||||||
 | 
					         # FIXME: Check requirements and execute those before
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         # FIXME: to be implemented
 | 
				
			||||||
 | 
					         # cdist-object-gencode-run   "$__cdist_target_host" "$__cdist_object_self"
 | 
				
			||||||
 | 
					         # cdist-object-code-run      "$__cdist_target_host" "$__cdist_object_self"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         self.run_type_explorer(cdist_object)
 | 
				
			||||||
 | 
					         self.run_type_manifest(cdist_object)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == "__main__":
 | 
					if __name__ == "__main__":
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue