forked from ungleich-public/cdist
		
	implement transfer_object_parameters
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								841b54c6d0
							
						
					
				
			
			
				commit
				
					
						48ae37e832
					
				
			
		
					 1 changed files with 9 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -74,7 +74,8 @@ class Explorer(object):
 | 
			
		|||
            '__explorer': self.remote.global_explorer_path,
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
    # FIXME: should i do this?
 | 
			
		||||
    ### global
 | 
			
		||||
 | 
			
		||||
    def transfer_global_explorers(self):
 | 
			
		||||
        """Transfer the global explorers to the remote side."""
 | 
			
		||||
        self.remote.mkdir(self.remote.global_explorer_path)
 | 
			
		||||
| 
						 | 
				
			
			@ -85,7 +86,8 @@ class Explorer(object):
 | 
			
		|||
        script = os.path.join(self.remote.global_explorer_path, explorer)
 | 
			
		||||
        return self.remote.run_script(script, env=self.env)
 | 
			
		||||
 | 
			
		||||
    # FIXME: should i do this?
 | 
			
		||||
    ### type
 | 
			
		||||
 | 
			
		||||
    def transfer_type_explorers(self, cdist_type):
 | 
			
		||||
        """Transfer the type explorers for the given type to the remote side."""
 | 
			
		||||
        source = os.path.join(self.local.type_path, cdist_type.explorer_path)
 | 
			
		||||
| 
						 | 
				
			
			@ -93,9 +95,12 @@ class Explorer(object):
 | 
			
		|||
        self.remote.mkdir(destination)
 | 
			
		||||
        self.remote.transfer(source, destination)
 | 
			
		||||
 | 
			
		||||
    # FIXME: should i do this? probably not
 | 
			
		||||
    def transfer_object_parameters(self, cdist_object):
 | 
			
		||||
        pass
 | 
			
		||||
        """Transfer the parameters for the given object to the remote side."""
 | 
			
		||||
        source = os.path.join(self.local.object_path, cdist_object.parameter_path)
 | 
			
		||||
        destination = os.path.join(self.remotei.object_path, cdist_object.parameter_path)
 | 
			
		||||
        self.remote.mkdir(destination)
 | 
			
		||||
        self.remote.transfer(source, destination)
 | 
			
		||||
 | 
			
		||||
    def run_type_explorer(self, explorer, cdist_object):
 | 
			
		||||
        """Run the given type explorer for the given object and return it's output."""
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue