devices: add clone method
Copy DeviceAssignment object
This commit is contained in:
		
							parent
							
								
									b4ad5f0149
								
							
						
					
					
						commit
						8533ec9773
					
				| @ -80,6 +80,17 @@ class DeviceAssignment(object): # pylint: disable=too-few-public-methods | ||||
|         return self.backend_domain == other.backend_domain \ | ||||
|            and self.ident == other.ident | ||||
| 
 | ||||
|     def clone(self): | ||||
|         '''Clone object instance''' | ||||
|         return self.__class__( | ||||
|             self.backend_domain, | ||||
|             self.ident, | ||||
|             self.options, | ||||
|             self.persistent, | ||||
|             self.frontend_domain | ||||
|         ) | ||||
| 
 | ||||
| 
 | ||||
| class DeviceCollection(object): | ||||
|     '''Bag for devices. | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Marek Marczykowski-Górecki
						Marek Marczykowski-Górecki