OpenLMI Software providers implement two DMTF profiles:
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.
This implementation does not support:
- Representing a Software Bundle
- Software bundle is represented by LMI_SoftwareIndentity instance having
"Software Bundle"
value present in itsClassifications
property. It shall prepresent software groups. It extends the profile for subclasses ofCIM_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.
Version comparison is based on different approach than in Software Inventory Profile where the following properties are present to uniquely specify package version:
And also a :ref:`VersionString<LMI-SoftwareIdentity-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:
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:
<Epoch>:<Version>-<Release>.<Architecture>
The algorithm for comparing two RPM packages version is following:
- Compare the
Epoch
(which is a number) of both packages. The one with higher epoch is newer. If they match, continue to point 2.- Compare their
Version
attributes with rpmvercmp algorithm. Package with largerVersion
(according to rpmvercmp) is newer. If they match, continue to point 3.- Compare their
Release
attributes with rpmvercmp algorithm. Package with largerRelease
string is newer. Otherwise packages have the same version.
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.
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<LMI-SoftwareInstallationService-FindIdentity>`.
:ref:`InstanceID<LMI-SoftwareIdentity-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:<Name>-<Epoch>:<Version>-<Release>.<Architecture>
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 "<Epoch>:"
part can be omitted in the
InstanceID
key property of passed InstanceName
in case the epoch is
zero.
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
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.
.. seealso:: Class model in :ref:`software_introduction` where above classes are coloured blue.
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.
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<LMI-SoftwareIdentityResource>` and are associated to :ref:`LMI_SoftwareIdentity<LMI-SoftwareIdentity>` via :ref:`LMI_ResourceForSoftwareIdentity<LMI-ResourceForSoftwareIdentity>`.
Following methods are not implemented:
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<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<LMI-SoftwareIdentityChecks>`
- Associates Software Identity File Check to corresponding Software Identity.
Following methods have been added:
- :ref:`LMI_SoftwareInstallationService.VerifyInstalledIdentity<LMI-SoftwareInstallationService-VerifyInstalledIdentity>`
- This allows to run verification test on particular Software Identity and returns a list of files that failed.
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()<LMI-SoftwareInstallationService-FindIdentity>` has been added to :ref:`LMI_SoftwareInstallationService<LMI-SoftwareInstallationService>` allowing to create complex queries on package database.
.. seealso:: Class model in :ref:`software_introduction` where above classes are coloured blue.
[1] | Precisely Release must match following regular expression r"[\\w.+{}]+" .
Version allows also tilde character: r"[~\\w.+{}]+" . |
[2] | Because internally the query is executed upon the list obtained by enumeration of instances. |