src/openlmi/storage/LMI_AttachedFileSystem.py
(Diff revision 1)
|
|
|
57 |
uuid = fs['Name'] |
|
|
58 |
# strip prefix 'UUID=' string |
|
|
59 |
uuid = uuid[len('UUID='):] |
|
|
60 |
d = self.storage.devicetree.getDeviceByUuid(uuid) |
|
|
61 |
if d is None or d.path != spec: |
|
|
62 |
raise pywbem.CIMError(pywbem.CIM_ERR_FAILED, "No device with such uuid: " + uuid) |
Use:
provider = self.provider_manager.get_provider_for_format_name
(device, fmt) = provider.get_format_for_name()
d.path != spec is not that easy these days.
There can be various 'devicespecs' in /etc/fstab instead of device name, e.g. 'LABEL=xyz' or 'UUID=abc'. Also, alternative device names can be used (/dev/disk/by-id/uvw).
Keep it in mind for fstab handling.
again, use provider_manager && FormatProvider
These lines should be removed, we use cimom_entry.py as the entry point from CIMOM
- Jan
On April 8th, 2013, 3:23 p.m. CEST, Jan Synacek wrote:
Review request for OpenLMI Developers.
By Jan Synacek.
Updated April 8, 2013, 3:23 p.m.
Repository:
openlmi-storage
Description
Add LMI_AttachedFileSystem.
|
Diffs
- mof/LMI_Storage.reg (36b149a8f52aef299ee4efff35217c72218a0ae2)
- src/openlmi/storage/LMI_AttachedFileSystem.py (PRE-CREATION)
- src/openlmi/storage/MountingProvider.py (PRE-CREATION)
- src/openlmi/storage/cimom_entry.py (d5d2e5274aff95395b5bdbc709af3f3337ae11e1)
View Diff
|