PEP #: 45
 
 TITLE: MOF Compiler Scenarios
 
 Version :  1.1
 
 Authors: Chuck Carmack
 
 State:  Withdrawn
 
 Approvals Required: Architecture Board or Steering Committee
 
 Type: Design
 
 Created: 06/03/03
 
 Version History:
 
Version Date Author Change Description
1.0 06 March 2003  Chuck Carmack Initial Submission
 1.1  10 July 2003 Diane Olson  Clean up comments, withdraw the PEP 


 Abstract:

 
 This PEP describes the use cases for the MOF Compiler related to replacing and deleting objects in the repository.
 

 The main reason for this PEP is to support the application of "patches" to Pegasus.  As Pegasus is put into production, customers may be asked to install patches.  The patches may have the effect of adding, removing, or replacing (both uplevelling and downlevelling) the objects in the repository.  The current MOF compiler supports adding objects.  However, it does not support removing or replacing objects.

 
 A secondary reason for this PEP is to outline the general usage scenarios of the MOF Compiler.

 
 Note: This PEP was written from the perspective of the patch install/uninstall process on OS/400.  Other platforms will have different scenarios, but it is probable that OS/400 captures most of the scenarios.

 
 Note:  This PEP is a companion to PEP 43: cimmof - Updating Class definitions.  Many of the scenarios covered in this PEP are covered by the new compiler options proposed in PEP 43.  Scenarios in this PEP that are covered by compiler options in PEP 43 will be called out below.



 

 Scenarios:

 1.0 General Usage

The scenarios here cover an administrator who may be playing with the MOF Compiler, or perhaps prototyping some classes before deploying them for use by clients.
 
 

 a) Addition of objects:

 
 
 

 This is already supported by the MOF Compiler.  Any type of CIM object (class, instance, qualifier) may be added to the repository.  PEP 43 describes the option for adding EXPERIMENTAL classes.  Also, developers will be encouraged to use the VERSION quailfier, and follow the versioning recommendations in PEP 43.
 
 

 b) Deletion of objects:

 
 
 

 The MOF Compiler does not have an option to delete objects from the repository based on the objects in a MOF file.  This is a useability issue.  An administrator may wish to test the MOF compiler, or prototype some classes, and then remove those classes.  Forcing the administrator to bring up a CIM client to delete the objects, or manually delete the files in the repository, is not a useable design.

 
 While it would be desireable to handle every possibility in deleting MOF objects from the repository, it may not be possible in the current release.  However, we need to at least solve the 'easy' cases that cover the majority of use cases.  For the other cases,  we can hopefully detect when a delete is not supported and return an error to the user.  Or, at least we can list the unsupported deletions as restrictions in the usage notes for the compiler.
 

 The design principle is that when the administrator does a delete of MOF objects, the intention is to 'clear out' the repository of all related objects, whether they are defined in the MOF itself, or are dependent objects not defined in the MOF.  Also, it is desireable for Pegasus code to assist the administrator by leaving the repository in a consistent state (or at least trying to).
 

 The following is a first pass at the uses cases that should be supported:
 

 
 Based on the above discussion, the following new options are proposed for the MOF Compiler:
 

 -tD  Test Delete.  Indicates what would happen if a MOF is deleted, at least as far as can be determined
 -aD Allow Delete.  Does the deletion of objects
 
 

 c) Replacement of objects:

 
 
 

 The MOF Compiler needs the ability to "recompile" a MOF.  An administrator may be testing new class designs, and may wish to recompile the MOF.  The options proposed in PEP 43 cover these scenarios for classes, including changes to the VERSION and EXPERIMENTAL qualifiers of the class.  By using the appropriate option, the administrator can uplevel or downlevel a class.
 

 It is possible that downlevelling a class would break repository instances that depend on properties from the higher version class.    Also, providers registered for the class may be broken.  A discussion point is what can be done by Pegasus code to detect this, or what information can be added to the usage notes.  This should become a separate discussion item and should be scheduled for the arch team.
 

 It is possible that a Provider is registered for a class that has been uplevelled.  Presumably, if the new class followed the versioning guidelines (ie. is backwards compatible) then the Provider would not be broken.
 

 The MOF Compiler currently blocks the replacement of instances.  This should be allowed by the compiler..
 

 A discussion point is whether the MOF compiler should be changed to allow the replacement of qualifiers.
 

 Replacement of instances and qualifiers can be allowed by new compiler options, or the options in PEP 43 can be extended.
 

 2.0 Patches

 
 On the OS/400, the developer packages install/uninstall code with the patch.  This code is called by OS/400.  Patch developers need to take into account how OS/400 manages the 'life cycle' of a patch (see below).
 

 Specifically, OS/400 patches have the following characteristics:
 

 
 In the context of OS/400, the scenarios to account for are patches containing provider registration MOF files, CIM schema MOF files (ie. the classes supported by the providers, including associations), and provider library files.
 

 The use cases are the following:
 

 Note: "supported schema classes" below refers to classes that are listed in the registration as supported by the provider.
 
 

 a) Install a new provider and supported schema classes:

 

 This is the simple case of registering a new provider, compiling the schema class it supports, and dropping the provider library onto the system.
 
 

 b) Uplevel (replace with new version) an existing provider and its supported schema classes.

 

The patch install code would do a "recompile" to replace the provider registration instances and the supported schema classes.  This would most likely involve a minor version upgrade.  PEP 43 proposes that minor version upgrades be allowed for classes.  This should be extended to allow for the upgrade of instances.
 

 There would also likely be a new provider library to be placed on the system.
 
 

 c) Downlevel (replace with previous version) an existing provider and its supported schema classes

 

 The patch install code would probably do a "recompile" to replace the provider registration instances and the supported schema classes.  This would most likely involve a minor version downgrade.  The options proposed in PEP 43 cover this for classes.  This should be extended to allow for the downgrade of instances.
 

 It is possible that repository instances of the supported schema classes may be broken by the downlevelling.  However, since providers typically do not store instances in the repository, this is not a major consideration.  Also, repository instances tend to be static (ie. installed with the patch, and never changed by clients).  The patch install code may simply delete the MOF that defined the static instances, and compile the previous version of the MOF.
 

 The patch install code would likely replace the provider library with the previous version.
 
 

 d) Uninstall (remove) provider and its supported schema classes

 

 The patch uninstall code would delete the provider registration MOF and the MOF for the supported schema classes.  As described in the delete scenario above, this would remove the supported schema class, its subclasses, and all the instances.  It would also remove the provider registration instances.
 

 The patch install code would likely remove the provider library.