diff options
author | Jan Safranek <jsafrane@redhat.com> | 2013-09-02 17:26:31 +0200 |
---|---|---|
committer | Jan Safranek <jsafrane@redhat.com> | 2013-09-03 08:46:30 +0200 |
commit | 8fdae437fa918e4c6944d0ffa55a90c7a62b4dec (patch) | |
tree | 6a20381bde775586bb05528d1d94cf75eac75ecb /commands/storage/lmi | |
parent | 588a3b83a9539eae2c57e92a445292a0d7eb17c7 (diff) | |
download | openlmi-scripts-8fdae437fa918e4c6944d0ffa55a90c7a62b4dec.tar.gz openlmi-scripts-8fdae437fa918e4c6944d0ffa55a90c7a62b4dec.tar.xz openlmi-scripts-8fdae437fa918e4c6944d0ffa55a90c7a62b4dec.zip |
Skip CIM_Memory devices, they don't represent storage.
DMTF defines CIM_Memory as subclass of CIM_StorageExtent, but we should not
show it as storage device.
Diffstat (limited to 'commands/storage/lmi')
-rw-r--r-- | commands/storage/lmi/scripts/storage/common.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/commands/storage/lmi/scripts/storage/common.py b/commands/storage/lmi/scripts/storage/common.py index 367f6ef..d0fb5f5 100644 --- a/commands/storage/lmi/scripts/storage/common.py +++ b/commands/storage/lmi/scripts/storage/common.py @@ -280,6 +280,11 @@ def get_devices(ns, devices=None): else: LOG().debug("get_devices: Loading list of all devices.") for dev in ns.CIM_StorageExtent.instances(): + if lmi_isinstance(dev, ns.CIM_Memory): + # Skip memory devices, they inherit from CIM_StorageExtent too + LOG().debug("get_devices: Skipping memory device %s" + % dev.DeviceID) + continue yield dev def get_parents(ns, obj, deep=False): |