diff options
Diffstat (limited to 'rtslib/root.py')
-rw-r--r-- | rtslib/root.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rtslib/root.py b/rtslib/root.py index d558445..13d7f2a 100644 --- a/rtslib/root.py +++ b/rtslib/root.py @@ -28,7 +28,7 @@ from fabric import FabricModule from tcm import (StorageObject, FileIOStorageObject, BlockStorageObject, PSCSIStorageObject, RDMCPStorageObject) from utils import RTSLibError, RTSLibBrokenLink, modprobe, mount_configfs -from utils import dict_remove, set_attributes +from utils import dict_remove, set_attributes, locked storageobjects = dict( fileio=FileIOStorageObject, @@ -126,6 +126,7 @@ class RTSRoot(CFSNode): # RTSRoot public stuff + @locked def dump(self): ''' Returns a dict representing the complete state of the target @@ -140,6 +141,7 @@ class RTSRoot(CFSNode): if f.discovery_enable_auth] return d + @locked def clear_existing(self, confirm=False): ''' Remove entire current configuration. @@ -155,6 +157,7 @@ class RTSRoot(CFSNode): for so in self.storage_objects: so.delete() + @locked def restore(self, config, clear_existing=False, abort_on_error=False): ''' Takes a dict generated by dump() and reconfigures the target to match. |