From: Alois M. <am...@re...> - 2014-06-06 12:43:29
|
Hi, I can't find anywhere description of this (and other) CIM properties. On a RHEL6 testing machine, I installed tog-pegasus, sblim-cmpi-fsvol and sblim-wbemcli. Then I mounted a loop device, created logical volume on it using LVM, and formatted it as ext3 and mounted. All wass fine: I verified that I can read and write to the filesystem. But I don't really understand what CMPI tells me: # wbemcli ei -nl 'http://u:p@here/root/cimv2:CIM_FileSystem' localhost:5988/root/cimv2:Linux_Ext3FileSystem.CSCreationClassName ="Linux_ComputerSystem",CSName="here",CreationClassName="Linux_Ext 3FileSystem",Name="UUID=2bb434d1-c3cf-477d-91fb-727079c928a6" -InstanceID= -Caption="Ext3 local file system" -Description="Represents the file store controlled by a ComputerSystem through local means." -ElementName="/root/aaa" -InstallDate= -OperationalStatus= -StatusDescriptions= -Status="OK" -HealthState= -CommunicationStatus= -DetailedStatus= -OperatingStatus= -PrimaryStatus= -EnabledState=3 -OtherEnabledState="NULL" -RequestedState=3 -EnabledDefault=2 -TimeOfLastStateChange= -AvailableRequestedStates= -TransitioningToState=12 -CSCreationClassName="Linux_ComputerSystem" -CSName="here" -CreationClassName="Linux_Ext3FileSystem" -Name="UUID=2bb434d1-c3cf-477d-91fb-727079c928a6" -Root="/root/aaa" -BlockSize=1024 -FileSystemSize=81230848 -AvailableSpace=71237632 -ReadOnly=FALSE -EncryptionMethod= -CompressionMethod= -CaseSensitive= -CasePreserved= -CodeSet= -MaxFileNameLength=255 -ClusterSize= -FileSystemType="ext3" -PersistenceType= -OtherPersistenceType= -NumberOfFiles= -FreeInodes= -TotalInodes= -FSReservedCapacity= -PercentageSpaceUse=7 # Most of the fields are somewhat self-descriptive, but others are not. For example, value 3 of EnabledState does not tell me anything useful. Other filesystems from the above have EnabledState=2 ... /me shruggs... ~ So: What do possible values here mean? I tried to grep for EnabledState through sblim-cmpi-fsvol codebase, through CIM MOF scheme and even google, but was not successful. Or generally, where should I search for the description / documentation for <a_random_cim/cmpi_element>? Thanks, aL. P.S.: # rpm -qa sblim\* tog-pegasus sblim-wbemcli-1.6.1-2.el6.x86_64 sblim-cmpi-base-1.6.1-1.el6.x86_64 tog-pegasus-2.12.0-3.el6_4.x86_64 sblim-cmpi-fsvol-1.5.1-2.el6.x86_64 -- Alois Mahdal <am...@re...> Platform QE Engineer at Red Hat, Inc. #brno, #daemons, #openlmi |
From: Klaus K. <kk...@su...> - 2014-06-06 14:43:24
|
* Alois Mahdal <am...@re...> [Jun 06. 2014 14:43]: > Hi, > > I can't find anywhere description of this (and other) CIM > properties. > Alois, CIM is an object oriented information model and makes heavy use of inheritance. Look at the definition of CIM_FileSystem[1] and follow the ancestor chain until you find the definition of EnabledState. You will find EnabledState in CIM_EnabledLogicalElement with "ValueMap" and "Values" qualifiers. These qualifiers provide a mapping from numeric to textual values. The value '2' for EnabledState maps to 'Enabled'. Hth, Klaus [1] Yawn (http://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN) is a nice tool to view the CIM model -- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany |
From: Dave H. <hel...@li...> - 2014-06-06 17:38:46
|
On 06/06/2014 10:43 AM, Klaus Kaempf wrote: > * Alois Mahdal <am...@re...> [Jun 06. 2014 14:43]: >> Hi, >> >> I can't find anywhere description of this (and other) CIM >> properties. >> > > Alois, > > CIM is an object oriented information model and makes heavy use of > inheritance. Look at the definition of CIM_FileSystem[1] and follow the > ancestor chain until you find the definition of EnabledState. > > You will find EnabledState in CIM_EnabledLogicalElement with > "ValueMap" and "Values" qualifiers. These qualifiers provide a mapping > from numeric to textual values. The value '2' for EnabledState maps to > 'Enabled'. > > Hth, > > Klaus > > [1] Yawn > (http://sourceforge.net/apps/mediawiki/pywbem/index.php?title=YAWN) is > a nice tool to view the CIM model > In general, the description of a property can be found in the property's Description Qualifier, in the CIM class in which the property is defined. As Klaus says, CIM makes use of inheritance, so when a class contains a property it's not obvious if the property was defined in the child class or one of the parent classes. One way to find out is to check the MOF file for the class, which is normally found on the CIMOM where the class, and hence, the class' provider, is registered. (the MOF should be packaged with the provider src code as well) To follow your example of Linux_Ext3FileSystem from cmpi-fsvol, on a system running SFCB (since I'm more familiar with it rather than OP ;-), you can search the MOF files for the class in question: [root@cimom ~]# find /usr/local/var/lib/sfcb/stage/ -name \*.mof -exec grep -A4 -H 'class Linux_Ext3FileSystem ' {} \; /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Fsvol.mof:class Linux_Ext3FileSystem : CIM_UnixLocalFileSystem /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Fsvol.mof-{ /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Fsvol.mof- uint8 PercentageSpaceUse; /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Fsvol.mof-}; /usr/local/var/lib/sfcb/stage/mofs/root/cimv2/Linux_Fsvol.mof- Not much defined here. The parent class is CIM_UnixLocalFileSystem. But this isn't one of the fsvol classes, it's a CIM base class. So we won't find it in the fsvol MOFs... [root@cimom ~]# find /usr/local/var/lib/sfcb/stage/ -name \*.mof -exec grep -A4 -H 'class CIM_UnixLocalFileSystem ' {} \; but rather in the MOFs for the CIM base schema. SFCB downloads the schema definition from: http://dmtf.org/sites/default/files/cim/cim_schema_v2350/cim_schema_2.35.0Final-MOFs.zip and unpacks it locally here: [root@cimom ~]# find /usr/local/share/sfcb/CIM/ -name \*.mof -exec grep -A4 -iH 'class CIM_UnixLocalFileSystem ' {} \; /usr/local/share/sfcb/CIM/System/CIM_UnixLocalFileSystem.mof:class CIM_UnixLocalFileSystem : CIM_LocalFileSystem { /usr/local/share/sfcb/CIM/System/CIM_UnixLocalFileSystem.mof- /usr/local/share/sfcb/CIM/System/CIM_UnixLocalFileSystem.mof- [Description ( /usr/local/share/sfcb/CIM/System/CIM_UnixLocalFileSystem.mof- "The number of free inodes present in the file system. " /usr/local/share/sfcb/CIM/System/CIM_UnixLocalFileSystem.mof- "This value is only valid if TotalSlots is non-zero." ), [root@cimom ~]# find /usr/local/share/sfcb/CIM/ -name \*.mof -exec grep -A4 -iH 'class CIM_LocalFileSystem ' {} \; /usr/local/share/sfcb/CIM/System/CIM_LocalFileSystem.mof:class CIM_LocalFileSystem : CIM_FileSystem { /usr/local/share/sfcb/CIM/System/CIM_LocalFileSystem.mof- /usr/local/share/sfcb/CIM/System/CIM_LocalFileSystem.mof- /usr/local/share/sfcb/CIM/System/CIM_LocalFileSystem.mof-}; [root@cimom ~]# find /usr/local/share/sfcb/CIM/ -name \*.mof -exec grep -A4 -iH 'class CIM_FileSystem ' {} \; /usr/local/share/sfcb/CIM/System/CIM_FileSystem.mof:class CIM_FileSystem : CIM_EnabledLogicalElement { /usr/local/share/sfcb/CIM/System/CIM_FileSystem.mof- /usr/local/share/sfcb/CIM/System/CIM_FileSystem.mof- [Key, Description ( /usr/local/share/sfcb/CIM/System/CIM_FileSystem.mof- "The scoping System\'s CreationClassName. Note that this " /usr/local/share/sfcb/CIM/System/CIM_FileSystem.mof- "class was originally defined in the scope of a " [root@cimom ~]# find /usr/local/share/sfcb/CIM/ -name \*.mof -exec grep -A4 -iH 'class CIM_EnabledLogicalElement ' {} \; /usr/local/share/sfcb/CIM/Core/CIM_EnabledLogicalElement.mof:class CIM_EnabledLogicalElement : CIM_LogicalElement { /usr/local/share/sfcb/CIM/Core/CIM_EnabledLogicalElement.mof- /usr/local/share/sfcb/CIM/Core/CIM_EnabledLogicalElement.mof- [Description ( /usr/local/share/sfcb/CIM/Core/CIM_EnabledLogicalElement.mof- "EnabledState is an integer enumeration that indicates " /usr/local/share/sfcb/CIM/Core/CIM_EnabledLogicalElement.mof- "the enabled and disabled states of an element. It can " So we follow the inheritance chain all the way back to CIM_EnabledLogicalElement, where the EnabledState property is actually defined. Of course, we check each MOF file along the way to see if the property is defined (or overridden) in that file. In this case we find it in CIM_EnabledLogicalElement.mof: class CIM_EnabledLogicalElement : CIM_LogicalElement { [Description ( "EnabledState is an integer enumeration that indicates " "the enabled and disabled states of an element. It can " "also indicate the transitions between these requested " ... "Starting (10) indicates that the element is in the " "process of going to an Enabled state. New requests are " "queued." ), ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11..32767", "32768..65535" }, Values { "Unknown", "Other", "Enabled", "Disabled", "Shutting Down", "Not Applicable", "Enabled but Offline", "In Test", "Deferred", "Quiesce", "Starting", "DMTF Reserved", "Vendor Reserved" }, ModelCorrespondence { "CIM_EnabledLogicalElement.OtherEnabledState" }] uint16 EnabledState = 5; Another, easier way is to use the CIM GetClass call. This causes the CIMOM to walk the inheritance chain for you and report all properties with qualifiers, regardless of where the property is define. Using cimcli: $ cimcli -l localhost -n root/cimv2 gc Linux_Ext3FileSystem Unfortunately wbemcli does not show the qualifier information by default but you can get it by adding the -dx option, which dumps the full CIM-XML response to stderr, and the Description qualifier may be seen there: $ wbemcli -dx gc http://localhost/root/cimv2:Linux_Ext4FileSystem Dave H. |
From: Alois M. <am...@re...> - 2014-06-10 11:12:35
|
> On Fri, 06 Jun 2014 13:38:33 -0400 > Dave Heller <hel...@li...> wrote: [...] > On 06/06/2014 10:43 AM, Klaus Kaempf wrote: [...] Thank you guys, you have been very helpful! aL. -- Alois Mahdal <am...@re...> Platform QE Engineer at Red Hat, Inc. #brno, #daemons, #openlmi |