diff options
author | Michal Minar <miminar@redhat.com> | 2013-05-10 15:52:04 +0200 |
---|---|---|
committer | Michal Minar <miminar@redhat.com> | 2013-07-03 13:05:15 +0200 |
commit | 6e8736fd571767a74c334a6a112a337917519cb7 (patch) | |
tree | d83057df0d2b084313656b30118e0d7fad22fe9a /mof | |
parent | d5ac71ea513deffe78fb48e4f29ef69102f74cdb (diff) | |
download | openlmi-providers-6e8736fd571767a74c334a6a112a337917519cb7.tar.gz openlmi-providers-6e8736fd571767a74c334a6a112a337917519cb7.tar.xz openlmi-providers-6e8736fd571767a74c334a6a112a337917519cb7.zip |
added another LMI_SoftwareVerificationJob
There are now two asynchronous jobs:
LMI_SoftwareInstallationJob
LMI_SoftwareVerificationJob
Previous LMI_SoftwareInstallationJob module made generic to handle both
jobs and possibly more.
Also added new static filters for LMI_SoftwareVerificationJob.
Diffstat (limited to 'mof')
-rw-r--r-- | mof/60_LMI_Software.mof | 76 | ||||
-rw-r--r-- | mof/70_LMI_SoftwareIndicationFilters.mof | 78 | ||||
-rw-r--r-- | mof/LMI_Software.reg | 12 |
3 files changed, 131 insertions, 35 deletions
diff --git a/mof/60_LMI_Software.mof b/mof/60_LMI_Software.mof index 027bc75..4bd1c51 100644 --- a/mof/60_LMI_Software.mof +++ b/mof/60_LMI_Software.mof @@ -306,6 +306,40 @@ class LMI_HostedSoftwareIdentityResource : CIM_HostedAccessPoint { /****************************************************************************** * Software update profile classes */ +class LMI_SoftwareJob : LMI_ConcreteJob { + + [Implemented(true), Override("InstanceID")] + string InstanceID; + + [Implemented(true), Override("Caption")] + string Caption; + + [Implemented(true), Override("CommunicationStatus")] + uint16 CommunicationStatus; + + [Implemented(true), Override("Description")] + string Description; + + [Implemented(true), Override("ErrorCode")] + uint16 ErrorCode; + + [Implemented(true), Override("JobStatus")] + string JobStatus; + + [Implemented(true), Override("MethodName")] + string MethodName; + + [Implemented(true), Override("Priority")] + uint32 Priority; + + [Implemented(true), Override("RecoveryAction")] + uint16 RecoveryAction; + +}; + +class LMI_SoftwareInstallationJob : LMI_SoftwareJob { +}; + class LMI_SoftwareInstallationService : CIM_SoftwareInstallationService { [Implemented(true), Override("CreationClassName")] @@ -590,7 +624,7 @@ class LMI_SoftwareInstallationService : CIM_SoftwareInstallationService { CIM_ManagedElement REF Target, [IN ( false ), OUT, Description( "Reference to the job (may be null if job completed).")] - LMI_SoftwareInstallationJob REF Job, + LMI_SoftwareVerificationJob 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.")] @@ -627,37 +661,6 @@ class LMI_SoftwareInstallationServiceCapabilities : }; -class LMI_SoftwareInstallationJob : LMI_ConcreteJob { - - [Implemented(true), Override("InstanceID")] - string InstanceID; - - [Implemented(true), Override("Caption")] - string Caption; - - [Implemented(true), Override("CommunicationStatus")] - uint16 CommunicationStatus; - - [Implemented(true), Override("Description")] - string Description; - - [Implemented(true), Override("ErrorCode")] - uint16 ErrorCode; - - [Implemented(true), Override("JobStatus")] - string JobStatus; - - [Implemented(true), Override("MethodName")] - string MethodName; - - [Implemented(true), Override("Priority")] - uint32 Priority; - - [Implemented(true), Override("RecoveryAction")] - uint16 RecoveryAction; - -}; - class LMI_SoftwareMethodResult : LMI_MethodResult { }; @@ -668,7 +671,7 @@ class LMI_SoftwareMethodResult : LMI_MethodResult { class LMI_AssociatedSoftwareJobMethodResult : LMI_AssociatedJobMethodResult { [Override("Job")] - LMI_SoftwareInstallationJob REF Job; + LMI_SoftwareJob REF Job; [Override("JobParameters")] LMI_SoftwareMethodResult REF JobParameters; @@ -682,7 +685,7 @@ class LMI_OwningSoftwareJobElement : LMI_OwningJobElement { LMI_SoftwareInstallationService REF OwningElement; [Override("OwnedElement")] - LMI_SoftwareInstallationJob REF OwnedElement; + LMI_SoftwareJob REF OwnedElement; }; @@ -690,7 +693,7 @@ class LMI_OwningSoftwareJobElement : LMI_OwningJobElement { class LMI_AffectedSoftwareJobElement : LMI_AffectedJobElement { [Override("AffectingElement")] - LMI_SoftwareInstallationJob REF AffectingElement; + LMI_SoftwareJob REF AffectingElement; }; @@ -749,6 +752,9 @@ class LMI_SoftwareInstModification : CIM_InstModification { /****************************************************************************** * OpenLMI additions *****************************************************************************/ +class LMI_SoftwareVerificationJob : LMI_SoftwareJob { +}; + [Description( "Identifies both a physical file installed from RPM package and its" " original source in package. It represents a set of checks made" diff --git a/mof/70_LMI_SoftwareIndicationFilters.mof b/mof/70_LMI_SoftwareIndicationFilters.mof index 6b36190..f1fae62 100644 --- a/mof/70_LMI_SoftwareIndicationFilters.mof +++ b/mof/70_LMI_SoftwareIndicationFilters.mof @@ -100,3 +100,81 @@ instance of CIM_IndicationFilter { SourceNamespace = "root/cimv2"; SourceNamespaces = {"root/cimv2"}; }; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_SoftwareVerificationJob:PercentUpdated"; + Query = "SELECT * FROM LMI_SoftwareInstModification WHERE " + "SourceInstance ISA LMI_SoftwareVerificationJob AND " + "SourceInstance.CIM_ConcreteJob::PercentComplete <> " + "PreviousInstance.CIM_ConcreteJob::PercentComplete"; + /* CIM: prefix required for pegasus */ + QueryLanguage = "CIM:CQL"; + Description = "Modification of Percentage Complete for a " + "Concrete Job."; + /* required for sfcb - but deprecated */ + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_SoftwareVerificationJob:Succeeded"; + QueryLanguage = "CIM:CQL"; + Query = "SELECT * FROM LMI_SoftwareInstModification WHERE " + "SourceInstance ISA LMI_SoftwareVerificationJob AND " + "SourceInstance.CIM_ConcreteJob::JobState = 17"; + /* This is not supported by sfcb: + * " = CIM_ConcreteJob.JobState#'Completed'" */ + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_SoftwareVerificationJob:Failed"; + Query = "SELECT * FROM LMI_SoftwareInstModification WHERE " + "SourceInstance ISA LMI_SoftwareVerificationJob AND " + "SourceInstance.CIM_ConcreteJob::JobState = 10"; + /* This is not supported by sfcb: + * "CIM_ConcreteJob.JobState#'Exception'" */ + QueryLanguage = "CIM:CQL"; + Description = "Modification of Operational Status for a " + "Concrete Job to 'Complete' and 'OK'."; + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_SoftwareVerificationJob:Changed"; + Query = "SELECT * FROM LMI_SoftwareInstModification WHERE " + "SourceInstance ISA LMI_SoftwareVerificationJob AND " + "SourceInstance.CIM_ConcreteJob::JobState <> " + "PreviousInstance.CIM_ConcreteJob::JobState"; + QueryLanguage = "CIM:CQL"; + Description = "Modification of Job State for a ConcreteJob."; + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; + +instance of CIM_IndicationFilter { + CreationClassName = "CIM_IndicationFilter"; + SystemCreationClassName = "CIM_ComputerSystem"; + SystemName = "HOSTNAME"; + Name = "LMI:LMI_SoftwareVerificationJob:Created"; + Query = "SELECT * FROM LMI_SoftwareInstCreation WHERE" + " SourceInstance ISA LMI_SoftwareVerificationJob"; + QueryLanguage = "CIM:CQL"; + Description = "Creation of a ConcreteJob."; + SourceNamespace = "root/cimv2"; + SourceNamespaces = {"root/cimv2"}; +}; diff --git a/mof/LMI_Software.reg b/mof/LMI_Software.reg index 23aca47..a629f0b 100644 --- a/mof/LMI_Software.reg +++ b/mof/LMI_Software.reg @@ -89,6 +89,12 @@ namespace: root/cimv2 group: openlmi-software +[LMI_SoftwareJob] + provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py + location: pyCmpiProvider + type: instance method + namespace: root/cimv2 + [LMI_SoftwareInstallationJob] provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py location: pyCmpiProvider @@ -96,6 +102,12 @@ namespace: root/cimv2 group: openlmi-software +[LMI_SoftwareVerificationJob] + provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py + location: pyCmpiProvider + type: instance method + namespace: root/cimv2 + [LMI_SoftwareMethodResult] provider: /usr/lib/python2.7/site-packages/openlmi/software/cimom_entry.py location: pyCmpiProvider |