summaryrefslogtreecommitdiffstats
path: root/mof/LMI_Yum.mof
blob: 5e245981f8ffc27d283b294f4d48d35acb86a130 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
/*
 * Copyright (C) 2012  Michal Minar <miminar@redhat.com>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, see <http://www.gnu.org/licenses/>.
 */

#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_YumPackage : CIM_SoftwareElement {

    [ 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;

    [ 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;

    [ Description (
        "Architecture name, that package is compiled for. In case of no"
        "architecture dependency, this will contain \"noarch\"."),
      ValueMap { "0" , "1" , "2" , "3" , "4" ,
                 "5" , "6" , "7" , "8" ,
                 "10", "11", "12", "13",
                 "15", "16", "17",
                 "20", "21", "22", "23", "24",
                 "30", "31",
                 "35", "36",
                 "40", "41", "42",
                 "45", "46",
                 "50", "51",
                 "55",
                 "60", "61", "62", "63", "64",
                 "70", "71", "72", "73", "74" },
      Values { // 0
               "noarch", "other", "unknown", "x86", "i386",
               // 5
               "i586", "i686", "x86_64", "Athlon",
               // 10
               "IA32e", "IA64", "PowerPC", "PowerPC 64",
               // 15
               "SPARC", "SPARC V9", "SPARC 64",
               // 20
               "ARM", "ARMv6", "ARMv7", "ARMv8", "ARMv9", 
               // 30
               "StrongARM", "XScale",
               // 35
               "PA-RISC", "PA-RISC 11",
               // 40
               "MIPS", "MIPS 32", "MIPS 64",
               // 45
               "MIPS NEC VR 4xxx", "MIPS RM7000",
               // 50
               "MIPS TX 39", "MIPS TX 49",
               // 55
               "V850",
               // 60
               "Alpha", "Alpha EV6", "Alpha EV7", "Alpha EV8", "Alpha EV9",
               // 70
               "SuperH", "SuperH 2", "SuperH 3", "SuperH 4", "SuperH 5" }
    ]
  uint16 Architecture;

    [ 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. Values contain only most common"
        " Licences, so not every package's license will match. Moreover"
        " lot of software is distributed under more licenses. In these cases"
        " property will hold \"Other\" and LicenseString will contain precise"
        " value." ),
      ValueMap { "0"  , "1"  , "2"  ,
                 "5"  , "6"  , "7"  ,
                 "10" , "11" ,
                 "15" , "16" , "17" , "18" , "19",
                 "25" , "26" ,
                 "30" , "31" , "32" , "33" ,
                 "35" , "36" ,
                 "40" , "41" , "42" , "43" , "44",
                 "45" , "46" , "47" , "48" ,
                 "50" , "51" , "52" , "53" ,
                 "55" , "56" , "57" ,
                 "65" , "66" , "67" , "68" ,
                 "70" , "71" , "72" , "73" ,
                 "75" , "76" , "77" ,
                 "80" , "81" , "82" , "83" , "84",
                 "85" , "86" , "87" , "88" , "89",
                 "90" , "91",
                 "100", "101", "102",
                 "110", "111", "112", "113", "114",
                 "115", "116", "117", "118", "119",
                 "125", "126", "127",
                 "130", "131", "132", "133",
                 "135", "136", "137", "138", "139",
                 "140", "141", "142",
                 "145", "146",
                 "150", "151", "152", "153", "154",
                 "155", "156", "157", "158", "159",
                 "160", "161", "162", "163", "164",
                 "165", "166", "167", "168", "169",
                 "170", "171", "172", "173", "174",
                 "175", "176", "177", "178", "179",
                 "180", "181", "182", "183", "184",
                 "185", "186", "187", "188", "189",
                 "190", "191", "192", "193", "194",
                 "195", "196", "197", "198",
                 "200", "201", "202", "203", "204",
                 "205", "206", "207", "208", "209",
                 "215", "216", "217",
                 "220", "221", "222", "223", "224",
                 "225", "226", "227", "228", "229",
                 "230", "231", "232", "233",
                 "235", "236", "237", "238", "239",
                 "240", "241", "242", "243", "244",
                 "245", "246", "247", "248", "249",
                 "250", "251", "252", "253", "254",
                 "255", "256", "257", "258", "259",
                 "260", "261", "262", "263", "264",
                 "265", "266",
                 "270", "271",
                 "275", "276", "277",
                 "280", "281",
                 "400", "401", "402", "403", "404",
                 "405", "406", "407", "408", "409",
                 "410", "411", "412", "413", "414",
                 "415", "416", "417", "418", "419"
                 "420", "421", "422", "423", "424",
                 "425", "426", "427", "428", "429",
                 "430", "431", "432", "433", "434",
                 "435", "436", "437", "438", "439",
                 "440" },
      Values { // 0
               "Other", "Unknown",
               "Freely redistributable without restriction",
               // 5
               "Glide", "AFL", "Adobe",
               // 10
               "MIT", "MIT with advertising",
               // 15
               "AGPL", "AGPLv1", "AGPLv3", "AGPLv3+", "AGPLv3 with exceptions",
               // 25
               "ADSL", "AMDPLPA",
               // 30
               "ASL", "ASL 1.0", "ASL 1.1", "ASL 2.0",
               // 35
               "Artistic clarified", "Artistic 2.0",
               // 40
               "ARL", "AAL", "Bahyph", "Barr", "Beerware",
               // 45
               "BeOpen", "Bibtex", "Boost", "Borceux",
               // 50
               "BSD", "BSD with advertising", "BSD with attribution",
               "BSD Protection",
               // 55
               "AMPAS BSD", "LBNL BSD", "RiceBSD",
               // 65
               "CATOSL", "CeCILL", "CeCILL-B", "CeCILL-C",
               // 70
               "Netscape", "CNRI", "CDDL", "CPL",
               // 75
               "Condor", "Copyright only", "CPAL",
               // 80
               "GPL", "GPL+", "GPL+ with exceptions", "GPLv1", "GPLv2",
               // 85
               "GPLv2 with exceptions", "GPLv2+", "GPLv2+ with exceptions",
               "GPLv3", "GPLv3 with exceptions",
               // 90
               "GPLv3+", "GPLv3+ with exceptions",
               // 100
               "GPL+ or Artistic", "GPLv2 or Artistic", "GPLv2+ or Artistic",
               // 110
               "LGPL", "LGPLV2", "LGPLv2 with exceptions", "LGPLV2+",
               "LGPLV2+ with exceptions",
               // 115
               "LGPLv3", "LGPLv3 with exceptions", "LGPLv3+",
               "LGPLv3+ with exceptions", "LLGPL",
               // 125
               "CC0", "Crossword", "Crystal Stacker",
               // 130
               "MPL", "MPLv1.0", "MPLv1.1", "MPLv2.0",
               // 135
               "diffmark", "WTFPL", "DOC", "Dotseqn", "DSDP",
               // 140
               "dvipdfm", "EPL", "eCos",
               // 145
               "ECL 1.0", "ECL 2.0",
               // 150
               "eGenix", "EFL 2.0", "Entessa", "ERPL", "EU Datagrid",
               // 155
               "EUPL 1.1", "Eurosym", "Fair", "FTL", "Gitware",
               // 160
               "GL2PS", "Glulxe", "gnuplot", "HaskellReport", "IBM",
               // 165
               "iMatrix", "ImageMagick", "Imlib2", "IJG", "Intel ACPI",
               // 170
               "Interbase", "ISC", "Jabber", "JasPer", "JPython",
               // 175
               "Julius", "Knuth", "LPPL", "Latex2e", "Leptonica",
               // 180
               "Lhcyr", "libtiff", "Logica", "MakeIndex", "mecab-ipadic",
               // 185
               "MS-PL", "MS-RL", "midnight", "MirOS", "mod_macro",
               // 190
               "Motosoto", "Naumen", "NCSA", "NetCDF", "NGPL",
               // 195
               "NOSL", "Newmat", "Newsletr", "Nokia",
               // 200
               "NLPL", "Noweb", "OpenLDAP", "OML", "OpenPBS",
               // 205
               "OSL 1.0", "OSL 1.1", "OSL 2.0", "OSL 2.1", "OSL 3.0",
               // 215
               "OpenSSL", "OReilly", "Par",
               // 220
               "Phorum", "PHP", "PlainTeX", "Plexus", "PostgreSQL",
               // 225
               "psfrag", "psutils", "Public Domain", "Python", "Qhull",
               // 230
               "QPL", "Rdisc", "RPSL", "Romio",
               // 235
               "Rsfs", "Ruby", "Saxpath", "SCEA", "SCRIP",
               // 240
               "Sendmail", "Sleepycat", "SLIB", "SNIA", "SISSL",
               // 245
               "SPL", "TCL", "Teeworlds", "TPL", "Threeparttable",
               // 250
               "TMate", "TORQUEv1.1", "TOSL", "UCD", "Vim",
               // 255
               "VNLSL", "VOSTROM", "VSL", "W3C", "Webmin",
               // 260
               "Wsuipa", "wxWidgets", "xinetd", "Xerox", "xpp",
               // 265
               "XSkat", "YPLv1.1",
               // 270
                "Zed", "Zend",
               // 275
               "ZPLv1.0", "ZPLv2.0", "ZPLv2.1",
               // 280
               "zlib", "zlib with acknowledgement",

               // 400 (Good documentation/content/font licenses)
               "CDL", "CC-BY", "CC-BY-SA", "CC-BY-ND",
               // 405
               "DSL", "DMTF", "OAL", "FBSDDL", "GFDL",
               // 410
               "IEEE", "LDPL", "OFSFDL", "Open Publication", "Public Use",
               // 415
               "EFML", "Free Art", "GeoTratis", "Green OpenMusic", "OFL",
               // 420
               "Utopia", "AMS", "Arphic", "Baekmuk", "Bitstream Vera",
               // 425
               "Charter", "DoubleStroke", "ec", "elvish", "LPPL",
               // 430
               "Hershey", "IPA", "Liberation", "Lucida", "MgOpen",
               // 435
               "mplus", "PTFL", "Punknova", "STIX", "Wadalab",
               // 440
               "XANO"
                }
    ]
  uint16 License;

    [ Description (
        "Provides the same information as License property, but"
        " contains the exact string obtained from RPM package.")]
  String LicenseString;

    [ Description (
        "Denotes the package group, in which the package belongs. Values"
        " contain only the most common groups. That means, that not every"
        " package belongs to any of them. In such case value \"Other\" is"
        " returned. For precise value contained in RPM package, check out"
        " GroupString property."),
      ValueMap { "0", "1", "2", "3", "4",
                 "5", "6", "7", "8", "9",
                 "10","11","12","13","14",
                 "15","16","17","18","19",
                 "20","21","22","23","24",
                 "25","26","27","28","29",
                 "30","31","32","33","34",
                 "35","36","37","38","39",
                 "40" },
      Values {
            // 0
            "Other", "Unknown", "Unspecified",
            "Amusements/Games", "Amusements/Graphics",
            // 5
            "Applications/Archiving",
            "Applications/Communications",
            "Applications/Databases",
            "Applications/Editors",
            "Applications/Emulators",
            // 10
            "Applications/Engineering",
            "Applications/File",
            "Applications/Internet",
            "Applications/Multimedia",
            "Applications/Productivity",
            // 15
            "Applications/Publishing",
            "Applications/System",
            "Applications/Text",
            "Development/Build Tools",
            "Development/Debug",
            // 20
            "Development/Debuggers",
            "Development/Documentation",
            "Development/Java",
            "Development/Languages",
            "Development/Libraries",
            // 25
            "Development/Libraries/Java",
            "Development/System",
            "Development/Tools",
            "Documentation",
            "Internet/WWW/Dynamic Content",
            // 30
            "System/Libraries",
            "System Environment/Base",
            "System Environment/Daemons",
            "System Environment/Kernel",
            "System Environment/Libraries",
            // 35
            "System Environment/Shells",
            "Text Processing/Markup/XML",
            "User Interface/Desktops",
            "User Interface/X",
            "User Interface/X Hardware Support",
            // 40
            "Utilities" }
    ]
  uint16 Group;

    [ Description (
        "Provides the same information as Group, but contains precise string"
        " contained in package. Lot of packages define their own custom"
        " group name, which results in \"Other\" value returned by Group"
        " property.") ]
  String GroupString;

    [ Description (
        "Size of RPM package in Bytes" ) ]
  uint64 Size;

    [ 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_YumPackage 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_YumFileCheck, that did not pass"
          " verification.") ]
    LMI_YumFileCheck REF Failed[]
  );

};

[ 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_YumFileCheck : CIM_FileSpecification {

    [ Key, Description (
        "Absolute path of file being checked.") ]
  String Name;

    [ Key, Description (
        "Composition of RPM's name and absolute file path."
        " It's format is \"rpm_name#path\"") ]
  String CheckID;

    [ Key, MaxLen(256), Description (
        "RPM's nevra. This means: "
        "\"name-epoch:version-release.architecture\".") ]
  String SoftwareElementID;

    [ Key, MaxLen(256), Description (
        "Version of packaged software as listed by RPM package.") ]
  String Version;
        
    [ Description (
        "True, if file is present in file system.")]
  Boolean FileExists;

    [ Description("Size of installed file in Bytes.") ]
  uint64 FileSize;
    [ 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;

    [ 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[];

    [ Description("MD5 checksum of installed file.") ]
  String MD5Checksum;
    [ Description("Checksum of installed file."
      " Hash algorithm used can be obtained with ChecksumType property.") ]
  String Checksum;
    [ Description("Checksum of file from RPM database."
      " Hash algorithm used can be obtained with ChecksumType property.") ]
  String ExpectedChecksum;

    [ 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;

    [ Description("User ID of installed file.") ]
  uint32 FileUserID;
    [ Description("User ID of file from RPM database.") ]
  uint32 ExpectedFileUserID;

    [ 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;

    [ 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[];

    [ Description (
        "Returns array of descriptions of checks corresponding to PassedFlags"
        " array.")]
  String PassedFlagsDescriptions[];

};

// ===================================================================
// 	Associations
// ===================================================================
[ Association ]
class LMI_YumInstalledPackage : CIM_InstalledSoftwareElement {
    [ Key, Description (
        "Reference to the installed RPM package.")]
  LMI_YumPackage REF Software;

    [ Key, Max(1),
      Description (
        "Reference to the ComputerSystem hosting a particular"
        " RPM package.")]
  LMI_ComputerSystem REF System;
};