.. _dmtf_profiles: DMTF profiles ============= OpenLMI Software providers implement two *DMTF* profiles: * `Software Inventory Profile`_ * `Software Update Profile`_ .. _software_inventory_profile: Software Inventory Profile -------------------------- Implemented *DMTF* version: ``1.0.1`` Described by `DSP1023`_ The Software Inventory Profile describes the CIM schema elements required to provide an inventory of installed BIOS, firmware, drivers, and related software in a managed system. This profile also describes the CIM schema elements required to represent the software that can be installed on a managed system. Not implemented optional features ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This implementation does not support: Representing a Software Bundle Software bundle is represented by LMI_SoftwareIndentity instance having ``"Software Bundle"`` value present in its ``Classifications`` property. It shall prepresent software groups. It extends the profile for subclasses of ``CIM_OrderedComponent``. Representing Installation Dependencies Dependencies between software packages are also unimplemented. This also extends the profile for subclasses of ``CIM_OrderedDependency`` referencing :ref:`CIM-SoftwareIdentity` instances. Deviations ~~~~~~~~~~ Version Comparison ^^^^^^^^^^^^^^^^^^ Version comparison is based on different approach than in *Software Inventory Profile* where the following properties are present to uniquely specify package version: * ``uint16`` :ref:`MajorVersion` * ``uint16`` :ref:`MinorVersion` * ``uint16`` :ref:`RevisionNumber` * ``uint16`` :ref:`BuildNumber` And also a :ref:`VersionString` property which is a composition of previous ones separed with dots. Unfortunately versioning of RPM packages is incompatible with this scheme. Version of RPM package is composed of following properties: .. _version_properties: * ``uint32`` :ref:`Epoch` * ``string`` :ref:`Version` * ``string`` :ref:`Release` Where ``Version`` and ``Release`` can contain arbitrary set of characters [1]_. These attributes were added to ``LMI_SoftwareIdentity`` class and will be filled for every RPM package. On the other hand ``MajorVersion``, ``MinorVersion``, ``RevisionNumber`` and ``BuildNumber`` will not be filled. This implementetion composes ``VersionString`` in following way: :: :-. The algorithm for comparing two RPM packages version is following: 1. Compare the ``Epoch`` (which is a number) of both packages. The one with higher epoch is newer. If they match, continue to point 2. 2. Compare their ``Version`` attributes with `rpmvercmp`_ algorithm. Package with larger ``Version`` (according to `rpmvercmp`_) is newer. If they match, continue to point 3. 3. Compare their ``Release`` attributes with `rpmvercmp`_ algorithm. Package with larger ``Release`` string is newer. Otherwise packages have the same version. Relationships between *Software Identity* and *Managed Element* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ are not modeled. RPM package database does not provide such informations that would allow to associate particular package with a piece of hardware it relates to. Querying for packages ^^^^^^^^^^^^^^^^^^^^^ Since enumeration of *Software Identities* is disabled due to a huge amount of data generated by large package database, the query execution on them is also disallowed [2]_. The only way how to search for packages is using the method :ref:`LMI_SoftwareInstallationService.FindIdentity`. .. _identifying_software_identity: Identifying software identity ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :ref:`InstanceID` key property is the one and only identification string of :ref:`LMI-SoftwareIdentity` instances representing RPM packages. It's composed of following strings: :: LMI:LMI_SoftwareIdentity:-:-. Where the prefix ``"LMI:LMI_SoftwareIdentity:"`` is compared case-insensitively. The rest is also known as a *NEVRA*. When calling ``GetInstance()`` on this class, the ``":"`` part can be omitted in the ``InstanceID`` key property of passed ``InstanceName``. Example ^^^^^^^ Take for example package ``vim-enhanced`` installed on Fedora 18: :: $ yum info vim-enhanced Installed Packages Name : vim-enhanced Arch : x86_64 Epoch : 2 Version : 7.4.027 Release : 2.fc18 Size : 2.1 M Repo : installed From repo : updates-testing The output has been shortened. This package is represented by an instance of ``LMI_SoftwareIdentity`` with ``InstanceID`` equal to: :: LMI:LMI_SoftwareIdentity:vim-enhanced-2:7.4.027-2.fc18.x86_64 Profile extensions ~~~~~~~~~~~~~~~~~~ List of additional attributes of ``LMI_SoftwareIdentity``: * version properties mentioned above (`version_properties`_) * ``string Architecture`` - Target machine architecture. Packages with architecture independent content will have ``"noarch"`` value set. List of additional attributes of ``LMI_SoftwareIdentityResource``: ``Cost`` : sint32 Relative cost of accessing this repository. ``GPGCheck`` : boolean Whether the GPG signature check should be performed. ``TimeOfLastUpdate`` : datetime Time of repository's last update on server. Class overview ~~~~~~~~~~~~~~ +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | Class-name | Parent_class | Type | +===============================================================================+=====================================================================+==================+ | :ref:`LMI_SoftwareIdentity` | :ref:`CIM_SoftwareIdentity` | Plain | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_SystemSoftwareCollection` | :ref:`CIM_SystemSpecificCollection` | Plain | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_SoftwareIdentityResource` | :ref:`CIM_SoftwareIdentityResource` | Plain | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_HostedSoftwareCollection` | :ref:`CIM_HostedCollection` | Association | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_InstalledSoftwareIdentity` | :ref:`CIM_InstalledSoftwareIdentity` | Association | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_HostedSoftwareIdentityResource` | :ref:`CIM_HostedAccessPoint` | Association | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_ResourceForSoftwareIdentity` | :ref:`CIM_SAPAvailableForElement` | Association | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ | :ref:`LMI_MemberOfSoftwareCollection` | :ref:`CIM_MemberOfCollection` | Aggregation | +-------------------------------------------------------------------------------+---------------------------------------------------------------------+------------------+ .. seealso:: Class model in :ref:`introduction` where above classes are coloured blue. .. _software_update_profile: Software Update Profile ----------------------- Implemented *DMTF* version: ``1.0.0`` Described by `DSP1025`_. The Software Update Profile describes the classes, associations, properties, and methods used to support the installation and update of BIOS, firmware, drivers and related software on a managed element within a managed system. Implemented optional features ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This implementation supports: Advertising the Location Information of a Software Identity This optional feature provides association of *Software Identity* to its resource. In other words each available package is associated to a corresponding repository defined in configuration files of *YUM*. Repositories are represented with :ref:`LMI_SoftwareIdentityResource` and are associated to :ref:`LMI_SoftwareIdentity` via :ref:`LMI_ResourceForSoftwareIdentity`. Not implemented features ~~~~~~~~~~~~~~~~~~~~~~~~ Following methods are not implemented: * :ref:`CIM_SoftwareInstallationService.InstallFromByteStream` * :ref:`LMI_SoftwareInstallationService.CheckSoftwareIdentity` Profile extensions ~~~~~~~~~~~~~~~~~~ RPM package verification ^^^^^^^^^^^^^^^^^^^^^^^^ *Software Inventory* and *Softare Update* profiles don't allow for software verification. That is quite useful and desired operation done on RPM packages. Following additions has been added to provide such a functionality. Following classes have been added: :ref:`LMI_SoftwareIdentityFileCheck` Represents single file contained and installed by *RPM* package. It contains properties allowing for comparison of installed file attributes with those stored in a package database. In case those attributes do not match, file fails the verification test. :ref:`LMI_SoftwareIdentityChecks` Associates *Software Identity File Check* to corresponding *Software Identity*. Following methods have been added: :ref:`LMI_SoftwareInstallationService.VerifyInstalledIdentity` This allows to run verification test on particular *Software Identity* and returns a list of files that failed. .. _package_searching: Package searching ^^^^^^^^^^^^^^^^^ On modern Linux distributions we have thousands of software packages available for installation making it nearly impossible for *CIMOM* to enumerate them all because it consumes a lot of resources. That's why the ``EnumerateInstances()`` and ``EnumerateInstanceNames()`` calls have been disabled *Software Identities*. As a consequence the ``ExecQuery()`` call is prohibited also. But the ability to search for packages is so important that a fallback solution has been provided. Method :ref:`FindIdentity()` has been added to :ref:`LMI_SoftwareInstallationService` allowing to create complex queries on package database. Class overview ~~~~~~~~~~~~~~ +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | Class-name | Parent_class | Type | +=====================================================================================================+=========================================================================+====================+ | :ref:`LMI_SoftwareInstallationService` | :ref:`CIM_SoftwareInstallationService` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareJob` | :ref:`LMI_ConcreteJob` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareInstallationJob` | :ref:`LMI_SoftwareJob` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareVerificationJob` | :ref:`LMI_SoftwareJob` | Association | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareMethodResult` | :ref:`LMI_MethodResult` | Association | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareIdentityFileCheck` | :ref:`CIM_FileSpecification` | Association | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareInstallationServiceAffectsElement` | :ref:`CIM_ServiceAffectsElement` | Association | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_SoftwareIdentityChecks` | | Aggregation | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_HostedSoftwareInstallationService` | :ref:`CIM_HostedService` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_AffectedSoftwareJobElement` | :ref:`CIM_AffectedJobElement` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_OwningSoftwareJobElement` | :ref:`LMI_OwningJobElement` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ | :ref:`LMI_AssociatedSoftwareJobMethodResult` | :ref:`LMI_AssociatedJobMethodResult` | Plain | +-----------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+--------------------+ .. seealso:: Class model in :ref:`introduction` where above classes are coloured blue. .. *************************************************************************** .. _DSP1023: http://www.dmtf.org/sites/default/files/standards/documents/DSP1023_1.0.1.pdf .. _DSP1025: http://www.dmtf.org/sites/default/files/standards/documents/DSP1025_1.0.0.pdf .. _rpmvercmp: http://fedoraproject.org/wiki/Tools/RPM/VersionComparison ------------------------------------------------------------------------------ .. [1] Precisely they must match following regular expression `r"[\w.+{}]+"`. .. [2] Because internally the query is executed upon the list obtained by enumeration of instances.