summaryrefslogtreecommitdiffstats
path: root/mof
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-02-12 15:54:14 +0100
committerMichal Minar <miminar@redhat.com>2013-02-13 20:02:50 +0100
commit46aacac8e2aabed5582f5c7da70a5acb5b679569 (patch)
tree8190c55b05f02108620732232ef5c080d5529f35 /mof
parent1d60a267af3eb94f8f158b4cf8abf3cc254611a1 (diff)
downloadopenlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.tar.gz
openlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.tar.xz
openlmi-providers-46aacac8e2aabed5582f5c7da70a5acb5b679569.zip
initial phase of rewrite for SMASH profile
currently only a subset of Software Inventory profile is supported * listing available packages
Diffstat (limited to 'mof')
-rw-r--r--mof/LMI_Software.mof323
-rw-r--r--mof/LMI_Software.reg14
2 files changed, 66 insertions, 271 deletions
diff --git a/mof/LMI_Software.mof b/mof/LMI_Software.mof
index fd24150..18d3035 100644
--- a/mof/LMI_Software.mof
+++ b/mof/LMI_Software.mof
@@ -21,295 +21,90 @@
#pragma locale ("en_US")
//#pragma namespace ("root/cimv2")
-[ Description (
- "RPM package installed on particular computer system with"
- " YUM (The Yellowdog Updated, Modified) package manager.")
-]
-class LMI_SoftwarePackage : CIM_SoftwareElement {
+class LMI_SoftwareIdentity : CIM_SoftwareIdentity {
- [ Description (
- "The release number (referred to in some older documentation as a"
- " \"vepoch\") is how the maintainer marks build revisions, starting"
- " from 1. When a minor change (spec file changed, patch added/removed)"
- " occurs, or a package is rebuilt to use newer headers or libraries,"
- " the release number should be incremented. If a major change"
- " (new version of the software being packaged) occurs, the version"
- " number should be changed to reflect the new software version,"
- " and the release number should be reset to 1.")
- ]
- string Release;
+ [Implemented(true), Override, Description(
+ "Unique identifier for installed or available package."
+ " It's composed of OrgID and LocalID separated by ':', where"
+ " <OrgID> is LMI and LocalID is PKG:<PKG_NEVRA>. <PKG_NEVRA>"
+ " is a string representing rpm package. Letters in NEVRA stand"
+ " for name, epoch, version, release and architecture.")]
+ string InstanceID;
- [ Description (
- "It is important to be careful with the version of post-release"
- " scheme, to ensure that package ordering is correct. It may be"
- " necessary to use Epoch to ensure that the current package is"
- " considered newer than the previous package.")
- ]
- uint16 Epoch;
+ [Implemented(true), Override, Description("Package's summary.")]
+ string Caption;
+
+ [Implemented(true), Override]
+ uint16 Classifications[];
- [ Description (
- "Architecture name, that package is compiled for. In case of no"
- "architecture dependency, this will contain \"noarch\".")
- ]
- string Architecture;
+ [Implemented(true), Override, Description("Package's description.")]
+ string Description;
- [ Description (
- "A software license is a legal instrument (usually by way of contract"
- " law) governing the usage or redistribution of software."
- " All software is copyright protected, except material in the public"
- " domain. Contractual confidentiality is another way of protecting"
- " software. A typical software license grants an end-user permission"
- " to use one or more copies of software in ways where such a use would"
- " otherwise potentially constitute copyright infringement of the"
- " software owner's exclusive rights under copyright law. List of"
- " possible values is based on list of licences approved by the"
- " Free Software Foundation and OSI. The string is obtained from RPM"
- " package." )
- ]
- string License;
+ [Implemented(true), Override, Description(
+ "Package's NEVRA string. That is also part of InstanceID.")]
+ string ElementName;
- [ Description (
- "Denotes the package group, in which the package belongs.")
- ]
- string Group;
+ [Implemented(true), Override]
+ datetime InstallDate;
- [ Description (
- "Size of RPM package in Bytes" ) ]
- uint64 Size;
+ [Implemented(true), Override]
+ boolean IsEntity;
- [ Description (
- "Will install available package."),
- ValueMap { "0", "1", "2" },
- Values { "Already installed", "Successful installation", "Failed" } ]
- uint32 Install(
- [ IN(false), OUT, Description (
- "The reference to newly installed package, if installation was"
- " successful. Reference to current package if it is already"
- " installed and Null otherwise.") ]
- LMI_SoftwareInstalledPackage REF Installed);
+ [Implemented(true), Override, Description(
+ "Name of package. This does not uniquely identify package"
+ " installed on computer system.")]
+ string Name;
- [ Description (
- "Will uninstall installed package."),
- ValueMap { "0", "1", "2" },
- Values { "Not installed", "Successful removal", "Failed" } ]
- uint32 Remove();
+ [Implemented(true), Override]
+ string TargetTypes[];
-};
-
-[ Description (
- "Identifies a file contained by RPM package. It's located"
- " in directory identified in FileName. The Invoke methods"
- " check for file existence and whether its attributes match"
- " those given by RPM package.")
-]
-class LMI_SoftwareFileCheck : CIM_FileSpecification {
-
- [ Key, Description (
- "Absolute path of file being checked.") ]
- string Name;
-
- [ Description (
- "Composition of RPM's name and absolute file path."
- " It's format is \"rpm_name#path\"") ]
- string CheckID;
-
- [ Override("SoftwareElementID"), Description (
- "RPM's nevra. This means: "
- "\"name-[epoch:]version-release.architecture\"."
- " If epoch part is missing, a \"0:\" is assumed." ) ]
- string SoftwareElementID;
-
- [ Override("Version"), Description (
- "Version of packaged software as listed by RPM package.") ]
- string Version;
-
- [ Description (
- "True, if file is present in file system.")]
- boolean FileExists;
-
- [ Override("FileSize"),
- Description("Size of installed file in Bytes.") ]
- uint64 FileSize;
- [ Units("KiloBytes"),
- Description("File size in Bytes from RPM database.") ]
- uint64 ExpectedFileSize;
-
- [ Description("File mode of installed file as a number.") ]
- uint32 FileMode;
- [ Description("File mode as a number given by RPM database.") ]
- uint32 ExpectedFileMode;
+ [Implemented(true), Override, Description(
+ "Package's EVRA, in format: "
+ "<epoch>:<version>-<release>.<architecture>")]
+ string VersionString;
- [ Description (
- "File mode of installed file as an array of permissions."
- " Each value represents a bit position in file mode."),
- ValueMap { "0", "1", "2" //XWR Other
- , "3", "4", "5" //XWR Group
- , "6", "7", "8" //XWR User
- , "9","10","11" //Sticky, SGID, SUID
- },
- Values { "Execute Other", "Write Other", "Read Other"
- , "Execute Group", "Write Group", "Read Group"
- , "Execute User" , "Write User" , "Read User"
- , "Sticky", "SGID", "SUID"
- } ]
- uint8 FileModeFlags[];
- [ Description (
- "File mode as an array of permissions of file from RPM database."
- " Each value represents a bit position in file mode."),
- ValueMap { "0", "1", "2" //XWR Other
- , "3", "4", "5" //XWR Group
- , "6", "7", "8" //XWR User
- , "9","10","11" //Sticky, SGID, SUID
- },
- Values { "Execute Other", "Write Other", "Read Other"
- , "Execute Group", "Write Group", "Read Group"
- , "Execute User" , "Write User" , "Read User"
- , "Sticky", "SGID", "SUID"
- } ]
- uint8 ExpectedFileModeFlags[];
+ [Implemented(true), Description("Package's epoch.")]
+ uint32 Epoch;
- [ Override("MD5Checksum"),
- Description("MD5 checksum of installed file.") ]
- string MD5Checksum;
- [ Description("Checksum of installed file."
- " Hash algorithm used can be obtained with ChecksumType property.") ]
- string FileChecksum;
- [ Description("Checksum of file from RPM database."
- " Hash algorithm used can be obtained with ChecksumType property.") ]
- string ExpectedFileChecksum;
+ [Implemented(true), Description("Package's version.")]
+ string Version;
- [ Description("Number of hash algorithm according to RFC4880."
- " This algorithm is used for making checksums of RPM files and"
- " packages. This algorithm is same for the whole RPM database."),
- ValueMap { "0", "1", "2", "3"
- , "8", "9","10","11" },
- Values { "UNKNOWN", "MD5", "SHA-1", "RIPE-MD/160"
- , "SHA256", "SHA384", "SHA512", "SHA224" } ]
- uint16 FileChecksumType;
+ [Implemented(true), Description("Package's release.")]
+ string Release;
- [ Description("User ID of installed file.") ]
- uint32 FileUserID;
- [ Description("User ID of file from RPM database.") ]
- uint32 ExpectedFileUserID;
+ [Implemented(true), Description("Package's architecture.")]
+ string Architecture;
- [ Description("Group ID of installed file.") ]
- uint32 FileGroupID;
- [ Description("Group ID of file from RPM database.") ]
- uint32 ExpectedFileGroupID;
-
- [ Description("Time of last modification of installed file as number a"
- " of secodns since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).") ]
- uint64 LastModificationTime;
- [ Description("Time of last modification of file from RPM database as"
- " a number of secodns since the Epoch,"
- " 1970-01-01 00:00:00 +0000 (UTC).") ]
- uint64 ExpectedLastModificationTime;
+};
- [ Description("Target destination of symbolic link as returned by"
- " readline. If file is not a symbolic link, NULL is returned.") ]
- string LinkTarget;
- [ Description("Target destination of symbolic link from RPM database"
- " as returned by readline. If file is not a symbolic link,"
- " NULL is returned.") ]
- string ExpectedLinkTarget;
+class LMI_SystemSoftwareCollection : CIM_SystemSpecificCollection {
- [ Description("File type."),
- ValueMap { "0", "1", "2", "3"
- , "4", "5", "6" },
- Values { "Unknown", "File", "Directory", "Symlink"
- , "FIFO", "Character Device", "Block Device" } ]
- uint16 FileType;
- [ Description("File type of file in RPM database."),
- ValueMap { "0", "1", "2", "3"
- , "4", "5", "6" },
- Values { "Unknown", "File", "Directory", "Symlink"
- , "FIFO", "Character Device", "Block Device" } ]
- uint16 ExpectedFileType;
-
- [ Description (
- "Returns array of booleans for verification checks. Each value"
- " is either true or false, whether file passed the check or not."
- " True is present also if the check does not apply to the file"
- " (file implicitly passes the check, if check can not be"
- " performed)."
- " PassedFlagsDescriptions returns a description for each field in"
- " this array saying, what it means.") ]
- boolean PassedFlags[];
+ [Implemented(true), Override]
+ string InstanceID;
- [ Description (
- "Returns array of descriptions of checks corresponding to PassedFlags"
- " array.")]
- string PassedFlagsDescriptions[];
+ [Implemented(true), Override]
+ string Caption;
};
-// ===================================================================
-// Associations
-// ===================================================================
-[ Association ]
-class LMI_SoftwareInstalledPackage : CIM_InstalledSoftwareElement {
-
- [ Override("Software"), Weak, Description (
- "Reference to the installed RPM package.")]
- LMI_SoftwarePackage REF Software;
+[Association]
+class LMI_HostedSoftwareCollection : CIM_HostedCollection {
- [ Override("System"), Min(1), Description (
- "Reference to the ComputerSystem hosting a particular"
- " RPM package.")]
- CIM_ComputerSystem REF System;
-
- [ Description (
- "Updates the package to latest version."
- " When any of \"epoch\", \"version\" or \"release\" argument is given"
- ", install only matching available package. Otherwise try"
- " to update to newest package available."
- " If the \"epoch\", \"version\" and \"release\" of package is"
- " already installed, or no newer package is available,"
- " \"Already newest\" value is returned."),
- ValueMap { "0", "1", "2" },
- Values { "Already newest", "Successful installation", "Failed" } ]
- uint16 Update(
- [ IN(true), Description (
- "Specify particular epoch of package to update to."
- " Update to newest, when empty.") ]
- string Epoch,
- [ IN(true), Description (
- "Specify particular version of package to update to."
- " Update to newest, when empty") ]
- string Version,
- [ IN(true), Description (
- "Specify particular release of package to update to."
- " Update to newest, when empty.") ]
- string Release,
- [ IN(false), OUT, Description (
- "The reference to newly installed package, if installation was"
- " successful. Otherwise reference to current package.") ]
- LMI_SoftwareInstalledPackage REF Installed);
-
- [ Description (
- "Verify existence and attributes of files installed from"
- " RPM package. If all files installed exist and their attributes"
- " matches, method returns \"Pass\". \"Not passed\" is returned when"
- " arbitrary file differs in its attributes. And \"Error\" if"
- " verification could not be done."),
- ValueMap { "0", "1", "2" },
- Values { "Pass", "Not passed", "Error" } ]
- uint32 CheckIntegrity(
- [ IN(false), OUT, Description (
- "Array of references to LMI_SoftwareFileCheck, that did not pass"
- " verification.") ]
- LMI_SoftwareFileCheck REF Failed[]);
+ [Override("Antecedent")]
+ Linux_ComputerSystem REF Antecedent;
+ [Override("Dependent")]
+ LMI_SystemSoftwareCollection REF Dependent;
+
};
-[ Association, Aggregation ]
-class LMI_SoftwarePackageChecks : CIM_SoftwareElementChecks {
+[Association]
+class LMI_MemberOfSoftwareCollection : CIM_MemberOfCollection {
- [ Override("Element"), Description("The RPM package being checked") ]
- LMI_SoftwarePackage REF Element;
+ [Override("Collection")]
+ LMI_SystemSoftwareCollection REF Collection;
- [ Override("Check"), Description("The Check for the element.") ]
- LMI_SoftwareFileCheck REF Check;
+ [Override("Member")]
+ LMI_SoftwareIdentity REF Member;
};
-
diff --git a/mof/LMI_Software.reg b/mof/LMI_Software.reg
index 1c6f323..37f55a3 100644
--- a/mof/LMI_Software.reg
+++ b/mof/LMI_Software.reg
@@ -1,22 +1,22 @@
-[LMI_SoftwarePackage]
+[LMI_SoftwareIdentity]
provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py
location: pyCmpiProvider
- type: instance method
+ type: instance
namespace: root/cimv2
-[LMI_SoftwareInstalledPackage]
+[LMI_SystemSoftwareCollection]
provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py
location: pyCmpiProvider
- type: instance association method
+ type: instance
namespace: root/cimv2
-[LMI_SoftwareFileCheck]
+[LMI_HostedSoftwareCollection]
provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py
location: pyCmpiProvider
- type: instance method
+ type: instance association
namespace: root/cimv2
-[LMI_SoftwarePackageChecks]
+[LMI_MemberOfSoftwareCollection]
provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py
location: pyCmpiProvider
type: instance association