From 35411e597042f1a88679a6f1a8fe84f9b660aede Mon Sep 17 00:00:00 2001 From: Michal Minar Date: Wed, 3 Oct 2012 19:14:42 +0200 Subject: working associations added LMI_YumPackageFile as association between LMI_YumPackage and LMI_FileCheck using overrides in mof --- mof/LMI_Yum.mof | 30 ++++++++++++++++-------------- mof/LMI_Yum.reg | 8 +++++++- 2 files changed, 23 insertions(+), 15 deletions(-) (limited to 'mof') diff --git a/mof/LMI_Yum.mof b/mof/LMI_Yum.mof index bdc2a9e..9e821f2 100644 --- a/mof/LMI_Yum.mof +++ b/mof/LMI_Yum.mof @@ -402,17 +402,17 @@ class LMI_YumFileCheck : CIM_FileSpecification { "Absolute path of file being checked.") ] String Name; - [ Key, Description ( + [ Description ( "Composition of RPM's name and absolute file path." " It's format is \"rpm_name#path\"") ] String CheckID; - [ Key, MaxLen(256), Description ( + [ Override("SoftwareElementID"), Description ( "RPM's nevra. This means: " "\"name-epoch:version-release.architecture\".") ] String SoftwareElementID; - [ Key, MaxLen(256), Description ( + [ Override("Version"), Description ( "Version of packaged software as listed by RPM package.") ] String Version; @@ -420,9 +420,11 @@ class LMI_YumFileCheck : CIM_FileSpecification { "True, if file is present in file system.")] Boolean FileExists; - [ Description("Size of installed file in Bytes.") ] + [ Override("FileSize"), + Description("Size of installed file in Bytes.") ] uint64 FileSize; - [ Description("File size in Bytes from RPM database.") ] + [ Units("KiloBytes"), + Description("File size in Bytes from RPM database.") ] uint64 ExpectedFileSize; [ Description("File mode of installed file as a number.") ] @@ -459,7 +461,8 @@ class LMI_YumFileCheck : CIM_FileSpecification { } ] Uint8 ExpectedFileModeFlags[]; - [ Description("MD5 checksum of installed file.") ] + [ Override("MD5Checksum"), + Description("MD5 checksum of installed file.") ] String MD5Checksum; [ Description("Checksum of installed file." " Hash algorithm used can be obtained with ChecksumType property.") ] @@ -537,15 +540,14 @@ class LMI_YumFileCheck : CIM_FileSpecification { [ Association ] class LMI_YumInstalledPackage : CIM_InstalledSoftwareElement { - [ Key, Description ( + [ Override("Software"), Weak, Description ( "Reference to the installed RPM package.")] LMI_YumPackage REF Software; - [ Key, Max(1), - Description ( + [ Override("System"), Min(1), Description ( "Reference to the ComputerSystem hosting a particular" " RPM package.")] - LMI_ComputerSystem REF System; + CIM_ComputerSystem REF System; [ Description ( "Updates the package to latest version." @@ -593,14 +595,14 @@ class LMI_YumInstalledPackage : CIM_InstalledSoftwareElement { }; -[ Association ] +[ Association, Aggregation ] class LMI_YumPackageFile : CIM_SoftwareElementChecks { - [ Key, Aggregate, Min(1), Max(1), - Description ("The RPM package being checked")] + [ Override("Element"), Description("The RPM package being checked") ] LMI_YumPackage REF Element; - [ Key, Weak, Description("The Check for the element.") ] + [ Override("Check"), Description("The Check for the element.") ] LMI_YumFileCheck REF Check; + }; diff --git a/mof/LMI_Yum.reg b/mof/LMI_Yum.reg index c85b013..7ada5df 100644 --- a/mof/LMI_Yum.reg +++ b/mof/LMI_Yum.reg @@ -7,7 +7,7 @@ [LMI_YumInstalledPackage] provider: /usr/lib/python2.7/site-packages/cura/yum/LMI_YumInstalledPackage.py location: pyCmpiProvider - type: instance method + type: instance association method namespace: root/cimv2 [LMI_YumFileCheck] @@ -15,3 +15,9 @@ location: pyCmpiProvider type: instance method namespace: root/cimv2 + +[LMI_YumPackageFile] + provider: /usr/lib/python2.7/site-packages/cura/yum/LMI_YumPackageFile.py + location: pyCmpiProvider + type: instance association + namespace: root/cimv2 -- cgit