Testing Openwsman

Requirements

Any CIM provider used for testing needs to follow these rules:

  • CMPI based
  • Provider has to be generic with no system dependent data
  • Open-source

CIM Providers to be used for testing

Openwsman works closely with the SBLIM project and uses some sample and test CPI providers to provide a cross-platform testing capabilities. It is very important that the test objects are system and time independent. Providers that interact with software and hardware components on the system are not suitable for testing. We have chosen the following providers for testing:

Open Test Manager

See OpenTestMan.

Appendix

MOF files for testing

CMPI FAD

[ Description("Class representing plain files. We are not inheriting "
              "from UnixFile in order to avoid unnecessary " 
	      "complexities with FileIdentity"),
  Provider("cmpi:CWS_PlainFile")
]
class CWS_PlainFile : CIM_DataFile
{
    [Propagated ("CIM_FileSystem.CSCreationClassName"), 
        Key, MaxLen (256),
        Description (
            "The scoping ComputerSystem's CreationClassName.") ]
    string CSCreationClassName;
    
    [Propagated ("CIM_FileSystem.CSName"),
        Key, MaxLen (256),
        Description (
            "The scoping ComputerSystem's Name.") ]
    string CSName;
    
    [Propagated ("CIM_FileSystem.CreationClassName"), 
        Key, MaxLen (256),
        Description ("The scoping FileSystem's CreationClassName.") ]
    string FSCreationClassName;
    
    [Propagated ("CIM_FileSystem.Name"),
        Key, MaxLen (256),
        Description ("The scoping FileSystem's Name.") ]
    string FSName;
    
    [Key, MaxLen (256),
        Description (
        "CreationClassName indicates the name of the class or the "
        "subclass used in the creation of an instance. When used "
        "with the other key properties of this class, this property "
        "allows all instances of this class and its subclasses to "
        "be uniquely identified.") ]
    string CreationClassName;    
    
    [Override ("Name"), Key, MaxLen (1024),
       Description (
       "The inherited Name serves as part of the key of a LogicalFile "
       "instance within a FileSystem. A unique identifier (such as a "
       "full path name) is required as a Name value.  Since Files are "
       "weak to their FileSystem (and not to a Directory which would "
       "provide a more granular naming algorithm), care must be "
       "taken to make LogicalFile's Name unique for a given Creation"
       "ClassName and FileSystem. A full path name is one way "
       "to do this.") ]

    string Name;
    [Gauge, Description ("Size of the File in bytes."),
        Units ("Bytes") ]
    uint64 FileSize;
    
    [Description (
        "File's creation date.") ] 
    datetime CreationDate;
    
    [Description (
        "Time that the File was last modified.") ] 
    datetime LastModified;
    
    [Description (
        "Time that the File was last accessed.") ] 
    datetime LastAccessed;
    
    [Description (
        "Boolean indicating that the File can be read.") ] 
    boolean Readable;
    
    [Description (
        "Boolean indicating that the File can be written.") ]
    boolean Writeable;
    
    [Description (
        "Indicates the file is executable.") ] 
    boolean Executable;
	
    [Description (
 	"this method returns the file's type."),
     Provider ("cmpi:CWS_PlainFile") ]
    string fileType();  
};

// ===================================================================
// Directory
// ===================================================================
[ Description("Class representing directories. We are not inheriting "
              "from UnixDirectory in order to keep things simple."), 
  Provider("cmpi:CWS_Directory")
]
class CWS_Directory : CIM_Directory
{
    [Propagated ("CIM_FileSystem.CSCreationClassName"), 
        Key, MaxLen (256),
        Description (
            "The scoping ComputerSystem's CreationClassName.") ]
    string CSCreationClassName;
    
    [Propagated ("CIM_FileSystem.CSName"),
        Key, MaxLen (256),
        Description (
            "The scoping ComputerSystem's Name.") ]
    string CSName;
    
    [Propagated ("CIM_FileSystem.CreationClassName"), 
        Key, MaxLen (256),
        Description ("The scoping FileSystem's CreationClassName.") ]
    string FSCreationClassName;
    
    [Propagated ("CIM_FileSystem.Name"),
        Key, MaxLen (256),
        Description ("The scoping FileSystem's Name.") ]
    string FSName;
    
    [Key, MaxLen (256),
        Description (
        "CreationClassName indicates the name of the class or the "
        "subclass used in the creation of an instance. When used "
        "with the other key properties of this class, this property "
        "allows all instances of this class and its subclasses to "
        "be uniquely identified.") ]
    string CreationClassName;    
    
    [Override ("Name"), Key, MaxLen (1024),
       Description (
       "The inherited Name serves as part of the key of a LogicalFile "
       "instance within a FileSystem. A unique identifier (such as a "
       "full path name) is required as a Name value.  Since Files are "
       "weak to their FileSystem (and not to a Directory which would "
       "provide a more granular naming algorithm), care must be "
       "taken to make LogicalFile's Name unique for a given Creation"
       "ClassName and FileSystem. A full path name is one way "
       "to do this.") ]
    string Name;

    [Gauge, Description ("Size of the File in bytes."),
        Units ("Bytes") ]
    uint64 FileSize;
    
    [Description (
        "File's creation date.") ] 
    datetime CreationDate;
    
    [Description (
        "Time that the File was last modified.") ] 
    datetime LastModified;
    
    [Description (
        "Time that the File was last accessed.") ] 
    datetime LastAccessed;
    
    [Description (
        "Boolean indicating that the File can be read.") ] 
    boolean Readable;
    
    [Description (
        "Boolean indicating that the File can be written.") ]
    boolean Writeable;
    
    [Description (
        "Indicates the file is executable.") ] 
    boolean Executable;
};

// ===================================================================
// DirectoryContainsFile
// ===================================================================
[ Association, Aggregation, 
  Description("Link between Directories and their contents, which "
              "can be plain files or other directories."),
  Provider("cmpi:CWS_DirectoryContainsFile")
]
class CWS_DirectoryContainsFile : CIM_DirectoryContainsFile
{
    [Override ("GroupComponent"), Aggregate, Max (1),
        Description ("The Directory.") ]
    CWS_Directory REF GroupComponent;
    
    [Override ("PartComponent"),
        Description (
            "The LogicalFile 'contained within' the Directory.") ]
    CIM_LogicalFile REF PartComponent;
};


CMPI Instance List

[
Abstract, Version ("2.2.0"),
Description ("Example instance that can be stored in the CWS_InstanceList repository")
]
class CWS_Instance : CIM_ManagedElement
{  
   [Key, Description ("Name of the class that created this instance")]
   string CreationClassName;

   [Key, Description ("Unique identifier for each instance of this class")]  
   string Id;

   /* EXPAND THIS CLASS BY DEFINING MORE PROPERTIES HERE */
};


CMPI Method Test

[
Abstract, Version ("2.2.0"),
Description ("Test class containing all the simple property and method types")
]
class TST_MethodProperties : CIM_ManagedElement
{  
   [Key, Description ("Name of the class that created this instance")]
   string CreationClassName;

   [Key, Description ("Unique identifier for each instance of this class")]  
   string Id;

   /* EXPAND THIS CLASS BY DEFINING MORE PROPERTIES HERE */

   [Maxlen(256), Description ("a string property")]
   string Property_string;

   [Description ("a uint8 property")]
   uint8 Property_uint8;

   [Description ("a uint16 property")]
   uint16 Property_uint16;

   [Description ("a uint32 property")]
   uint32 Property_uint32;

   [Description ("a uint64 property")]
   uint64 Property_uint64;

   [Description ("a sint8 property")]
   sint8 Property_sint8;

   [Description ("a sint16 property")]
   sint16 Property_sint16;

   [Description ("a sint32 property")]
   sint32 Property_sint32;

   [Description ("a sint64 property")]
   sint64 Property_sint64;

   [Description ("a boolean property")]
   boolean Property_boolean;

   [Description ("a real32 property")]
   real32 Property_real32;

   [Description ("a real64 property")]
   real64 Property_real64;

   [Description ("a dateTime property")]
   dateTime Property_dateTime;

   [Description ("a char16 property")]
   char16 Property_char16;

   /* Methods with different return types */

   [Description ("Method that return a string")]
   string Method_string();
                                                                                                                      
   [Description ("Method that return a uint8")]
   uint8 Method_uint8();

   [Description ("Method that return a uint16")]
   uint16 Method_uint16();
                                                                                                                      
   [Description ("Method that return a uint32")]
   uint32 Method_uint32();
                                                                                                                      
   [Description ("Method that return a uint64")]
   uint64 Method_uint64();
                                                                                                                      
   [Description ("Method that return a sint8")]
   sint8 Method_sint8();
                                                                                                                      
   [Description ("Method that return a sint16")]
   sint16 Method_sint16();
                                                                                                                      
   [Description ("Method that return a sint32")]
   sint32 Method_sint32();
                                                                                                                      
   [Description ("Method that return a sint64")]
   sint64 Method_sint64();
                                                                                                                      
   [Description ("Method that return a boolean")]
   boolean Method_boolean();
                                                                                                                      
   [Description ("Method that return a real32")]
   real32 Method_real32();
                                                                                                                      
   [Description ("Method that return a real64")]
   real64 Method_real64();
                                                                                                                      
   [Description ("Method that return a dateTime")]
   dateTime Method_dateTime();
                                                                                                                      
   [Description ("Method that return a char16")]
   char16 Method_char16();

   /* Methods with different input argument types */

   [Description ("Method that inputs a string argument")]
   boolean Method_string_in( [IN] string Arg_string );

   [Description ("Method that inputs a uint8 argument")]
   boolean Method_uint8_in( [IN] uint8 Arg_uint8 );

   [Description ("Method that inputs a uint16 argument")]
   boolean Method_uint16_in( [IN] uint16 Arg_uint16 );
                                                                                                                      
   [Description ("Method that inputs a uint32 argument")]
   boolean Method_uint32_in( [IN] uint32 Arg_uint32 );
                                                                                                                      
   [Description ("Method that inputs a uint64 argument")]
   boolean Method_uint64_in( [IN] uint64 Arg_uint64 );
                                                                                                                      
   [Description ("Method that inputs a sint8 argument")]
   boolean Method_sint8_in( [IN] sint8 Arg_sint8 );
                                                                                                                      
   [Description ("Method that inputs a sint16 argument")]
   boolean Method_sint16_in( [IN] sint16 Arg_sint16 );
                                                                                                                      
   [Description ("Method that inputs a sint32 argument")]
   boolean Method_sint32_in( [IN] sint32 Arg_sint32 );
                                                                                                                      
   [Description ("Method that inputs a sint64 argument")]
   boolean Method_sint64_in( [IN] sint64 Arg_sint64 );
                                                                                                                      
   [Description ("Method that inputs a boolean argument")]
   boolean Method_boolean_in( [IN] boolean Arg_boolean );
                                                                                                                      
   [Description ("Method that inputs a real32 argument")]
   boolean Method_real32_in( [IN] real32 Arg_real32 );
                                                                                                                      
   [Description ("Method that inputs a real64 argument")]
   boolean Method_real64_in( [IN] real64 Arg_real64 );
                                                                                                                      
   [Description ("Method that inputs a dateTime argument")]
   boolean Method_dateTime_in( [IN] dateTime Arg_dateTime );
                                                                                                                      
   [Description ("Method that inputs a char16 argument")]
   boolean Method_char16_in( [IN] char16 Arg_char16 );

   /* Methods with different output argument types */

   [Description ("Method that outputs a string argument")]
   boolean Method_string_out( [OUT] string Arg_string );
                                                                                                                      
   [Description ("Method that outputs a uint8 argument")]
   boolean Method_uint8_out( [OUT] uint8 Arg_uint8 );
                                                                                                                      
   [Description ("Method that outputs a uint16 argument")]
   boolean Method_uint16_out( [OUT] uint16 Arg_uint16 );
                                                                                                                      
   [Description ("Method that outputs a uint32 argument")]
   boolean Method_uint32_out( [OUT] uint32 Arg_uint32 );
                                                                                                                      
   [Description ("Method that outputs a uint64 argument")]
   boolean Method_uint64_out( [OUT] uint64 Arg_uint64 );
                                                                                                                      
   [Description ("Method that outputs a sint8 argument")]
   boolean Method_sint8_out( [OUT] sint8 Arg_sint8 );
                                                                                                                      
   [Description ("Method that outputs a sint16 argument")]
   boolean Method_sint16_out( [OUT] sint16 Arg_sint16 );
                                                                                                                      
   [Description ("Method that outputs a sint32 argument")]
   boolean Method_sint32_out( [OUT] sint32 Arg_sint32 );
                                                                                                                      
   [Description ("Method that outputs a sint64 argument")]
   boolean Method_sint64_out( [OUT] sint64 Arg_sint64 );
                                                                                                                      
   [Description ("Method that outputs a boolean argument")]
   boolean Method_boolean_out( [OUT] boolean Arg_boolean );
                                                                                                                      
   [Description ("Method that outputs a real32 argument")]
   boolean Method_real32_out( [OUT] real32 Arg_real32 );
                                                                                                                      
   [Description ("Method that outputs a real64 argument")]
   boolean Method_real64_out( [OUT] real64 Arg_real64 );
                                                                                                                      
   [Description ("Method that outputs a dateTime argument")]
   boolean Method_dateTime_out( [OUT] dateTime Arg_dateTime );
                                                                                                                      
   [Description ("Method that outputs a char16 argument")]
   boolean Method_char16_out( [OUT] char16 Arg_char16 );

   /* Methods with multiple input/output arguments */

   [Description ("Method that inputs multiple argument types")]
   boolean Method_all_in( [IN] string Arg_string,
			  [IN] uint8 Arg_uint8,
			  [IN] uint16 Arg_uint16,
                          [IN] uint32 Arg_uint32,
                          [IN] uint64 Arg_uint64,
                          [IN] sint8 Arg_sint8,
                          [IN] sint16 Arg_sint16,
                          [IN] sint32 Arg_sint32,
                          [IN] sint64 Arg_sint64,
                          [IN] boolean Arg_boolean,
                          [IN] real32 Arg_real32,
                          [IN] real64 Arg_real64,
                          [IN] dateTime Arg_dateTime,
                          [IN] char16 Arg_char16 );

  [Description ("Method that outputs multiple argument types")]
   boolean Method_all_out( [OUT] string Arg_string,
                           [OUT] uint8 Arg_uint8,
                           [OUT] uint16 Arg_uint16,
                           [OUT] uint32 Arg_uint32,
                           [OUT] uint64 Arg_uint64,
                           [OUT] sint8 Arg_sint8,
                           [OUT] sint16 Arg_sint16,
                           [OUT] sint32 Arg_sint32,
                           [OUT] sint64 Arg_sint64,
                           [OUT] boolean Arg_boolean,
                           [OUT] real32 Arg_real32,
                           [OUT] real64 Arg_real64,
                           [OUT] dateTime Arg_dateTime,
                           [OUT] char16 Arg_char16 );
};


CMPI Reef

#pragma locale ( "en_US" )

//qualifier Description : string;

// ===================================================================
// ReefLogicalVolume
// ===================================================================
   [Description (
     "The following class describes LogicalVolume as depicted on PDM's" 
     "Mr_LogicalVolume")]

class Reef_LogicalVolume
{
    [Key]
    Sint32 key;
    
    [Description (
         "storageFacilityImageMTMS")
    ]
    string storageFacilityImageMTMS;
    [Description (
          "The type of the logical volume")
    ]
    sint32 volumeType;
    [Description (
          "The id of the logical volume")
    ]
    string logicalVolumeNum;
    [Description (
          "The subsystem of the logical volume")
    ]
    string logicalSubsystem;
    [Description (
          "lssGroup")
    ]
    sint32 lssGroup;
    [Description (
          "addressGroup")
    ]
    string addressGroup;
    [Description (
          "The alias (nickname) of the group")
    ]
    sint32 aliasVolumeGroup;
    [Description (
          "origBaseLogVolNum")
    ]
    string origBaseLogVolNum;
    [Description (
          "The user name of this logical volume")
    ]
    string userName;
    [Description (
          "The segment pool this logical volume belongs to")
    ]
    sint32 segPool;
    [Description (
          "dataType")
    ]
    sint32 dataType;
    [Description (
          "dynamicSegAlloc")
    ]
    sint32 dynamicSegAlloc;
    [Description (
          "dataSharingAllowed")
    ]
    sint32 dataSharingAllowed;
    [Description (
          "overridDefPriority")
    ]
    sint32 overridDefPriority;
    [Description (
          "defPriorityOverVal")
    ]
    sint32 defPriorityOverVal;
    [Description (
          "ckdPriorityOffset")
    ]
    sint32 ckdPriorityOffset;
    [Description (
          "requestedCapacity")
    ]
    sint32 requestedCapacity;
    [Description (
          "The capacity of the logical volume")
    ]
    sint32 capacity;
    [Description (
          "deviceMTM")
    ]
    sint32 deviceMTM;
    [Description (
          "ckdVolumeSerialNum")
    ]
    string ckdVolumeSerialNum;
    [Description (
          "accessState")
    ]
    sint32 accessState;
    [Description (
          "The state of the data in this logical volume")
    ]
    sint32 dataState;
    [Description (
          "configurationState")
    ]
    sint32 configurationState;
    [Description (
          "creationDate")
    ]
    sint32 creationDate;
    [Description (
          "codeLevel")
    ]
    string codeLevel;
};