forked from ungleich-public/cdist
		
	path -> copy
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								06f438f824
							
						
					
				
			
			
				commit
				
					
						0b63919cdd
					
				
			
		
					 2 changed files with 13 additions and 13 deletions
				
			
		
							
								
								
									
										13
									
								
								lib/cdist/copy.py
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								lib/cdist/copy.py
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					    # FIXME: To Copy
 | 
				
			||||||
 | 
					    def transfer_dir(self, source, destination):
 | 
				
			||||||
 | 
					        """Transfer directory and previously delete the remote destination"""
 | 
				
			||||||
 | 
					        self.remove_remote_dir(destination)
 | 
				
			||||||
 | 
					        cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
 | 
				
			||||||
 | 
					            ["-r", source, self.target_host + ":" + destination])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # FIXME: To Copy
 | 
				
			||||||
 | 
					    def transfer_file(self, source, destination):
 | 
				
			||||||
 | 
					        """Transfer file"""
 | 
				
			||||||
 | 
					        cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
 | 
				
			||||||
 | 
					            [source, self.target_host + ":" + destination])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,19 +113,6 @@ class Path:
 | 
				
			||||||
    def remove_remote_dir(self, destination):
 | 
					    def remove_remote_dir(self, destination):
 | 
				
			||||||
        cdist.exec.run_or_fail(["rm", "-rf",  destination], remote_prefix=True)
 | 
					        cdist.exec.run_or_fail(["rm", "-rf",  destination], remote_prefix=True)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # FIXME: To Copy
 | 
					 | 
				
			||||||
    def transfer_dir(self, source, destination):
 | 
					 | 
				
			||||||
        """Transfer directory and previously delete the remote destination"""
 | 
					 | 
				
			||||||
        self.remove_remote_dir(destination)
 | 
					 | 
				
			||||||
        cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
 | 
					 | 
				
			||||||
            ["-r", source, self.target_host + ":" + destination])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # FIXME: To Copy
 | 
					 | 
				
			||||||
    def transfer_file(self, source, destination):
 | 
					 | 
				
			||||||
        """Transfer file"""
 | 
					 | 
				
			||||||
        cdist.exec.run_or_fail(os.environ['__remote_copy'].split() +
 | 
					 | 
				
			||||||
            [source, self.target_host + ":" + destination])
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    # FIXME Move into configinstall
 | 
					    # FIXME Move into configinstall
 | 
				
			||||||
    def transfer_object_parameter(self, cdist_object):
 | 
					    def transfer_object_parameter(self, cdist_object):
 | 
				
			||||||
        """Transfer the object parameter to the remote destination"""
 | 
					        """Transfer the object parameter to the remote destination"""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue