diff options
author | Michal Minar <miminar@redhat.com> | 2013-04-29 21:47:53 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-07-03 12:24:35 +0200 |
commit | d07c839858c04d528b12bb2d8bf94528f29959f1 (patch) | |
tree | 380e52885b9733f903844f71881ea129017c4194 /mof | |
parent | 535a304c8fae177035700edf1d569a9136fa9fbf (diff) | |
download | openlmi-providers-d07c839858c04d528b12bb2d8bf94528f29959f1.tar.gz openlmi-providers-d07c839858c04d528b12bb2d8bf94528f29959f1.tar.xz openlmi-providers-d07c839858c04d528b12bb2d8bf94528f29959f1.zip |
added software verification classes to mof
Diffstat (limited to 'mof')
-rw-r--r-- | mof/60_LMI_Software.mof | 263 |
1 files changed, 261 insertions, 2 deletions
diff --git a/mof/60_LMI_Software.mof b/mof/60_LMI_Software.mof index fbcd928..027bc75 100644 --- a/mof/60_LMI_Software.mof +++ b/mof/60_LMI_Software.mof @@ -21,9 +21,9 @@ #pragma locale ("en_US") //#pragma namespace ("root/cimv2") -/* **************************************************************************** +/****************************************************************************** * Central class of Software Inventory and Update profiles - */ + *****************************************************************************/ class LMI_SoftwareIdentity : CIM_SoftwareIdentity { [Implemented(true), Override("InstanceID"), Description( @@ -557,6 +557,45 @@ class LMI_SoftwareInstallationService : CIM_SoftwareInstallationService { "CIM_SoftwareInstallationService.InstallFromByteStream.InstallOptions[]" }] string InstallOptionsValues[]); + [Description( + "Start a job to verify installed package represented by " + "SoftwareIdentity (Source) on a ManagedElement (Target).\n" + "If 0 is returned, the function completed successfully " + "and no ConcreteJob instance was required. If 4096/0x1000 " + "is returned, a ConcreteJob will be started to perform " + "the verification. The Job\'s reference will be returned in " + "the output parameter Job.\nIn former case, the Failed parameter" + "will contain all associated file checks, that did not pass. " + "In the latter case this property will be NULL."), + ValueMap { "0", "1", "2", "3", "4", "5", "6", "..", "4096" + , "4097", "4098", "4099..32767" + , "32768", "32769..65535" }, + Values { "Job Completed with No Error", "Not Supported" + , "Unspecified Error", "Timeout", "Failed" + , "Invalid Parameter", "Target In Use", "DMTF Reserved" + // 4096 + , "Method Parameters Checked - Job Started" + , "Unsupported TargetType" + , "Method Reserved" + // 32768 + , "Software Identity Not Installed" + , "Vendor Specific" }] + uint32 VerifyInstalledIdentity( + [IN, Description( + "Reference to the installed SoftwareIdentity to be verified.")] + LMI_SoftwareIdentity REF Source, + [IN, Description( + "Reference to the ManagedElement that the Software " + "Identity is installed on." )] + CIM_ManagedElement REF Target, + [IN ( false ), OUT, Description( + "Reference to the job (may be null if job completed).")] + LMI_SoftwareInstallationJob REF Job, + [IN ( false ), OUT, Description( + "Array of file checks that did not pass verification." + " This is NULL in case that asynchronous job has been started.")] + LMI_SoftwareIdentityFileCheck REF Failed[]); + }; class LMI_SoftwareInstallationServiceCapabilities : @@ -706,3 +745,223 @@ class LMI_SoftwareInstCreation : CIM_InstCreation { [Indication] class LMI_SoftwareInstModification : CIM_InstModification { }; + +/****************************************************************************** + * OpenLMI additions + *****************************************************************************/ +[Description( + "Identifies both a physical file installed from RPM package and its" + " original source in package. It represents a set of checks made" + " to a single installed file provided by RPM package.")] +class LMI_SoftwareIdentityFileCheck : CIM_FileSpecification { + + [Implemented(true), Override("Name"), Description( + "Absolute path of file being checked.") ] + string Name; + + [Implemented(true), Override("CheckID"), Description( + "This contains InstanceID of asynchronous job" + " if this check is a result of job invocation. Otherwise" + " \"LMI:LMI_SoftwareIdentityFileCheck\" will be present." + " In former case, the format of value will be:" + " \"LMI:LMI_SoftwareVerificationJob:<id>\", where <id> is job's" + " identification number in decimal format.")] + string CheckID; + + [Implemented(true), Override("SoftwareElementID")] + string SoftwareElementID; + + [Implemented(true), Override("SoftwareElementState")] + uint16 SoftwareElementState; + + [Implemented(true), Override("TargetOperatingSystem")] + uint16 TargetOperatingSystem; + + [Implemented(true), Override("Version"), Description( + "Version of RPM package in EVRA form. It stands for" + " Epoch, Version, Revision and Architecture. It has a specific" + " format: <epoch>-<version>-<release>.<architecture>.")] + string Version; + + [Implemented(true), Override("CheckMode")] + boolean CheckMode; + + [Implemented(true), 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 ChecksumType; + + [Implemented(true), Description( + "Returns array of flags representing test that did not pass." + " Note that not all tests are run on every file. Tests are selected" + " depending on file type stored in package database. If the" + " file is missing, no other tests are run. Flag is present in the" + " output array if the test has been run and file did not pass it." + " Values representing tests being run are: \"Existence\" - it applies" + " to every file type; \"FileSize\" - applies only to regular files" + " and symbolic links; \"FileMode\" - includes check for permissions" + " and file type. Permissions are not checked for symbolic links." + " \"Checksum\" - applies only to regular files; \"Device Number\" - " + " tests major/minor device number; \"LinkTarget\" - tested only on" + " symbolic links; \"UserID\" and \"GroupID\" - apply to every" + " file type; \"Last Modification Time\" is tested" + " only on regular files."), + ValueMap { "0", "1", "2", "3" + , "4", "5", "6", "7" + , "8", "9" }, + Values { "Existence", "FileSize", "FileMode", "Checksum" + , "Device Number", "LinkTarget", "UserID", "GroupID" + , "Last Modification Time" }] + uint16 FailedFlags[]; + + [Implemented(true), Description( + "Checksum of installed file." + " Hash algorithm used can be obtained with ChecksumType property." + " This property contains valid value only for regular files." + " NULL is present if check could not be done.")] + string FileChecksum; + [Implemented(true), Description( + "Checksum of file from RPM database." + " Hash algorithm used can be obtained with ChecksumType property." + " It contains NULL for all file types but regular file.")] + string FileChecksumOriginal; + + [Implemented(true), Description("True, if file is present on file system.")] + boolean FileExists; + + [Implemented(true), Description( + "File mode of installed file as a number." + " NULL if file does not exist.")] + uint32 FileMode; + [Implemented(true), Description( + "File mode as a number given by RPM database.")] + uint32 FileModeOriginal; + + [Implemented(true), 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[]; + [Implemented(true), 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 FileModeFlagsOriginal[]; + + [Implemented(true), Override("FileName"), Description( + "File name of verified file without any directory prefix.")] + string FileName; + + [Implemented(true), Override("FileSize"), Description( + "Size of installed file in Bytes. It's NULL if file does not exist" + " or it's not a regular file or symbolic link.")] + uint64 FileSize; + [Implemented(true), Units("KiloBytes"), + Description("File size in Bytes from RPM database.")] + uint64 FileSizeOriginal; + + [Implemented(true), Description( + "File type of installed file. NULL if file does not exist."), + ValueMap { "0", "1", "2", "3" + , "4", "5", "6" }, + Values { "Unknown", "File", "Directory", "Symlink" + , "FIFO", "Character Device", "Block Device" }] + uint16 FileType; + [Implemented(true), 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 FileTypeOriginal; + + [Implemented(true), Description("Group ID of installed file.")] + uint32 GroupID; + [Implemented(true), Description("Group ID of file from RPM database.")] + uint32 GroupIDOriginal; + + [Implemented(true), Override("MD5Checksum"), Description( + "MD5 checksum of installed file." + " It's computed only for regular files.")] + string MD5Checksum; + + [Implemented(true), Description( + "Time of last modification of installed file as number a" + " of seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC)." + " NULL if file does not exist.")] + uint64 LastModificationTime; + [Implemented(true), 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 LastModificationTimeOriginal; + + [Implemented(true), Description( + "Target destination of symbolic link as returned by" + " readline. If file is not a symbolic link or it's missing," + " NULL is returned.")] + string LinkTarget; + [Implemented(true), Description( + "Target destination of symbolic link from RPM database" + " as returned by readline. If file is not a symbolic link," + " NULL is returned.")] + string LinkTargetOriginal; + + [Implemented(true), Description("User ID of installed file.")] + uint32 UserID; + [Implemented(true), Description("User ID of file from RPM database.")] + uint32 UserIDOriginal; + + [Implemented(true), Override("Invoke")] + uint32 Invoke(); + + [Implemented(true), Override("InvokeOnSystem")] + uint32 InvokeOnSystem( + [IN, Description( + "Reference to ComputerSystem in whose context the " + "method is to be invoked.")] + Linux_ComputerSystem REF TargetSystem); + +}; + + +/****************************************************************************** + * OpenLMI additional associations + *****************************************************************************/ +[Association, Aggregation, Description( + "This association ties a SoftwareIdentity to a specific Check to validate" + " its state. Each file installed by corresponding RPM package to local" + " file system yields one instance of this class.")] +class LMI_SoftwareIdentityChecks { + + [Key, Aggregate, Min(1), Max(1), Description( + "The SoftwareIdentity being checked.")] + LMI_SoftwareIdentity REF Element; + + [Key, Weak, Description("The Check for the file.")] + LMI_SoftwareIdentityFileCheck REF Check; + +}; |