diff options
author | Andy Grover <andy@groveronline.com> | 2017-02-07 11:13:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-07 11:13:46 -0800 |
commit | 304f183b1ad2903ad0481680249ab34add9f8b40 (patch) | |
tree | 38361cbfc6f6196215b6615d1c0088875e99902d | |
parent | 2c65d971ab1e77cad6cc637b1cf39148be87dab2 (diff) | |
parent | e54d50d732dd215c4993a6d9843b7529c5d9c4e4 (diff) | |
download | rtslib-fb-304f183b1ad2903ad0481680249ab34add9f8b40.tar.gz |
Merge pull request #87 from apearson-ibm/master
Add ability to invalidate caches
-rw-r--r-- | rtslib/root.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rtslib/root.py b/rtslib/root.py index 6d6b5ee..99a25b7 100644 --- a/rtslib/root.py +++ b/rtslib/root.py @@ -25,7 +25,7 @@ import json from .node import CFSNode from .target import Target from .fabric import FabricModule -from .tcm import so_mapping, StorageObject +from .tcm import so_mapping, bs_cache, StorageObject from .utils import RTSLibError, RTSLibALUANotSupported, modprobe, mount_configfs from .utils import dict_remove, set_attributes from .alua import ALUATargetPortGroup @@ -290,6 +290,12 @@ class RTSRoot(CFSNode): return self.restore(config, clear_existing=clear_existing, abort_on_error=abort_on_error) + def invalidate_caches(self): + ''' + Invalidate any caches used throughout the hierarchy + ''' + bs_cache.clear() + targets = property(_list_targets, doc="Get the list of Target objects.") tpgs = property(_list_tpgs, |