DMTF profiles

OpenLMI-Software providers implement two DMTF profiles:

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 represent 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 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:

And also a VersionString property which is a composition of previous ones separated 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 implementation composes VersionString in following way:

<Epoch>:<Version>-<Release>.<Architecture>

The algorithm for comparing two RPM package versions 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 LMI_SoftwareInstallationService.FindIdentity.

Identifying software identity

InstanceID key property is the one and only identification string of 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 reference in case the epoch is zero.

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 <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.

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 LMI_SoftwareIdentityResource and are associated to LMI_SoftwareIdentity via LMI_ResourceForSoftwareIdentity.

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 are provided for this purpose.

Following classes have been added:

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.
LMI_SoftwareIdentityChecks
Associates Software Identity File Check to corresponding Software Identity.

Following methods have been added:

LMI_SoftwareInstallationService.VerifyInstalledIdentity
This allows to run verification test on particular Software Identity and returns a list of files that failed.

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 as well.

But the ability to search for packages is so important that a fallback solution has been provided. Method FindIdentity() has been added to LMI_SoftwareInstallationService allowing to create complex queries on package database.

Class overview

Class-name Parent_class Type
LMI_SoftwareInstallationService CIM_SoftwareInstallationService Plain
LMI_SoftwareJob LMI_ConcreteJob Plain
LMI_SoftwareInstallationJob LMI_SoftwareJob Plain
LMI_SoftwareVerificationJob LMI_SoftwareJob Association
LMI_SoftwareMethodResult LMI_MethodResult Association
LMI_SoftwareIdentityFileCheck CIM_FileSpecification Association
LMI_SoftwareInstallationServiceAffectsElement CIM_ServiceAffectsElement Association
LMI_SoftwareIdentityChecks   Aggregation
LMI_HostedSoftwareInstallationService CIM_HostedService Plain
LMI_AffectedSoftwareJobElement CIM_AffectedJobElement Plain
LMI_OwningSoftwareJobElement LMI_OwningJobElement Plain
LMI_AssociatedSoftwareJobMethodResult LMI_AssociatedJobMethodResult Plain

See also

Class model in Software API Concept 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.