" Return nonzero if test fails. Default(29346)\n"}
Clients.cimcli.CIMCLIClient.NI_COMMAND_HELP:string {
- "ni enumerateInstanceNames Enumerate instancenames of <instancename>\n"}
+ "ni enumerateInstanceNames Enumerate instancenames of <classname>\n"}
Clients.cimcli.CIMCLIClient.NI_COMMAND_EXAMPLE:string {
- "cimcli ni -n test/TestProvider TEST_Person\n"
- " -- enumerateinstancenames of class\n"}
+ "cimcli ni -n test/TestProvider TST_Person\n"
+ " -- Enumerate Instance Names of class TST_Person\n"}
Clients.cimcli.CIMCLIClient.NI_COMMAND_OPTIONS:string {
- " -n, classname\n"}
+ " -n\n"}
Clients.cimcli.CIMCLIClient.OPTIONS_STRING:string {
"Valid options for this command are :"}
"Examples :\n"}
Clients.cimcli.CIMCLIClient.NIALL_COMMAND_HELP:string {
- "niall enumallInstanceNames Enumerate all instancenames in namespace.\n"}
+ "niall enumallInstanceNames Enumerate all instancenames in <namespace>.\n"}
Clients.cimcli.CIMCLIClient.EI_COMMAND_HELP:string {
"ei enumerateInstances Enumerate instances of <classname>\n"}
Clients.cimcli.CIMCLIClient.NC_COMMAND_HELP:string {
- "nc enumerateClassNames Enumerate Class Names of [ <classname> ]\n"}
+ "nc enumerateClassNames Enumerate Class Names of [ <classname> ]. Classname optional\n"}
Clients.cimcli.CIMCLIClient.EC_COMMAND_HELP:string {
- "ec enumerateClasses Enumerate classes of [ <classname> ]\n"}
+ "ec enumerateClasses Enumerate classes of [ <classname> ]. ClassName optional.\n"}
Clients.cimcli.CIMCLIClient.GC_COMMAND_HELP:string {
"gc getClass Get class of <classname>\n" }
Clients.cimcli.CIMCLIClient.GI_COMMAND_HELP:string {
- "gi getInstance Get instance of <objectname> | <classname>\n"}
+ "gi getInstance Get instance of <objectname> |\n"
+ " <classname> *<keyname=value> |\n"
+ " <classname> (interactive mode)\n"}
+ Clients.cimcli.CIMCLIClient.TI_COMMAND_HELP:string {
+ "ti testInstance Test instance of <objectname> *<name=value> |\n"
+ " <classname> *<name=value> |\n"}
Clients.cimcli.CIMCLIClient.CI_COMMAND_HELP:string {
- "ci createInstance Create one Instance of <Class> *<name=param>\n"}
+ "ci createInstance Create Instance of <Class> *<name=value>\n"}
Clients.cimcli.CIMCLIClient.DI_COMMAND_HELP:string {
- "di deleteInstance Delete Instance of <objectname> or\n"
+ "di deleteInstance Delete Instance of <objectname>,\n"
+ " <classname> *<keyname=value>, or \n"
" interactive of <className>\n"}
Clients.cimcli.CIMCLIClient.CC_COMMAND_HELP:string {
"cc createClass Not supported\n"}
Clients.cimcli.CIMCLIClient.MI_COMMAND_HELP:string {
- "mi modifyInstance Not supported\n"}
+ "mi modifyInstance Modify Instance of <objectname> *<name=value>\n"
+ " | <classname> *<name=value>\n"}
Clients.cimcli.CIMCLIClient.DC_COMMAND_HELP:string {
"dc deleteClass Delete Class of <classname>\n"}
Clients.cimcli.CIMCLIClient.GP_COMMAND_HELP:string {
- "gp getProperty TBD\n"}
+ "gp getProperty get single property of <object name>\n"}
Clients.cimcli.CIMCLIClient.SP_COMMAND_HELP:string {
- "sp setProperty TBD\n"}
+ "sp setProperty set a single property of <object-name>\n"}
Clients.cimcli.CIMCLIClient.GQ_COMMAND_HELP:string {
"gq getQualifier Get Qualifier of <qualifiername>\n"}
" -n, -lo, -iq, -pl, includeClassOrigin\n"}
Clients.cimcli.CIMCLIClient.CI_COMMAND_EXAMPLE:string {
- "cimcli ci -n test/TestProvider TEST_Person Name=Michael\n"
- " -- Create Instance of class \n"}
+ "cimcli ci -n test/TestProvider TST_Person Name=Michael SSN=333\n"
+ " -- Create Instance of class TST_Person with properties Name\n"
+ " and SSN \n"}
Clients.cimcli.CIMCLIClient.CI_COMMAND_OPTIONS:string {
" -n\n"}
+ Clients.cimcli.CIMCLIClient.TI_COMMAND_EXAMPLE:string {
+ "cimcli ti -n test/TestProvider TST_Person Name=Mike SSN=333\n"
+ " -- Test Instance of class for equality of Name and SSN\n"
+ " properties. Returns error code if instance in server\n"
+ " does not have same properties and values as the\n"
+ " instance built from input\n"}
+
+ Clients.cimcli.CIMCLIClient.TI_COMMAND_OPTIONS:string {
+ " -n, -lo, -iq, -pl, includeClassOrigin\n"}
+
Clients.cimcli.CIMCLIClient.DI_COMMAND_EXAMPLE:string {
- "cimcli di -n test/TestProvider TEST_Person\n"
- " -- Delete Instance of class interactively\n"}
+ "cimcli di -n test/TestProvider TST_Person\n"
+ "cimcli di -n test/TestProvider TST_Person\n"
+ " -- Delete Instance of class TST_Person interactively\n"
+ "or\n"
+ " cimcli di -n test/TestProvider TST_Person name=Mike\n"
+ " -- Delete Instance of class TEST_Persion with key property\n"
+ " name equal Mike using instance builder format to\n"
+ " define object path\n"
+ "or\n"
+ " cimcli di -n test/TestProvider TST_Person.name=\\\\\"Mike\\\\\"\n"
+ " -- Delete Instance of class TST_Persion with object path\n"
+ " TST_Person.name=\"Mike\" using object path input format\n"}
Clients.cimcli.CIMCLIClient.DI_COMMAND_OPTIONS:string {
" -n\n"}
+ Clients.cimcli.CIMCLIClient.MI_COMMAND_EXAMPLE:string {
+ "cimcli mi -n test/TestProvider TST_Person Name=Mike SSN=444\n"
+ " -- Modifies the Instance if it exists using rules of DMTF \n"
+ " modifyInstance operation.\n"}
+
+ Clients.cimcli.CIMCLIClient.MI_COMMAND_OPTIONS:string {
+ " -n -pl (defines properties to be modified)\n"}
+
Clients.cimcli.CIMCLIClient.DC_COMMAND_EXAMPLE:string {
- "cimcli dc -n test/TestProvider TEST_Person\n"
- " -- Deletes the Class when there are no instance and\n"
- " sub-class for this class\n"}
+ "cimcli dc -n test/TestProvider TST_Person\n"
+ " -- Deletes the Class when there are no instanceS and\n"
+ " sub-classS for this class\n"}
Clients.cimcli.CIMCLIClient.DC_COMMAND_OPTIONS:string {
" -n\n"}
Clients.cimcli.CIMCLIClient.GQ_COMMAND_EXAMPLE:string {
"cimcli gq Association\n"
- " -- Get the qualifiers in mof output format\n"}
+ " -- Get the qualifier named Association in mof output\n"
+ " in the default namespace (normally root/cimv2)"}
Clients.cimcli.CIMCLIClient.GQ_COMMAND_OPTIONS:string {
- " -n, qualifierName\n"}
+ " -n\n"}
Clients.cimcli.CIMCLIClient.EQ_COMMAND_EXAMPLE:string {
"cimcli eq -n test/TestProvider\n"
Clients.cimcli.CIMCLIClient.DQ_COMMAND_EXAMPLE:string {
"cimcli dq -n test/TestProvider ASSOCIATION\n"
- " -- Delete Qualifier Association in namespace\n"
+ " -- Delete Qualifier named Association in namespace\n"
" test/TestProvider\n"}
Clients.cimcli.CIMCLIClient.DQ_COMMAND_OPTIONS:string {
Clients.cimcli.CIMCLIClient.A_COMMAND_EXAMPLE:string {
"cimcli a TST_Person.name=\\\"Mike\\\" -n test/TestProvider\n"
- " -ac TST_Lineager"
+ " -ac TST_Lineage"
"\n or\n"
"cimcli a TST_Person -n test/TestProvider -ac TST_Lineage\n"}
Clients.cimcli.CIMCLIClient.AN_COMMAND_EXAMPLE:string {
"cimcli an TST_Person.name=\\\"Mike\\\" -n test/TestProvider\n"
" -ac TST_Lineage"
- "\n or\n"
+ "\nor\n"
"cimcli an TST_Person -n test/TestProvider -ac TST_Lineage\n"}
Clients.cimcli.CIMCLIClient.AN_COMMAND_OPTIONS:string {
Clients.cimcli.CIMCLIClient.R_COMMAND_EXAMPLE:string {
"cimcli r TST_Person.name=\\\"Mike\\\" -n test/TestProvider\n"
" -rc TST_Lineage"
- "\n or\n"
+ "\nor\n"
"cimcli r TST_Person -n test/TestProvider -rc TST_Lineage\n"}
Clients.cimcli.CIMCLIClient.R_COMMAND_OPTIONS:string {
Clients.cimcli.CIMCLIClient.RN_COMMAND_EXAMPLE:string {
"cimcli rn TST_Person.name=\\\"Mike\\\" -n test/TestProvider\n"
" -rc TST_Lineage"
- "\n or\n"
+ "\nor\n"
"cimcli rn TST_Person -n test/TestProvider -rc TST_Lineage\n"}
Clients.cimcli.CIMCLIClient.RN_COMMAND_OPTIONS:string {
"-s ssl. Specifies to connect over HTTPS. Default(false)\n"}
Clients.cimcli.CIMCLIClient.CLIENTCERT_OPTION_HELP:string {
- "--cert clientCert. Specifies a client certificate to present to the server.\n"
+ "--cert clientCert. Specifies a client certificate file path to present to the server.\n"
" This is optional and only has an effect on connections\n"
" made over HTTPS using -s. Default()\n"}
Clients.cimcli.CIMCLIClient.CLIENTKEY_OPTION_HELP:string {
- "--key clientKey. Specifies a client private key.\n"
+ "--key clientKey. Specifies a client private keyfile path.\n"
" This is optional and only has an effect on connections\n"
" made over HTTPS using -s. Default()\n"}
Clients.cimcli.CIMCLIClient.DEEPINHERITANCE_OPTION_HELP:string{
"-di deepInheritance. If set deepInheritance parameter\n"
- " set true . Default(false)\n"}
+ " set true. Default(false)\n"}
Clients.cimcli.CIMCLIClient.LOCALONLY_OPTION_HELP:string {
"-lo localOnly. DEPRECATED. This was used to set LocalOnly.\n"
" (without spaces). Use "" for empty. Default(###!###)\n"}
Clients.cimcli.CIMCLIClient.ASSOCCLASS_OPTION_HELP:string {
- "-ac assocClass. Defines a assocClass string for Associator calls. Default()\n"}
+ "-ac assocClass. Defines a assocation Class string for Associator calls. Default()\n"}
Clients.cimcli.CIMCLIClient.ASSOCROLE_OPTION_HELP:string {
- "-ar assocRole. Defines a role string for Associatiors AssocRole\n"
+ "-ar assocRole. Defines a role string for Associatiors. AssocRole\n"
" parameter. Default()\n"}
Clients.cimcli.CIMCLIClient.ROLE_OPTION_HELP:string {
"-o outputformats. Output in xml, mof, txt. Default(mof)\n"}
Clients.cimcli.CIMCLIClient.XMLOUTPUT_OPTION_HELP:string {
- "-x xmlOutput. Output objects in xml instead of mof format . Default(false)\n"}
+ "-x xmlOutput. Output objects in xml format . Default(false)\n"}
Clients.cimcli.CIMCLIClient.VERSION_OPTION_HELP:string {
"--version version. Displays software Version. Default(false)\n"}
Clients.cimcli.CIMCLIClient.VERBOSE_OPTION_HELP:string {
- "-v verbose. Verbose Display. Includes Detailed Param Input\n"
- " display . Default(false)\n"}
+ "-v verbose. Verbose Display. Outputs detailed parameter input\n"
+ " display and other request processing information . Default(false)\n"}
Clients.cimcli.CIMCLIClient.SUMMARY_OPTION_HELP:string {
"--sum summary. Displays only summary count for enumerations,\n"
Clients.cimcli.CIMCLIClient.HELPCOMMANDS_OPTION_HELP:string {
"-hc help commands. Prints CIM Operation command list. Default(false)\n"}
- Clients.cimcli.CIMCLIClient.CONNECTIONTIMEOUT_OPTION_HELP:
- string {"--timeout connecttimeout. Set the connection timeout in seconds. Default(0)\n"}
+ Clients.cimcli.CIMCLIClient.CONNECTIONTIMEOUT_OPTION_HELP:string {
+ "--timeout connecttimeout. Set the connection timeout in seconds. Default(0)\n"}
Clients.cimcli.CIMCLIClient.INTERACTIVE_OPTION_HELP:string {
"-i interactive. Interactively ask user to select instances.\n"
" 0 is off. Default(0)\n"}
Clients.cimcli.CIMCLIClient.REPEAT_OPTION_HELP:string {
- "--r repeat. Number of times to repeat the function.\n"
+ "--r repeat. Number of times to repeat the operation.\n"
" Zero means one time. Default(0)\n"}
Clients.cimcli.CIMCLIClient.TIME_OPTION_HELP:string {
//
//%/////////////////////////////////////////////////////////////////////////////
+/*
+Test Provider for cimcli. This provider is intended to be used as a
+test driver only for cimcli.
+
+This provider is based on the Test_CLITestProviderClass class. This class
+includes all of the CIM Data types in both scalar and array form
+and provides the following operations:
+
+1. Initialize - Creates a single instance of the class with all of the
+properties initialized. this is placed in an array.
+
+2. EnumerateInstances - Returns all instances in the instances array
+
+3. GetInstance - Returns the single instance found in the array with the
+input object path if found
+
+4. Create instance - Creates a new instance of the target class and puts it
+into the array
+
+5. ModifyInstance - Attempts to modify an instance of the target class if one
+is found in the instances array.
+
+6. DeleteInstance - Delete an instance of the test class if found in the
+instances array.
+
+6. Invoke method: Includes several methods as follows:
+ TBD
+
+LIMITATIONS: The provider is intended to be used in a single namespace and so
+does not include the namespace in the instances placed in the array. Therefore
+if it is enabled for multiple namespaces, a user from some other namespace could
+remove, get, or enumerate an instance created in another namespace.
+
+It is intended to run a set of tests fairly rapidly so does not hold itself in
+memory. Therefore, if instances are put into the array after the normal Pegasus
+timeout of providers for unload, they will be discarded.
+
+*/
#include "CLITestProvider.h"
#include <Pegasus/Common/PegasusAssert.h>
+#include <Pegasus/Common/Tracer.h>
+// Required because of some malignent link betweeh MessageLoader and Thread.h
+#include <Pegasus/Common/MessageLoader.h>
+#include <Pegasus/Common/Thread.h>
#include <Pegasus/Common/Mutex.h>
PEGASUS_USING_STD;
PEGASUS_USING_PEGASUS;
+
+String _toString(Boolean x)
+{
+ return((x)?"true" : "false");
+}
+
+static String _toString(const CIMPropertyList& pl)
+{
+ String s;
+
+ if (pl.isNull())
+ {
+ s = "NULL";
+ }
+ else if (pl.size() == 0)
+ {
+ s = "EMPTY";
+ }
+ else
+ {
+ for (Uint32 i = 0; i < pl.size(); i++)
+ {
+ if (i > 0)
+ {
+ s.append(", ");
+ }
+ s.append(pl[i].getString());
+ }
+ }
+ return s;
+}
+/*
+ Add the name value pair to the String target. The result is the pair
+ added to target in the form
+ [; ]name "=" value
+*/
+void _addParam(String& target, const String& name, const String& value)
+{
+ if (target.size() != 0)
+ {
+ target.append("; ");
+ }
+ target.append(name);
+ target.append("=");
+ target.append(value);
+}/*
+ Complete the host and namespace fields of an object path if there are
+ empty.
+*/
+void _completePath(const String& hostName,
+ const CIMNamespaceName& nameSpace,
+ CIMObjectPath& objectPath)
+{
+ if (objectPath.getHost().size() == 0)
+ objectPath.setHost(hostName);
+
+ if (objectPath.getNameSpace().isNull())
+ objectPath.setNameSpace(nameSpace);
+}
+// convert a fully qualified reference into a local reference
+// (class name and keys only).
+CIMObjectPath _localPath(const CIMObjectPath& inputPath)
+{
+ CIMObjectPath localPath = CIMObjectPath(
+ String(),
+ CIMNamespaceName(),
+ inputPath.getClassName(),
+ inputPath.getKeyBindings());
+ return localPath;
+}
+
+// Serializes access to the instances array during the CIM requests
static Mutex instanceArrayMutex;
CLITestProvider::CLITestProvider()
{
+ _initialized = false;
}
CLITestProvider::~CLITestProvider()
void CLITestProvider::initialize(CIMOMHandle & cimom)
{
_cimom = cimom;
-
- CIMInstance instance("Test_CLITestProviderClass");
-
- instance.addProperty(CIMProperty("Id", String("Mike")));
-
- instance.addProperty(CIMProperty("Name", String("Bob")));
- instance.setPath(CIMObjectPath("Test_CLITestProviderClass.Id=\"Mike\""));
-
- _instances.append(instance);
}
void CLITestProvider::terminate()
const Array<CIMParamValue> & inParameters,
MethodResultResponseHandler & handler)
{
+ initializeProvider(objectReference.getNameSpace());
+
// convert a fully qualified reference into a local reference
// (class name and keys only).
outString.append("Passed String Param Test\n");
}
}
-
outString.append("\n");
}
else
handler.deliver(CIMValue(outString));
}
}
+
+ // This simply returns all parameters and
+ // sets return value set to zero. This should provide a complete
+ // test of all input and output parameter types for cimcli
+ else if(methodName.equal("InOutParamTest"))
+ {
+ if (inParameters.size() > 0)
+ {
+ //simply returns all parameters
+ handler.deliverParamValue(inParameters);
+ }
+ handler.deliver(Uint32(0));
+ }
}
handler.complete();
}
-
void CLITestProvider::getInstance(
const OperationContext & context,
const CIMObjectPath & instanceReference,
const CIMPropertyList & propertyList,
InstanceResponseHandler & handler)
{
- handler.processing();
+ initializeProvider(instanceReference.getNameSpace());
- // create relative object path for comparison
- CIMObjectPath cimObjectPath(instanceReference);
+ handler.processing();
- cimObjectPath.setHost(String());
- cimObjectPath.setNameSpace(CIMNamespaceName());
+ AutoMutex autoMut(instanceArrayMutex);
- for (Uint32 i = 0, n = _instances.size(); i < n; i++)
+ Uint32 index;
+ if ((index = findInstance(instanceReference)) != PEG_NOT_FOUND)
{
- if(cimObjectPath == _instances[i].getPath())
+ // Put input parameters into the requestInputParameters property so
+ // they can be tested on by the client.
+ String text;
+ _addParam(text, "propertyList", _toString(propertyList));
+ _addParam(text, "includeQualifiers", _toString(includeQualifiers));
+ _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
+
+ // clone and filter the returned instance. Clone so the original
+ // not modified by filter.
+ try
{
- try
- {
- handler.deliver(_instances[i]);
- }
- catch(CIMException& e)
- {
- cerr << "Exception Occured : " << e.getMessage() << endl;
- }
- break;
+ CIMInstance temp = _instances[index].clone();
+ temp.addProperty(CIMProperty("requestInputParameters", text));
+ temp.filter(includeQualifiers,includeClassOrigin, propertyList);
+ handler.deliver(temp);
+ }
+ catch(CIMException& e)
+ {
+ cerr << "CIMCLITestProvider: Exception Occured on deliver : "
+ << e.getMessage() << endl;
+ throw CIMException(e);
}
}
+ else
+ {
+ throw CIMException(CIM_ERR_NOT_FOUND);
+ }
handler.complete();
}
const CIMPropertyList & propertyList,
InstanceResponseHandler & handler)
{
+ initializeProvider(ref.getNameSpace());
+
handler.processing();
+ AutoMutex autoMut(instanceArrayMutex);
+
+ CIMName reqClassName = ref.getClassName();
+
+ // Puts input parameters into the requestInputParameters property so
+ // they can be tested on by the client.
+ String text;
+ _addParam(text, "propertyList", _toString(propertyList));
+ _addParam(text, "includeQualifiers", _toString(includeQualifiers));
+ _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
+
for (Uint32 i = 0, n = _instances.size(); i < n; i++)
{
- try
- {
- handler.deliver(_instances[i]);
- }
- catch(CIMException& e)
+ if (reqClassName == _instances[i].getClassName())
{
- cerr << "Exception Occured : " << e.getMessage() << endl;
+ try
+ {
+ CIMInstance temp = _instances[i].clone();
+ temp.addProperty(CIMProperty("requestInputParameters", text));
+ temp.filter(includeQualifiers,includeClassOrigin,
+ propertyList);
+ handler.deliver(temp);
+ }
+ catch(CIMException& e)
+ {
+ cerr << "CIMCLITestProvider:Exception Occured : "
+ << e.getMessage() << endl;
+ throw CIMException(e);
+ }
}
}
-
handler.complete();
}
const CIMObjectPath & classReference,
ObjectPathResponseHandler & handler)
{
+ initializeProvider(classReference.getNameSpace());
+
handler.processing();
+ AutoMutex autoMut(instanceArrayMutex);
+
+ CIMName reqClassName = classReference.getClassName();
+
for (Uint32 i = 0, n = _instances.size(); i < n; i++)
{
- try
- {
- handler.deliver(_instances[i].getPath());
- }
- catch(CIMException& e)
+ if (reqClassName == _instances[i].getClassName())
{
- cerr << "Exception Occured : " << e.getMessage() << endl;
+ try
+ {
+ handler.deliver(_instances[i].getPath());
+ }
+ catch(CIMException& e)
+ {
+ cerr << "CIMCLITestProvider:Exception Occured : "
+ << e.getMessage() << endl;
+ throw CIMException(e);
+ }
}
}
-
handler.complete();
}
+
void CLITestProvider::modifyInstance(
const OperationContext & context,
const CIMObjectPath & instanceReference,
const CIMPropertyList & propertyList,
ResponseHandler & handler)
{
+ initializeProvider(instanceReference.getNameSpace());
handler.processing();
- // create relative object path for comparison
- CIMObjectPath cimObjectPath(instanceReference);
+ // convert a fully qualified reference into a local reference
+ // (class name and keys only).
- cimObjectPath.setHost(String());
- cimObjectPath.setNameSpace(CIMNamespaceName());
+ CIMClass mc = _getClass(instanceReference.getClassName(),
+ instanceReference.getNameSpace());
- for (Uint32 i = 0, n = _instances.size(); i < n; i++)
+ // TODO confirm the correctness of allowing either the input path or
+ // the build of the path from the instance to get the instance name
+ // to modify. Works but need to check DMTF specs.
+
+ // Get path from input instanceReference OR build it
+
+ CIMObjectPath localRef = (instanceReference.getKeyBindings().size() == 0)?
+ instanceObject.buildPath(mc)
+ :
+ _localPath(instanceReference);
+
+ AutoMutex autoMut(instanceArrayMutex);
+
+ // Find the proper instance.
+ Uint32 index;
+ if ((index = findInstance(localRef)) != PEG_NOT_FOUND)
{
- if(cimObjectPath == _instances[i].getPath())
+ // Modify the existing instance
+ Uint32 pos;
+ for (Uint32 j = 0 ; j < instanceObject.getPropertyCount() ; j++)
{
- String strNewValue;
- CIMConstProperty nameProperty = instanceObject.getProperty(
- instanceObject.findProperty("Name"));
- CIMValue cimValueObj = nameProperty.getValue();
- cimValueObj.get(strNewValue);
-
+ CIMConstProperty r1 = instanceObject.getProperty(j);
+ CIMProperty r2 = r1.clone();
+ Uint32 pos;
try
{
- _instances[i].removeProperty(
- _instances[i].findProperty("Name"));
- _instances[i].addProperty(CIMProperty("Name", strNewValue));
- }
+ if ((pos = _instances[index].findProperty(r2.getName()))
+ != PEG_NOT_FOUND)
+ {
+ _instances[index].removeProperty(pos);
+ _instances[index].addProperty(r2);
+ }
+ else // simply add the property since not in instance
+ {
+ // test if property is in class
+ if (mc.findProperty(r2.getName()) != PEG_NOT_FOUND)
+ {
+ _instances[index].addProperty(r2);
+ }
+ else
+ {
+ throw CIMException(CIM_ERR_INVALID_PARAMETER,
+ "Property Not in class " +
+ r2.getName().getString());
+ }
+ }
+ } // end try block
catch(CIMException& e)
{
- cerr << "Exception Occured : "<< e.getMessage() << endl;
+ throw CIMException(CIM_ERR_FAILED,
+ " Updating Property " + e.getMessage());
}
- break;
- }
+ } // for loop processing properties
+
+ handler.complete();
+ } // end if found
+ else
+ {
+ throw CIMException(CIM_ERR_NOT_FOUND);
}
- handler.complete();
}
void CLITestProvider::createInstance(
const CIMInstance & instanceObject,
ObjectPathResponseHandler & handler)
{
- CIMObjectPath newInstanceRef =
- CIMObjectPath(
- String::EMPTY,
- instanceReference.getNameSpace(),
- instanceReference.getClassName(),
- instanceReference.getKeyBindings());
-
- if (newInstanceRef.getKeyBindings().size() == 0)
+ initializeProvider(instanceReference.getNameSpace());
+
+ handler.processing();
+
+ CIMObjectPath newInstanceRef = _localPath(instanceReference);
+
+ AutoMutex autoMut(instanceArrayMutex);
+ // If there are no properties in the reference, try to get the
+ // key properties and their values from the instanceObject
+ if (instanceReference.getKeyBindings().size() == 0)
{
Array<CIMKeyBinding> keys;
}
}
+ // If the instance exists, throw already_exists exception
+ // Note: instances in the array do not have path component
+
+ Uint32 index;
+ if ((index = findInstance(newInstanceRef)) == PEG_NOT_FOUND)
+ {
+ // add the instance to the set of instances saved in the provider.
+ CIMInstance myInstance = instanceObject.clone();
+ myInstance.setPath(newInstanceRef);
+ _instances.append(myInstance);
+
+ // Deliver path of new instance
+ handler.deliver(newInstanceRef);
+ handler.complete();
+ }
+
+ else
+ {
+ throw CIMException(CIM_ERR_ALREADY_EXISTS);
+ }
+}
+
+void CLITestProvider::deleteInstance(
+ const OperationContext & context,
+ const CIMObjectPath & instanceReference,
+ ResponseHandler & handler)
+{
+ initializeProvider(instanceReference.getNameSpace());
+
+ handler.processing();
+
+ // convert a fully qualified reference into a local reference
+ // (class name and keys only).
+
AutoMutex autoMut(instanceArrayMutex);
- for (Uint32 i = 0; i < _instances.size(); i++)
+ Uint32 index;
+ if ((index = findInstance(instanceReference)) != PEG_NOT_FOUND)
+ {
+ _instances.remove(index);
+ }
+ else
+ {
+ throw CIMException(CIM_ERR_NOT_FOUND);
+ }
+
+ handler.complete();
+ return;
+}
+
+/*
+ Processing of associator/Reference Operation Requests
+
+ NOTE: This code is not based on any clear definition of the
+ relationship between objects but simply returning information
+ on instances that exist in the repository. Thus typically it returns
+ the target instance itself (i.e. association of an instance with
+ itself). This works since the only goal of this provider
+ is a syntatic test of cimcli, not any association structure. So our
+ association is that every instance is associated with itself. Note that
+ this removes any meaning from the role and assoc/result class parameters
+ but we test the validity of these by returning a property in the
+ returned isntances containing all of these values so that the client
+ can test to determine if the provider received what was input.
+*/
+void CLITestProvider::associators(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& associationClass,
+ const CIMName& resultClass,
+ const String& role,
+ const String& resultRole,
+ const Boolean includeQualifiers,
+ const Boolean includeClassOrigin,
+ const CIMPropertyList& propertyList,
+ ObjectResponseHandler& handler)
+{
+ initializeProvider(objectName.getNameSpace());
+
+ // Get the namespace and host names to create the CIMObjectPath
+ CIMNamespaceName nameSpace = objectName.getNameSpace();
+ String host = System::getHostName();
+
+ handler.processing();
+ // complete processing the request
+ // Puts input parameters into the requestInputParameters property so that
+ // they can be tested on by the client.
+ String text;
+ _addParam(text, "role", role);
+ _addParam(text, "resultRole", resultRole);
+ _addParam(text, "associationClass", associationClass.getString());
+ _addParam(text, "resultClass", resultClass.getString());
+ _addParam(text, "includeQualifiers", _toString(includeQualifiers));
+ _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
+ _addParam(text, "propertyList", _toString(propertyList));
+
+ // Return an instance of the associated class for every instance
+ // currently in the local list.
+ Uint32 index;
+ if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
{
- if (newInstanceRef == _instances[i].getPath())
+ try
{
- throw CIMObjectAlreadyExistsException(
- newInstanceRef.toString());
+ CIMInstance temp = _instances[index].clone();
+ temp.addProperty(CIMProperty("requestInputParameters", text));
+ temp.setPath(objectName);
+ temp.filter(includeQualifiers,
+ includeClassOrigin, propertyList);
+ handler.deliver(temp);
+ }
+ catch(CIMException& e)
+ {
+ cerr << "CIMCLITestProvider:Exception Occured : "
+ << e.getMessage() << endl;
+ throw CIMException(e);
}
}
+ handler.complete();
+}
+
+void CLITestProvider::associatorNames(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& associationClass,
+ const CIMName& resultClass,
+ const String& role,
+ const String& resultRole,
+ ObjectPathResponseHandler& handler)
+{
+ initializeProvider(objectName.getNameSpace());
+ // Get the namespace and host names to create the CIMObjectPath
+ CIMNamespaceName nameSpace = objectName.getNameSpace();
+ String host = System::getHostName();
handler.processing();
+ // complete processing the request
- CIMInstance newInstance(instanceObject);
- newInstance.setPath(newInstanceRef);
+ // Return an instance of the associated class for every instance
+ // currently in the local list. Simple since we just return the
+ // input path if the instance exists.
+ Uint32 index;
+ if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
+ {
+ try
+ {
+ handler.deliver(objectName);
+ }
+ catch(CIMException& e)
+ {
+ cerr << "CIMCLITestProvider:Exception Occured : "
+ << e.getMessage() << endl;
+ throw CIMException(e);
+ }
+ }
+ handler.complete();
+}
- _instances.append(newInstance);
+void CLITestProvider::references(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& resultClass,
+ const String& role,
+ const Boolean includeQualifiers,
+ const Boolean includeClassOrigin,
+ const CIMPropertyList& propertyList,
+ ObjectResponseHandler& handler)
+{
+ initializeProvider(objectName.getNameSpace());
+ // Get the namespace and host names to create the CIMObjectPath
+ CIMNamespaceName nameSpace = objectName.getNameSpace();
+ String host = System::getHostName();
- handler.deliver(_instances[_instances.size() -1].getPath());
+ handler.processing();
+
+ CIMName objectClassName = objectName.getClassName();
+ // if the target instance exists in the local storage, build the
+ // association class instance
+ AutoMutex autoMut(instanceArrayMutex);
+ Uint32 index;
+ if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
+ {
+ Array<CIMName> refClassArray;
+ refClassArray.append(CIMName("Test_CLITestProviderLinkClass"));
+
+ // Create a single instance of the Test_CLITestProviderLinkClass
+ // This creates a single fixed instance simply to allow the
+ // cimcli client to test results. It also places the input parameters
+ // into the text result so that the client can confirm that the
+ // input parameters were passed to the provider.
+
+ CIMInstance assocInstance("Test_CLITestProviderLinkClass");
+
+ assocInstance.addProperty(CIMProperty(CIMName("parent"),
+ objectName,
+ 0,
+ CIMName("Test_CLITestProviderClass")));
+
+ assocInstance.addProperty(CIMProperty(CIMName("child"),
+ objectName,
+ 0,
+ CIMName("Test_CLITestProviderClass")));
+
+
+ // Put input parameters into the requestInputParameters property so
+ // they can be tested on by the client.
+ String text;
+ _addParam(text, "role", role);
+ _addParam(text, "resultClass", resultClass.getString());
+ _addParam(text, "includeQualifiers", _toString(includeQualifiers));
+ _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
+ _addParam(text, "propertyList", _toString(propertyList));
+
+ assocInstance.addProperty(CIMProperty("requestInputParameters",
+ text));
+ // Create path for assoc instance.
+ CIMClass assocClass = _getClass(CIMName(
+ "Test_CLITestProviderLinkClass"),
+ nameSpace);
+
+ CIMObjectPath objectPath =
+ assocInstance.buildPath(assocClass);
+
+ _completePath(host, nameSpace, objectPath);
+
+ assocInstance.setPath(objectPath);
+
+ // complete processing the request
+ assocInstance.filter(includeQualifiers,
+ includeClassOrigin, propertyList);
+
+ handler.deliver(assocInstance);
+ }
handler.complete();
}
-void CLITestProvider::deleteInstance(
- const OperationContext & context,
- const CIMObjectPath & instanceReference,
- ResponseHandler & handler)
+// Return all references (association instance names) in which the given
+// object is involved.
+
+void CLITestProvider::referenceNames(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& resultClass,
+ const String& role,
+ ObjectPathResponseHandler& handler)
{
- CIMObjectPath newInstanceRef =
- CIMObjectPath(
- String::EMPTY,
- instanceReference.getNameSpace(),
- instanceReference.getClassName(),
- instanceReference.getKeyBindings());
+ CIMNamespaceName nameSpace = objectName.getNameSpace();
+ initializeProvider(nameSpace);
+ // Get the namespace and host names to create the CIMObjectPath
+ String host = System::getHostName();
+
+ // If the objectName exists in the local list, build the instance
+ // of the association and then build the path for this instance.
AutoMutex autoMut(instanceArrayMutex);
+ Uint32 index;
- handler.processing();
+ if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
+ {
+ Array<CIMName> refClassArray;
+ refClassArray.append(CIMName("Test_CLITestProviderLinkClass"));
+
+ CIMInstance assocInstance("Test_CLITestProviderLinkClass");
+
+ assocInstance.addProperty(CIMProperty(CIMName("parent"),
+ objectName,
+ 0,
+ CIMName("Test_CLITestProviderClass")));
+
+ assocInstance.addProperty(CIMProperty(CIMName("child"),
+ objectName,
+ 0,
+ CIMName("Test_CLITestProviderClass")));
+
+ CIMClass assocClass = _getClass(
+ CIMName("Test_CLITestProviderLinkClass"),
+ nameSpace);
+
+ // build path for this instance
+ CIMObjectPath objectPath =
+ assocInstance.buildPath(assocClass);
+
+ _completePath(host, nameSpace, objectPath);
+
+ handler.deliver(objectPath);
+ }
+ // complete processing the request
+ handler.complete();
+}
+
+
+/* get the defined class from the repository.
+ @param className CIMName name of the class to get
+ @return CIMClass with the class or unitialized if
+ there was an error in the getClass
+*/
+CIMClass CLITestProvider::_getClass(const CIMName& className,
+ const CIMNamespaceName& ns)
+{
+ CIMClass c;
+ try
+ {
+ c = _cimom.getClass(
+ OperationContext(),
+ ns,
+ className,
+ false,
+ true,
+ true,
+ CIMPropertyList());
+ }
+ catch (CIMException& e)
+ {
+ PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
+ "CLITestProvider GetClass operation failed: Class %s. Msg %s",
+ (const char*) className.getString().getCString(),
+ (const char*) e.getMessage().getCString()));
+ throw CIMException(CIM_ERR_FAILED);
+ }
+ return c;
+}
+
+/*
+ Find an instance in the instance array with path defined by
+ the input parameter. returns the index of the instance or PEG_NOT_FOUND
+*/
+Uint32 CLITestProvider::findInstance(const CIMObjectPath& path)
+{
+ CIMObjectPath localPath = _localPath(path);
for (Uint32 i = 0; i < _instances.size(); i++)
{
- if (newInstanceRef == _instances[i].getPath())
+ if(localPath == _instances[i].getPath())
{
- _instances.remove(i);
- break;
+ return i;
}
}
+ return PEG_NOT_FOUND;
+}
+// Create the instances that will be considered inherently part of the
+// provider for these tests. This includes one instance of each class
+// This was done with namespace input so that we could build association
+// instances that require namespace. It later turned out to be easier
+// to build them on the fly so that the namespace parameter and the
+// corresponding dynamic initialization of the provider (initializeProvider)
+// are not really necessary.
+
+void CLITestProvider::createInstances(const CIMNamespaceName& ns)
+{
+ AutoMutex autoMut(instanceArrayMutex);
- handler.complete();
+ // Create a single instance with all properties and with path
+ // independent of namespace or hostname
+
+ CIMInstance instance("Test_CLITestProviderClass");
+
+ instance.addProperty(CIMProperty("Id", String("Mike")));
+ instance.addProperty(CIMProperty("Name", String("Bob")));
+ instance.addProperty(CIMProperty("scalBool", Boolean(true)));
+ instance.addProperty(CIMProperty("scalUint8", Uint8(220)));
+ instance.addProperty(CIMProperty("scalSint8", Sint8(124)));
+ instance.addProperty(CIMProperty("scalUint16", Uint16(100)));
+ instance.addProperty(CIMProperty("scalSint16", Sint16(100)));
+ instance.addProperty(CIMProperty("scalUint32", Uint32(100)));
+ instance.addProperty(CIMProperty("scalSint32", Sint32(100)));
+ instance.addProperty(CIMProperty("scalUint64", Uint64(100)));
+ instance.addProperty(CIMProperty("scalReal32", Real32(100)));
+ instance.addProperty(CIMProperty("scalReal64", Real64(100)));
+ instance.addProperty(CIMProperty("scalString", String("teststring")));
+ instance.addProperty(CIMProperty("scalDateTime",
+ CIMDateTime("19991224120000.000000+360")));
+
+ // set Values into the corresponding array properties
+ Array<Boolean> ab;
+ ab.append(true); ab.append(false); ab.append(true);
+ instance.addProperty(CIMProperty("arrayBool", CIMValue(ab)));
+
+ Array<Uint8> auint8;
+ auint8.append(4); auint8.append(128); auint8.append(240);
+ instance.addProperty(CIMProperty("arrayUint8", CIMValue(auint8)));
+
+ Array<Sint8> asint8;
+ asint8.append(4); asint8.append(126); asint8.append(-126);
+ instance.addProperty(CIMProperty("arraySint8", CIMValue(asint8)));
+
+ Array<Uint16> auint16;
+ auint16.append(4); auint16.append(128); auint16.append(240);
+ instance.addProperty(CIMProperty("arrayUint16", CIMValue(auint16)));
+
+ Array<Sint16> asint16;
+ asint16.append(4); asint16.append(126); asint16.append(-126);
+ instance.addProperty(CIMProperty("arraySint16", CIMValue(asint16)));
+
+ Array<Uint32> auint32;
+ auint32.append(4); auint32.append(128); auint32.append(240);
+ instance.addProperty(CIMProperty("arrayUint32", CIMValue(auint32)));
+
+ Array<Sint32> asint32;
+ asint32.append(4); asint32.append(126); asint32.append(-126);
+ instance.addProperty(CIMProperty("arraySint32", CIMValue(asint32)));
+
+ Array<Uint64> auint64;
+ auint64.append(4); auint64.append(128); auint64.append(240);
+ instance.addProperty(CIMProperty("arrayUint64", CIMValue(auint64)));
+
+ Array<Real32> aReal32;
+ aReal32.append(4); aReal32.append(128); aReal32.append(240);
+ instance.addProperty(CIMProperty("arrayReal32", CIMValue(aReal32)));
+
+ Array<Real64> aReal64;
+ aReal64.append(4); aReal64.append(128); aReal64.append(240);
+ instance.addProperty(CIMProperty("arrayReal64", CIMValue(aReal64)));
+
+ Array<String> aString;
+ aString.append("First"); aString.append("Second"); aString.append("Third");
+ instance.addProperty(CIMProperty("arrayString", CIMValue(aString)));
+
+ Array<CIMDateTime> aCIMDateTime;
+ aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
+ aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
+ aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
+ instance.addProperty(CIMProperty("arrayCIMDateTime",
+ CIMValue(aCIMDateTime)));
+ CIMObjectPath p("Test_CLITestProviderClass.Id=\"Mike\"");
+
+ instance.setPath(p);
+
+ _instances.append(instance);
+}
+
+void CLITestProvider::initializeProvider(const CIMNamespaceName& ns)
+{
+ if (!_initialized)
+ {
+ createInstances(ns);
+ }
+ _initialized = true;
}
#include <Pegasus/Common/Config.h>
#include <Pegasus/Provider/CIMMethodProvider.h>
#include <Pegasus/Provider/CIMInstanceProvider.h>
+#include <Pegasus/Provider/CIMAssociationProvider.h>
PEGASUS_USING_PEGASUS;
-class CLITestProvider : public CIMMethodProvider, public CIMInstanceProvider
+class CLITestProvider :
+ public CIMMethodProvider,
+ public CIMInstanceProvider,
+ public CIMAssociationProvider
{
public:
CLITestProvider();
const CIMObjectPath & ref,
ResponseHandler & handler);
+ // CIMAssociationProvider interface
+ virtual void associators(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& associationClass,
+ const CIMName& resultClass,
+ const String& role,
+ const String& resultRole,
+ const Boolean includeQualifiers,
+ const Boolean includeClassOrigin,
+ const CIMPropertyList& propertyList,
+ ObjectResponseHandler& handler);
+
+ virtual void associatorNames(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& associationClass,
+ const CIMName& resultClass,
+ const String& role,
+ const String& resultRole,
+ ObjectPathResponseHandler& handler);
+
+ virtual void references(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& resultClass,
+ const String& role,
+ const Boolean includeQualifiers,
+ const Boolean includeClassOrigin,
+ const CIMPropertyList& propertyList,
+ ObjectResponseHandler& handler);
+
+ virtual void referenceNames(
+ const OperationContext& context,
+ const CIMObjectPath& objectName,
+ const CIMName& resultClass,
+ const String& role,
+ ObjectPathResponseHandler& handler);
+
protected:
Array<CIMInstance> _instances;
private:
- CIMOMHandle _cimom;
+ void createInstances(const CIMNamespaceName& ns);
+ void initializeProvider(const CIMNamespaceName& ns);
+
+ Uint32 findInstance(const CIMObjectPath& path);
+
+ CIMClass _getClass(
+ const CIMName& className,
+ const CIMNamespaceName& ns);
+
+ CIMOMHandle _cimom;
+ Boolean _initialized;
+ // list of properties in the class
+ CIMPropertyList _propertyList;
};
#endif
#//
#//////////////////////////////////////////////////////////////////////////
-# Test the cimcli test Provider using the script
+# Test cimcli using the cimcli test Provider
ROOT = ../../../../..
DIR = Providers/TestProviders/CLITestProvider/tests
+QUOTE=\"
+
+ifeq ($(OS_TYPE),vms)
+QUOTE=""
+endif
+
include $(ROOT)/mak/config.mak
include $(ROOT)/mak/configschema.mak
MASTERRESULTFILE = $(ROOT)/src/$(DIR)/result.master
TABLEFORMATFILE = $(ROOT)/src/$(DIR)/tableformat
MASTERTABLEFORMATFILE = $(ROOT)/src/$(DIR)/tableformat.master
+HELPRESULTFILE = $(ROOT)/src/$(DIR)/helpresult
+MASTERHELPRESULTFILE = $(ROOT)/src/$(DIR)/helpresult.master
+NSRESULTFILE = $(ROOT)/src/$(DIR)/namespacetestresult
+MASTERNSRESULTFILE = $(ROOT)/src/$(DIR)/namespacetestresult.master
# sampleprovider\Load puts the sample MOF into a separate namespace.
-# The following variable defines this namespace. Note that
-# originally this Makefile was to do the install but that
-# was moved to sampleprovider/load
+# The following variable defines this namespace.
PROVIDERNS=test/TestProvider
+STATICNS=test/static
+
+## Define this namespace because it is based on CIM 2.5 which is
+## completely static and which we can use to test some of the
+## class and qualifier operations and feel assured that the
+## returned information is constant. The static namespace is defined to
+## be the current default and so changes with each new pegasus
+## default namespace change.
+TESTCIMV2=test/cimv2
depend:
general:
-poststarttests:
- @$(RM) $(RESULTFILE)
- @$(RM) $(TABLEFORMATFILE)
+## test the getclass operation. This serves both as a test of getclass
+## and a confirmation that we have not modified the class since the output
+## diff will fail if the class is modified
+getclass:
+ @$(ECHO) 0. +++++ Test For getClass
+ @$(ECHO) 0. +++++ Test For getClass >> $(RESULTFILE)
+ cimcli gc -n "$(PROVIDERNS)" Test_CLITestProviderClass >> $(RESULTFILE)
+ cimcli gc -n "$(PROVIDERNS)" Test_CLITestProviderLinkClass \
+ >> $(RESULTFILE)
+ @$(ECHO) 0. +++++ Test getClass
+
+### Test reference parameters
+testRefs:
@$(ECHO) 1. +++++ Test For Reference params
+ @$(ECHO) 1. +++++ Test For Reference params >> $(RESULTFILE)
+ ##@cimcli im Test_CLITestProviderClass ReferenceParamTest -n "$(PROVIDERNS)" -ip a=[class.k1=v1,k2=v2,k3=v3]
- @cimcli im Test_CLITestProviderClass ReferenceParamTest -n "$(PROVIDERNS)" -ip a=[class.k1=v1,k2=v2,k3=v3]
+ ##@$(ECHO) 2. +++++ Test String params which include square brackets
+ ##@cimcli im Test_CLITestProviderClass ReferenceParamTest -n "$(PROVIDERNS)" -ip a="\[string-param\]"
- @$(ECHO) 2. +++++ Test String params which include square brackets
- @cimcli im Test_CLITestProviderClass ReferenceParamTest -n "$(PROVIDERNS)" -ip a="\[string-param\]"
- @$(ECHO) 3. +++++ Test_CLITestProviderClass Instances Getproperty and setProperty for cimcli operation
+### test get and set property operations
+testPropertyOperations:
+ @$(ECHO) 2. +++++ Test Getproperty and setProperty
+ @$(ECHO) 2. +++++ Test Getproperty and setProperty >> $(RESULTFILE)
# @cimcli sp -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" Name John
@cimcli gp -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" Name >> $(RESULTFILE)
-
- @$(DIFF) $(MASTERRESULTFILE) $(RESULTFILE)
- @$(ECHO) +++++ TST_Person Instances GetProperty and SetProperty tests Passed.
- @$(ECHO)
- @$(ECHO) 4. +++++ Test table output format
+ ## Test property values for the predefined instance
+ @cimcli ni -n "$(PROVIDERNS)" Test_CLITestProviderClass >> $(RESULTFILE)
+ @cimcli ei -n "$(PROVIDERNS)" Test_CLITestProviderClass >> $(RESULTFILE)
+ @$(ECHO) 2. +++++ Test_CLITestProviderClass Instances
+
+### test create instance operations
+testCreateInstanceOperation:
+ @$(ECHO) 3. +++++ Test Instances create Instance
+ @$(ECHO) 3. +++++ Tests Instances create Instance >> $(RESULTFILE)
+
+ ## Test Instance Creation with scalars
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass Id="ScalarTest" \
+ scalBool=true scalUint8=12 scalSint8=12 scalUint16=500 \
+ scalSint16=500 scalUint32=9999 scalSint32=9999 \
+ scalUint64=99999 scalUint64=99999 scalString="testString" \
+ >> $(RESULTFILE)
+
+ ## Test the creation. Will do error exit if this fails
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id="ScalarTest" \
+ scalBool=true scalUint8=12 scalSint8=12 scalUint16=500 \
+ scalSint16=500 scalUint32=9999 scalSint32=9999 \
+ scalUint64=99999 scalUint64=99999 scalString="testString" \
+ >> $(RESULTFILE)
+
+ ## Test Instance Creation with arrays
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass Id="arrayTest" \
+ arrayBool=true,true,true,false,true \
+ arrayUint8=12 arraySint8=-127,0,12,127\
+ arrayUint32=99,0,31000,63000,4294967295 \
+ arraySint32=-32000,0,32000,-2147483648,2147483647 \
+ arrayUint64=99,0,31000,63000,18446744073709551615 \
+ arraySint64=-32000,0,32000,-9223372036854775808 \
+ scalString="testString" \
+ scalDateTime=19991224120000.000000+360 >> $(RESULTFILE)
+
+ ## run testintance against the instance just created
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id="arrayTest" \
+ arrayBool=true,true,true,false,true \
+ arrayUint8=12 arraySint8=-127,0,12,127\
+ arrayUint32=99,0,31000,63000,4294967295 \
+ arraySint32=-32000,0,32000,-2147483648,2147483647 \
+ arrayUint64=99,0,31000,63000,18446744073709551615 \
+ arraySint64=-32000,0,32000,-9223372036854775808 \
+ scalString="testString" \
+ scalDateTime=19991224120000.000000+360 >> $(RESULTFILE)
+
+ ## Test enumerate of All the instances we created
+ @cimcli ni -n "$(PROVIDERNS)" Test_CLITestProviderClass >> $(RESULTFILE)
+ @cimcli ei -n "$(PROVIDERNS)" Test_CLITestProviderClass >> $(RESULTFILE)
+
+###
+testModifyInstanceOperation:
+ @$(ECHO) 4. +++++ Test Instances modify Instance
+ @$(ECHO) 4. +++++ Test Instances modify Instance >> $(RESULTFILE)
+
+ @cimcli mi -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="ScalarTest" \
+ scalBool=false scalUint8=14 scalSint8=-12 scalUint16=501 \
+ scalSint16=501 scalUint32=9998 scalSint32=9999 \
+ scalUint64=888 scalUint64=1 >> $(RESULTFILE)
+
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="ScalarTest" \
+ scalBool=false scalUint8=14 scalSint8=-12 scalUint16=501 \
+ scalSint16=501 scalUint32=9998 scalSint32=9999 \
+ scalUint64=888 scalUint64=1 scalString=testString >> $(RESULTFILE)
+
+##### NOTE: This test reflects a possible error in Pegasus today. The
+##### key property should not be required in the input.
+ @cimcli mi -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass.Id=\"ScalarTest\" \
+ Id=ScalarTest \
+ scalBool=true scalUint8=15 scalSint8=-13 scalUint16=502 \
+ scalSint16=502 scalUint32=9997 scalSint32=9998 \
+ scalUint64=888 scalUint64=1 >> $(RESULTFILE)
+
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=ScalarTest \
+ scalBool=true scalUint8=15 scalSint8=-13 scalUint16=502 \
+ scalSint16=502 scalUint32=9997 scalSint32=9998 \
+ scalUint64=888 scalUint64=1 >> $(RESULTFILE)
+
+ @$(ECHO) +++++ Test modify instance Passed.
+
+
+### test Delete instance. Assumes instances created with testCreateInstance
+testDeleteInstanceOperation:
+ @$(ECHO) 5. +++++ Test delete instance
+ @$(ECHO) 5. +++++ Test delete instance >> $(RESULTFILE)
+
+ ## test delete with class name=value input
+ @cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass.Id=\"ScalarTest\" >> $(RESULTFILE)
+ @cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass Id=arrayTest >> $(RESULTFILE)
+
+ ## test with CIMObjectPath form of input
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="ScalarTest" \
+ scalBool=true \
+ scalUint8=12 scalSint8=12 \
+ scalUint16=500 scalSint16=500 \
+ scalUint32=9999 scalSint32=9999 \
+ scalUint64=99999 scalUint64=99999 \
+ scalString="testString" \
+ >> $(RESULTFILE)
+
+ ## Test the creation. Will do error exit if this fails
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="ScalarTest" \
+ scalBool=true scalUint8=12 scalSint8=12 scalUint16=500 \
+ scalSint16=500 scalUint32=9999 scalSint32=9999 \
+ scalUint64=99999 scalUint64=99999 scalString="testString" \
+ >> $(RESULTFILE)
+
+ @cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass Id=ScalarTest >> $(RESULTFILE)
+
+ @$(ECHO) +++++ Test delete instance Passed.
+
+### test invoke method with a variety of parameter data types
+testInvokeMethod:
+ @$(ECHO) 6. +++++ Test invokeMethod
+ @$(ECHO) 6. +++++ Test invokeMethod >> $(RESULTFILE)
+
+ ## test using inOutParameter method that returns all
+ ## input parameters as corresponding output parameters
+ @cimcli im Test_CLITestProviderClass -n "$(PROVIDERNS)" \
+ InOutParamTest \
+ scalBool=true \
+ arrayBool=true,false,true \
+ scalUint32=99 \
+ arrayUint32=99,0,31000,63000 \
+ scalSint32=-99 \
+ arraySint32=-32000,0,32000 \
+ scalString=ThisIsMyTest \
+ arrayString="one",two,"three","multiword string" \
+ scalDateTime=19991224120000.000000+360 \
+ arrayDateTime=19991224120000.000000+360,19991224120000.000000+360 \
+ >>$(RESULTFILE)
+ @$(ECHO) +++++ Test invoke method Passed.
+
+### test cimcli output with the table output format
+testTableOutputFormat:
+ @$(ECHO) 7. +++++ Test table output format
+ @$(ECHO) 7. +++++ Test table output format >> $(RESULTFILE)
+
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=Norman Name=Susan
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=Thomas Name=Peter
+ cimcli ei -n "$(PROVIDERNS)" \
+ -o table Test_CLITestProviderClass >> $(TABLEFORMATFILE)
- @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Norman Name=Susan
- @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Thomas Name=Peter
- @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Louis
- @cimcli ei -n "$(PROVIDERNS)" -o table Test_CLITestProviderClass >> $(TABLEFORMATFILE)
- @$(DIFF) $(MASTERTABLEFORMATFILE) $(TABLEFORMATFILE)
@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Norman\"
@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Thomas\"
- @cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Louis\"
+ @$(ECHO) +++++ Test table output format Passed.
+
+###
+### For now we only test getQualifier. Enumerate can have too many
+### surprises and set not implemented.
+testQualifierDecls:
+ @$(ECHO) 8. +++++ Test QualifierDecl Operations
+ @$(ECHO) 8. +++++ Test QualifierDecl Operations >> $(RESULTFILE)
+
+ @cimcli gq -n "$(TESTCIMV2)" Association >>$(RESULTFILE)
+ @$(ECHO) +++++ Test QualifierDecls Passed.
+
+###
+### Test the class operations. Note that we may have issues with the
+### enumerates and ordering. Also we use the static namespace to
+### assure that the classes do not change
+testClassOperations:
+ @$(ECHO) 9. +++++ getClass Operation
+ @$(ECHO) 9. +++++ getClass Operation >> $(RESULTFILE)
+
+ @cimcli nc -n $(TESTCIMV2) --sum -count 64 >>$(RESULTFILE)
+ @cimcli nc -n $(TESTCIMV2) >>$(RESULTFILE)
+ @cimcli gc CIM_ManagedElement -n $(TESTCIMV2) >>$(RESULTFILE)
+ @cimcli gc CIM_ManagedElement -n $(TESTCIMV2) -o xml >>$(RESULTFILE)
+ @$(ECHO) +++++ Test ClassOperations Passed.
+
+testPropertyListOption:
+ @$(ECHO) 10. +++++ testPropertyListOptions
+ @$(ECHO) 10. +++++ testPropertyListOptions >> $(RESULTFILE)
+
+ @cimcli gc CIM_ManagedElement -n $(STATICNS) -pl Caption \
+ >>$(RESULTFILE)
+ @cimcli gc CIM_ManagedElement -n $(STATICNS) \
+ -pl Caption,Description >>$(RESULTFILE)
+ @cimcli gc CIM_ManagedElement -n $(STATICNS) \
+ -pl Caption,Description,ElementName >>$(RESULTFILE)
+ @cimcli gc CIM_ManagedElement -n $(STATICNS) -pl "" >>$(RESULTFILE)
+
+ @cimcli ei -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ -pl scalBool,arrayUint64 >>$(RESULTFILE)
+ @cimcli ei -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ -pl "" >>$(RESULTFILE)
+
+ @cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ -pl scalBool,arrayUint64,scalString >>$(RESULTFILE)
+ @$(ECHO) +++++ Test testPropertyListOption Passed.
+
+# Test the different formats for input of getinstance operation
+testGetInstanceOperation:
+ @$(ECHO) 12. +++++ test getInstance Operation
+ @$(ECHO) 12. +++++ test getInstance Operation >> $(RESULTFILE)
+
+ @cimcli gi Test_CLITestProviderClass -n "$(PROVIDERNS)" Id=Mike \
+ >>$(RESULTFILE)
+
+ @cimcli gi Test_CLITestProviderClass -n "$(PROVIDERNS)" Id=Mike \
+ -pl Name,scalBool >>$(RESULTFILE)
+
+ @cimcli gi Test_CLITestProviderClass.Id=\"Mike\" -n "$(PROVIDERNS)" \
+ -pl Name,scalBool >>$(RESULTFILE)
+
+ @$(ECHO) +++++ Test getInstance Passed.
+
+# Test the testInstance Operation
+# Tests for positive (No error responses).
+testTestInstanceOperation:
+ @$(ECHO) 13. +++++ test TestInstance Operations
+ @$(ECHO) 13. +++++ test TestInstance Operations >> $(RESULTFILE)
+
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ Name=Bob >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ Name=Bob >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ scalSint32=100 >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ scalBool=true \
+ scalSint32=100 >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ arrayUint32=4,128,240 >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ arrayString="First","Second","Third" >>$(RESULTFILE)
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=Mike \
+ scalBool=true \
+ scalSint32=100 \
+ arrayUint32=4,128,240 \
+ arrayString="First","Second","Third" >>$(RESULTFILE)
+
+ @$(ECHO) +++++ Test testInstance Passed.
+
+## test integer input and test with decimal, hex, octal and binary integers
+testIntegerVariations:
+ ## Test variations on integer values
+ @$(ECHO) 14. +++++ test Integer Variations
+ @$(ECHO) 14. +++++ test Integer Variations >> $(RESULTFILE)
+
+
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ scalBool=true \
+ scalUint8=12 \
+ scalUint16=100 \
+ scalUint32=9999 \
+ scalUint64=99999 \
+ arrayUint32=99,0,31000,63000,4294967295 >> $(RESULTFILE)
+
+ ## display the created instance
+ @cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ >> $(RESULTFILE)
+
+ ## test values input
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ scalUint8=12 \
+ scalUint16=100 \
+ scalUint32=9999 \
+ scalUint64=99999 \
+ arrayUint32=99,0,31000,63000,4294967295 >> $(RESULTFILE)
+
+ ## test Hex
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ scalBool=true \
+ scalUint8=0xC
+ scalUint16=0X64 \
+ scalUint32=0X270F \
+ scalUint64=0X1869F \
+ arrayUint32=0X63,0,0X7918,0XF618,0X19999999 >> $(RESULTFILE)
+
+ ## test Octal
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ scalBool=true \
+ scalUint8=014
+ scalUint16=0144 \
+ scalUint32=023417 \
+ scalUint64=0303237 >> $(RESULTFILE)
+
+ ## test Binary
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest \
+ scalBool=true \
+ scalUint8=1100b
+ scalUint16=1100100b \
+ scalUint32=10011100001111b >> $(RESULTFILE)
+
+ @cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest >> $(RESULTFILE)
+
+ @$(ECHO) +++++ Test integerVariations Passed.
+
+## test the reference and reference name operations
+referencetests:
+ @$(ECHO) 15. +++++ referencetests
+ @$(ECHO) 15. +++++ referencetests >> $(RESULTFILE)
+ cimcli r Test_CLITestProviderClass -n "$(PROVIDERNS)" \
+ >> $(RESULTFILE)
+ cimcli rn Test_CLITestProviderClass -n "$(PROVIDERNS)" \
+ >> $(RESULTFILE)
+ cimcli r -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ >> $(RESULTFILE)
+ cimcli r -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ -r parent >> $(RESULTFILE)
+ cimcli rn -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ >> $(RESULTFILE)
+## This test confirms that specific input parameters are correctly passed
+## to the provider since the test provider returns this information
+## in a specific property.
+ cimcli r -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ -r child -rc Test_CLITestProviderLinkClass \
+ -pl requestInputParameters >> $(RESULTFILE)
+ @$(ECHO) +++++ Test referencetests Passed.
+
+## Test operation of the association and association name operations
+associationtests:
+ @$(ECHO) 16. +++++ associationtests
+ @$(ECHO) 16. +++++ associationtests >> $(RESULTFILE)
+ cimcli a Test_CLITestProviderClass -n "$(PROVIDERNS)" >> $(RESULTFILE)
+ cimcli an Test_CLITestProviderClass -n "$(PROVIDERNS)" >> $(RESULTFILE)
+ cimcli a -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ >> $(RESULTFILE)
+ cimcli an -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ >> $(RESULTFILE)
+ cimcli a -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ -pl "" >> $(RESULTFILE)
+### This test returns property with the input parameters
+ cimcli a -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Mike\" \
+ -ac Test_CLITestProviderLinkClass -rc Test_CLITestProviderClass \
+ -r child -rr parent -pl requestInputParameters \
+ >> $(RESULTFILE)
+ @$(ECHO) +++++ Test associationtests Passed.
+
+
+## test cimcli response to help option requests
+helpoutputtests:
+ @$(ECHO) 17. +++++ test Help Output
+ @$(ECHO) 17. +++++ test Help Output >> $(HELPRESULTFILE)
+
+ @cimcli --help >> $(HELPRESULTFILE)
+ @cimcli -hc >> $(HELPRESULTFILE)
+ @cimcli -ho >> $(HELPRESULTFILE)
+ @cimcli -h mi >> $(HELPRESULTFILE)
+
+ @$(ECHO) +++++ Test Help Output Passed.
+
+##
+## Test the parameter options for property definitions that
+## produce null or default property values
+##
+nullvaluetests:
+ @$(ECHO) 18. +++++ nullvaluetests
+ @$(ECHO) 18. +++++ nullvaluetests >> $(RESULTFILE)
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="NullValueTest" \
+ scalBool= defaultBool= \
+ scalUint32= defaultUint32= \
+ scalString= defaultString= >> $(RESULTFILE)
+
+ @cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="NullValueTest" >> $(RESULTFILE)
+
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="NullValueTest"
+ scalBool= defaultBool= \
+ scalUint32= defaultUint32= \
+ scalString= defaultString= >> $(RESULTFILE)
+
+ @cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="NullValueTest" >> $(RESULTFILE)
+
+ @cimcli ci -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=EmptyStringTest \
+ scalUint32= \
+ scalUint64=99999 \
+ arrayUint32=99,0,31000,63000,4294967295 \
+ scalString= \
+ defaultString! >> $(RESULTFILE)
+
+ @cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="EmptyStringTest" >> $(RESULTFILE)
+
+ @cimcli ti -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=EmptyStringTest \
+ scalUint32= \
+ scalUint64=99999 \
+ arrayUint32=99,0,31000,63000,4294967295 \
+ scalString= \
+ defaultString! >> $(RESULTFILE)
+
+ cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="EmptyStringTest" >> $(RESULTFILE)
+
+ @$(ECHO) +++++ Test nullvaluetests Passed.
+##
+## test the ns operation. Note that this test is subject to knowledge
+## of the number of namespaces and their names in the target system
+## We assume that this is generally a constant for the pegasus nightly
+## test environment.
+##
+namespacetests:
+ @$(ECHO) 19. +++++ namespacetests
+ @$(ECHO) 19. +++++ namespacetests >> $(NSRESULTFILE)
+ @cimcli ns >> $(NSRESULTFILE)
+ @cimcli ns --sum >> $(NSRESULTFILE)
+ @cimcli ns --sum -count 15
+
+ @$(ECHO) +++++ Test namespacetests Passed.
+
+## execute the set of targets defined below
+poststarttests:
+ ## remove existing master files
@$(RM) $(RESULTFILE)
@$(RM) $(TABLEFORMATFILE)
- @$(ECHO) +++++ Test table output format Passed.
+ @$(RM) $(HELPRESULTFILE)
+ @$(RM) $(NSRESULTFILE)
+
+ ## execute the list of tests
+ $(MAKE) getclass
+ $(MAKE) testQualifierDecls
+ $(MAKE) testClassOperations
+ $(MAKE) testRefs
+ $(MAKE) testPropertyOperations
+ $(MAKE) testCreateInstanceOperation
+ $(MAKE) testModifyInstanceOperation
+ $(MAKE) testDeleteInstanceOperation
+ $(MAKE) testInvokeMethod
+ $(MAKE) testTableOutputFormat
+ $(MAKE) testPropertyListOption
+ $(MAKE) testGetInstanceOperation
+ $(MAKE) testTestInstanceOperation
+ $(MAKE) testIntegerVariations
+ $(MAKE) referencetests
+ $(MAKE) associationtests
+ $(MAKE) helpoutputtests
+ $(MAKE) nullvaluetests
+ $(MAKE) namespacetests
+
+ @$(ECHO) +++++ Compare Result files
+ @$(DIFF) $(MASTERRESULTFILE) $(RESULTFILE)
+ @$(DIFF) $(MASTERTABLEFORMATFILE) $(TABLEFORMATFILE)
+ @$(DIFF) $(MASTERHELPRESULTFILE) $(HELPRESULTFILE)
+ ## this is separate because we cannot depend on the results
+ ## from this test (i.e. exact number of namespaces
+ ## so may want to remove the comparison
+ -@$(DIFF) $(MASTERNSRESULTFILE) $(NSRESULTFILE)
+
+ @$(ECHO) +++++ Remove Result files since test successful
+ @$(RM) $(RESULTFILE)
+ @$(RM) $(TABLEFORMATFILE)
+ @$(RM) $(HELPRESULTFILE)
+ @$(RM) $(NSRESULTFILE)
+ @$(ECHO) +++++ All cimcli tests Passed.
+
+##
+## Cleans up an created/modified/or deleted instances that may exist
+## in the server (i.e. the provider) and removes the result files.
+## Note that the normal path also removes result files so that the
+## only reason for this is to redo a failed test before the provider is
+## reinitialized (server restarted or provider reloaded)
clean:
- -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Norman\"
- -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Thomas\"
- -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass.Id=\"Louis\"
+ ## remove any existing instances
+ -@cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass.Id=\"Norman\"
+ -@cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass.Id=\"Thomas\"
+ -@cimcli di -n "$(PROVIDERNS)" \
+ Test_CLITestProviderClass.Id=\"ScalarTest\"
+ -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=arrayTest
+ -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass Id=stringTest
+ -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id=integerVariationTest
+ -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="NullValueTest"
+ -@cimcli di -n "$(PROVIDERNS)" Test_CLITestProviderClass \
+ Id="EmptyStringTest"
+
+ ## clean out the result files
@$(RM) $(RESULTFILE)
@$(RM) $(TABLEFORMATFILE)
+ @$(RM) $(HELPRESULTFILE)
+ @$(RM) $(NSRESULTFILE)
+
+
+
+
+giall:
+
+ cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass
+
+diall:
+
+ cimcli gi -n "$(PROVIDERNS)" Test_CLITestProviderClass
+
+## This is useful display during development. Displays classes
+## used in this test
+getclasslocal:
+ cimcli gc -n "$(PROVIDERNS)" Test_CLITestProviderClass
+ cimcli gc -n "$(PROVIDERNS)" Test_CLITestProviderLinkClass
# END_OF_FILE
+
--- /dev/null
+17. +++++ test Help Output
+Usage: cimcli <command> <CIMObject> <Options> *<extra parameters>
+ -hc for <command> set and <CimObject> for each command
+ -ho for <Options> set
+ -h xx for <command> and <Example> for <xx> operation
+ -h for this summary
+ --help for full help
+Version 2.10.0
+The options for this command are:
+
+This command executes single CIM Operations.
+
+ -count count. Expected count of objects returned if summary set.
+ Tests this count and display difference.
+ Return nonzero if test fails. Default(29346)
+ -d debug. More detailed debug messages. Default(false)
+ -delay delay. Delay between connection and request. Default(0)
+ -p Password. Defines password for authentication. Default()
+ -l location. Specifies system and port (HostName:port).
+ Port is optional. Default()
+ -u User. Defines User Name for authentication. Default()
+ -n namespace. Specifies namespace to use for operation. Default(root/cimv2)
+ -di deepInheritance. If set deepInheritance parameter
+ set true. Default(false)
+ -lo localOnly. DEPRECATED. This was used to set LocalOnly.
+ However, default should be true and we cannot use True
+ as default. See -nlo. Default(true)
+ -nlo notLocalOnly. When set, sets LocalOnly = false on
+ operations. Default(false)
+ -iq includeQualifiers. DEPRECATED. Sets includeQualifiers = True.
+ However, default=true. Default(true)
+ -niq notIncludeQualifiers. Sets includeQualifiers = false
+ on operations. Default(false)
+ -pl propertyList. Defines a propertyNameList. Format is p1,p2,p3
+ (without spaces). Use "" for empty. Default(###!###)
+ -ac assocClass. Defines a assocation Class string for Associator calls. Default()
+ -ar assocRole. Defines a role string for Associators. AssocRole
+ parameter. Default()
+ -r role. Defines a role string for reference role parameter. Default()
+ -rc resultClass. Defines a resultClass string for References and
+ Associatiors. Default()
+ -rr resultRole. Defines a role string for associators operation resultRole
+ parameter. Default()
+ -ip inputParameters. Defines an invokeMethod input parameter list.
+ Format is p1=v1 p2=v2 .. pn=vn
+ (parameters are seperated by spaces). Default()
+ -f filter. Defines a filter to use for query. Single String input. Default()
+ -o outputformats. Output in xml, mof, txt, table. Default(mof)
+ -x xmlOutput. Output objects in xml format. Default(false)
+ --version version. Displays software Version. Default(false)
+ -v verbose. Verbose Display. Outputs etailed parameter input
+ display and other request processing information. Default(false)
+ --sum summary. Displays only summary count for enumerations,
+ associators, etc.. Default(false)
+ -h help. Prints help usage message. Default(false)
+ --help full help. Prints full help message with commands, options,
+ examples. Default(false)
+ -ho help options. Prints list of options. Default(false)
+ -hc help commands. Prints CIM Operation command list. Default(false)
+ --timeout connecttimeout. Set the connection timeout in seconds.. Default(0)
+ -i interactive. Interactively ask user to select instances.
+ Used with associator and reference operations. Default(false)
+ -trace trace. Set Pegasus Common Components Trace. Sets the Trace level.
+ 0 is off. Default(0)
+ --r repeat. Number of times to repeat the operation.
+ Zero means one time. Default(0)
+ --t time. Measure time for the operation and present results. Default(false)
+
+Options vary by command consistent with CIM Operations
+
+ni enumerateInstanceNames Enumerate instancenames of <classname>
+niall enumallInstanceNames Enumerate all instance names in <namespace>.
+ei enumerateInstances Enumerate instances of <classname>
+nc enumerateClassNames Enumerate Class Names of [ <classname> ].
+ Classname optional
+ec enumerateClasses Enumerate classes of [ <classname> ].
+ Classname optional
+gc getClass Get class of <classname>
+gi getInstance Get instance of <objectname> | <classname>
+ (interactive) |
+ <classname>
+ *<PropertyName=value> for equal property values.
+ci createInstance Create Instance of <Class> *<name=param> with
+ defined properties
+ti testInstance Test instance of <objectname> *<name=value>
+ | <classname>
+ *<PropertyName=value>
+ for equal property
+ values.
+di deleteInstance Delete Instance of <objectname> | <classname>
+ *<keyPropertyName=value> | interactive of <className>
+cc createClass Not supported
+mi modifyInstance Modify Instance of <objectname> *<name=value>
+ | <classname>
+ *<name=value>
+dc deleteClass Delete Class of <classname>
+gp getProperty get single property of <object name>
+sp setProperty set a single property of <object-name>
+gq getQualifier Get Qualifier of <qualifiername>
+sq setQualifier Not suported
+eq enumerateQualifiers Enumerate all Qualifiers
+dq deleteQualifier Delete qualifer of <qualifiername>
+a associators Enumerate Associators of <classname> |
+ <instancename>.
+an associatorNames Enumerate Associator Names of <classname> |
+ <instancename>
+r references Enumerate References of <classname> |
+ <instancename>
+rn referenceNames Enumerate Reference Names <classname> |
+ <instancename>
+im invokeMethod Invoke Method for <object> <method>
+ {<inputParams>}
+xq execQuery Execute Query <query-expresssion>
+ [<query-language>]
+ns enumerateNamespaces Enumerate all namespaces on the server.
+son Turn On Statistics Turn on CIM Server Statistics Gathering
+soff Turn Off Statistics Turn off CIM Server Statistics Gathering
+? show command options Show List of Commands -h for all help, -hc for commands, -ho for options
+
+Examples :
+cimcli ni -n test/TestProvider TST_Person
+ -- Enumerate Instance Names of class TST_Person
+
+cimcli niall -n root/cimv2
+ -- Enumerate Instance Names of all classes under
+ the namespace root/cimv2
+
+cimcli ei PG_ComputerSystem -- Enumerate Instances of class
+
+cimcli nc -- Enumerate class names from root/cimv2.
+
+cimcli ec -n root/cimv2
+ -- Enumerate classes from namespace root/cimv2.
+
+cimcli gc CIM_door -u guest -p guest
+ -- Get class user = guest and password = guest.
+
+cimcli gi -n test/TestProvider TST_Person
+ -- Get Instance of class
+
+cimcli ci -n test/TestProvider TST_Person Name=Mike SSN=333
+ -- Create Instance of class TST_Person with properties
+ Name= Mike and SSN= 333
+
+cimcli ti -n test/TestProvider TST_Person Name=Mike SSN=333
+ -- Test Instance of class for equality of Name and SSN
+ properties. Returns error code if instance in server
+ does not have same properties and values as the
+ instance built from input
+
+cimcli di -n test/TestProvider TST_Person
+ -- Delete Instance of class TST_Person interactively
+or
+ cimcli di -n test/TestProvider TST_Person name=Mike
+ -- Delete Instance of class TEST_Persion with key property
+ name equal Mike using instance builder format to
+ define object path
+or
+ cimcli di -n test/TestProvider TST_Person.name=\"Mike\"
+ -- Delete Instance of class TST_Persion with object path
+ TST_Person.name="Mike" using object path input format
+
+Operation Not supported..
+
+cimcli mi -n test/TestProvider TST_Person.Id=\"Mike\" SSN=444
+ -- Modifies the Instance if it exists using rules of DMTF
+ modifyInstance operation.
+
+cimcli dc -n test/TestProvider TST_Person
+ -- Deletes the Class when there are no instances and
+ sub-classes for this class
+
+cimcli gp -n test/TestProvider TST_Person.Id=\"Mike\" SSN
+ -- Get the property named SSN from the instance
+ defined by TST_Person.Id="Mike"
+cimcli sp -n test/TestProvider TST_Person.Id=\"Mike\" SSN=333
+ -- Set the property named SSS in the instance
+ defined by TST_Person.Id="Mike")
+cimcli gq Association
+ -- Get the qualifier named Association in mof output
+ in the default namespace (normally root/cimv2)
+Operation Not supported..
+
+cimcli eq -n test/TestProvider
+ -- Enumerate Qualifiers of namespace test/TestProvider
+
+cimcli dq -n test/TestProvider ASSOCIATION
+ -- Delete Qualifier named ASSOCIATION in namespace
+ test/TestProvider
+
+cimcli a TST_Person.name=\"Mike\" -n test/TestProvider -ac TST_Lineage
+ -rc TST_Person
+ -- get associations for instances of association class
+ TST_Lineage and result class TST_Person
+ associated with instance of TST_person with key
+ "Mike" in namespace test/TestProvider
+or
+ cimcli a TST_Person -n test/TestProvider -ac TST_Lineage
+ -- get associated classes for all instances of classes
+ associated with class TST_person and with
+ association class TST_Lineage
+or
+ cimcli a TST_Person -n test/TestProvider -ac TST_Lineage -i
+ -- get associated instances by selecting interactively for
+ classes associated with class TST_person and with
+ association class TST_Lineage
+
+cimcli an TST_Person.name=\"Mike\" -n test/TestProvider -ac TST_Lineage
+or
+ cimcli an TST_Person -n test/TestProvider -ac TST_Lineage
+
+cimcli r TST_Person.name=\"Mike\" -n test/TestProvider -rc TST_Lineage
+ -- get references for instances association class TST_Lineage
+ associated with instance of TST_person with key
+ "Mike" in namespace test/TestProvider
+or
+ cimcli r TST_Person.name=\"Mike\" -n test/TestProvider
+ -- get references for all instances of classes
+ associated with instance of TST_person with key
+ "Mike" in namespace test/TestProvider
+or
+ cimcli r TST_Person -n test/TestProvider -rc TST_Lineage
+ -- get reference classes for TST_Lineage association class and
+ subclasses in namespace test/TestProvider
+
+cimcli rn TST_Person.name=\"Mike\" -n test/TestProvider -rc TST_Lineage
+ -- get referenceNames for instances association class
+ TST_Lineage associated with instance of TST_person with key
+ "Mike" in namespace test/TestProvider
+or
+ cimcli rn TST_Person.name=\"Mike\" -n test/TestProvider
+ -- get referenceNames for all instances of classes
+ associated with instance of TST_person with key
+ "Mike" in namespace test/TestProvider
+or
+ cimcli rn TST_Person -n test/TestProvider -rc TST_Lineage
+ -- get referenceNames for Class TST_Lineage in namespace
+ test/TestProvider
+
+cimcli im Sample_MethodProviderClass.Name=\"mooo\" SayHello
+ -n root/SampleProvider -ip p1=fred
+
+cimcli xq "select * from CIM_ComputerSystem"
+ -- This command will work when the code is compiled with
+ ExecQuery enabled
+
+cimcli ns -- Enumerate all Namespaces in repository
+
+cimcli son -- Switch On's the statistical information on CIMServer
+
+cimcli soff -- Switch OFF's the statistical information on CIMServer
+
+cimcli ? -- Displays help command
+
+
+ni enumerateInstanceNames Enumerate instancenames of <classname>
+niall enumallInstanceNames Enumerate all instance names in <namespace>.
+ei enumerateInstances Enumerate instances of <classname>
+nc enumerateClassNames Enumerate Class Names of [ <classname> ].
+ Classname optional
+ec enumerateClasses Enumerate classes of [ <classname> ].
+ Classname optional
+gc getClass Get class of <classname>
+gi getInstance Get instance of <objectname> | <classname>
+ (interactive) |
+ <classname>
+ *<PropertyName=value> for equal property values.
+ci createInstance Create Instance of <Class> *<name=param> with
+ defined properties
+ti testInstance Test instance of <objectname> *<name=value>
+ | <classname>
+ *<PropertyName=value>
+ for equal property
+ values.
+di deleteInstance Delete Instance of <objectname> | <classname>
+ *<keyPropertyName=value> | interactive of <className>
+cc createClass Not supported
+mi modifyInstance Modify Instance of <objectname> *<name=value>
+ | <classname>
+ *<name=value>
+dc deleteClass Delete Class of <classname>
+gp getProperty get single property of <object name>
+sp setProperty set a single property of <object-name>
+gq getQualifier Get Qualifier of <qualifiername>
+sq setQualifier Not suported
+eq enumerateQualifiers Enumerate all Qualifiers
+dq deleteQualifier Delete qualifer of <qualifiername>
+a associators Enumerate Associators of <classname> |
+ <instancename>.
+an associatorNames Enumerate Associator Names of <classname> |
+ <instancename>
+r references Enumerate References of <classname> |
+ <instancename>
+rn referenceNames Enumerate Reference Names <classname> |
+ <instancename>
+im invokeMethod Invoke Method for <object> <method>
+ {<inputParams>}
+xq execQuery Execute Query <query-expresssion>
+ [<query-language>]
+ns enumerateNamespaces Enumerate all namespaces on the server.
+son Turn On Statistics Turn on CIM Server Statistics Gathering
+soff Turn Off Statistics Turn off CIM Server Statistics Gathering
+? show command options Show List of Commands -h for all help, -hc for commands, -ho for options
+The options for this command are:
+
+This command executes single CIM Operations.
+
+ -count count. Expected count of objects returned if summary set.
+ Tests this count and display difference.
+ Return nonzero if test fails. Default(29346)
+ -d debug. More detailed debug messages. Default(false)
+ -delay delay. Delay between connection and request. Default(0)
+ -p Password. Defines password for authentication. Default()
+ -l location. Specifies system and port (HostName:port).
+ Port is optional. Default()
+ -u User. Defines User Name for authentication. Default()
+ -n namespace. Specifies namespace to use for operation. Default(root/cimv2)
+ -di deepInheritance. If set deepInheritance parameter
+ set true. Default(false)
+ -lo localOnly. DEPRECATED. This was used to set LocalOnly.
+ However, default should be true and we cannot use True
+ as default. See -nlo. Default(true)
+ -nlo notLocalOnly. When set, sets LocalOnly = false on
+ operations. Default(false)
+ -iq includeQualifiers. DEPRECATED. Sets includeQualifiers = True.
+ However, default=true. Default(true)
+ -niq notIncludeQualifiers. Sets includeQualifiers = false
+ on operations. Default(false)
+ -pl propertyList. Defines a propertyNameList. Format is p1,p2,p3
+ (without spaces). Use "" for empty. Default(###!###)
+ -ac assocClass. Defines a assocation Class string for Associator calls. Default()
+ -ar assocRole. Defines a role string for Associators. AssocRole
+ parameter. Default()
+ -r role. Defines a role string for reference role parameter. Default()
+ -rc resultClass. Defines a resultClass string for References and
+ Associatiors. Default()
+ -rr resultRole. Defines a role string for associators operation resultRole
+ parameter. Default()
+ -ip inputParameters. Defines an invokeMethod input parameter list.
+ Format is p1=v1 p2=v2 .. pn=vn
+ (parameters are seperated by spaces). Default()
+ -f filter. Defines a filter to use for query. Single String input. Default()
+ -o outputformats. Output in xml, mof, txt, table. Default(mof)
+ -x xmlOutput. Output objects in xml format. Default(false)
+ --version version. Displays software Version. Default(false)
+ -v verbose. Verbose Display. Outputs etailed parameter input
+ display and other request processing information. Default(false)
+ --sum summary. Displays only summary count for enumerations,
+ associators, etc.. Default(false)
+ -h help. Prints help usage message. Default(false)
+ --help full help. Prints full help message with commands, options,
+ examples. Default(false)
+ -ho help options. Prints list of options. Default(false)
+ -hc help commands. Prints CIM Operation command list. Default(false)
+ --timeout connecttimeout. Set the connection timeout in seconds.. Default(0)
+ -i interactive. Interactively ask user to select instances.
+ Used with associator and reference operations. Default(false)
+ -trace trace. Set Pegasus Common Components Trace. Sets the Trace level.
+ 0 is off. Default(0)
+ --r repeat. Number of times to repeat the operation.
+ Zero means one time. Default(0)
+ --t time. Measure time for the operation and present results. Default(false)
+
+Options vary by command consistent with CIM Operations
+
+mi modifyInstance Modify Instance of <objectname> *<name=value>
+ | <classname>
+ *<name=value>
+Example :
+cimcli mi -n test/TestProvider TST_Person.Id=\"Mike\" SSN=444
+ -- Modifies the Instance if it exists using rules of DMTF
+ modifyInstance operation.
+
+Valid options for this command are :
+-n -pl (define properties to be modified)
+
+Common Options are :
+ -count, -d, -delay, -p, -l, -u, -o, -x, -v, --sum, --timeout, -r, --t
+Usage: cimcli <command> <CIMObject> <Options> *<extra parameters>
+ -hc for <command> set and <CimObject> for each command
+ -ho for <Options> set
+ -h xx for <command> and <Example> for <xx> operation
+ -h for this summary
+ --help for full help
--- /dev/null
+19. +++++ namespacetests
+root/PG_InterOp
+root/benchmark
+root/SampleProvider
+test/CimsubTestNS2
+test/CimsubTestNS3
+test/CimsubTestNS0
+test/CimsubTestNS1
+root/PG_Internal
+test/EmbeddedInstance/Static
+test/TestProvider
+root/cimv2
+test/EmbeddedInstance/Dynamic
+root
+test/cimv2
+test/static
+root/MCCAtest/B
+root/MCCAtest/A
+17 namespaces returned.
+0. +++++ Test For getClass
+
+// Class Test_CLITestProviderClass
+
+ [Version ("2.5.0") : Restricted, Translatable]
+class Test_CLITestProviderClass
+{
+ [key : DisableOverride]
+string Id;
+string Name;
+string requestInputParameters;
+boolean scalBool;
+uint8 scalUint8;
+sint8 scalSint8;
+uint16 scalUint16;
+sint16 scalSint16;
+uint32 scalUint32;
+sint32 scalSint32;
+uint64 scalUint64;
+sint64 scalSint64;
+real32 scalReal32;
+real64 scalReal64;
+string scalString;
+datetime scalDateTime;
+boolean defaultBool = TRUE;
+uint8 defaultUint8 = 4;
+sint8 defaultSint8 = 4;
+uint16 defaultUint16 = 4;
+sint16 defaultSint16 = 4;
+uint32 defaultUint32 = 4;
+sint32 defaultSint32 = 4;
+uint64 defaultUint64 = 4;
+sint64 defaultSint64 = 4;
+real32 defaultReal32;
+real64 defaultReal64;
+string defaultString = "test\"embedded\"quote";
+datetime defaultDateTime;
+boolean arrayBool[];
+uint8 arrayUint8[];
+sint8 arraySint8[];
+uint16 arrayUint16[];
+sint16 arraySint16[];
+uint32 arrayUint32[];
+sint32 arraySint32[];
+uint64 arrayUint64[];
+sint64 arraySint64[];
+real32 arrayReal32[];
+real64 arrayReal64[];
+string arrayString[];
+datetime arrayDateTime[];
+uint32 ReferenceParamTest([in : DisableOverride] uint32 InParam1, [out
+ : DisableOverride] uint32 OutParam2);
+uint32 InOutParamTest([in : DisableOverride,
+out : DisableOverride] boolean scalBool, [in : DisableOverride,
+out : DisableOverride] uint8 scalUint8, [in : DisableOverride,
+out : DisableOverride] sint8 scalSint8, [in : DisableOverride,
+out : DisableOverride] uint16 scalUint16, [in : DisableOverride,
+out : DisableOverride] sint16 scalSint16, [in : DisableOverride,
+out : DisableOverride] uint32 scalUint32, [in : DisableOverride,
+out : DisableOverride] sint32 scalSint32, [in : DisableOverride,
+out : DisableOverride] uint64 scalUint64, [in : DisableOverride,
+out : DisableOverride] real32 scalReal32, [in : DisableOverride,
+out : DisableOverride] real64 scalReal64, [in : DisableOverride,
+out : DisableOverride] string scalString, [in : DisableOverride,
+out : DisableOverride] datetime scalDateTime, [in : DisableOverride,
+
+out : DisableOverride] boolean arrayBool[], [in : DisableOverride,
+
+out : DisableOverride] uint8 arrayUint8[], [in : DisableOverride,
+out : DisableOverride] sint8 arraySint8[], [in : DisableOverride,
+out : DisableOverride] uint16 arrayUint16[], [in : DisableOverride,
+
+out : DisableOverride] sint16 arraySint16[], [in : DisableOverride,
+
+out : DisableOverride] uint32 arrayUint32[], [in : DisableOverride,
+
+out : DisableOverride] sint32 arraySint32[], [in : DisableOverride,
+
+out : DisableOverride] uint64 arrayUint64[], [in : DisableOverride,
+
+out : DisableOverride] real32 arrayReal32[], [in : DisableOverride,
+
+out : DisableOverride] real64 arrayReal64[], [in : DisableOverride,
+
+out : DisableOverride] string arrayString[], [in : DisableOverride,
+
+out : DisableOverride] datetime arrayDateTime[], [in : DisableOverride,
+
+out : DisableOverride] uint32 returnValue);
+uint32 FullParamTest([in : DisableOverride] boolean inScalBool, [in
+ : DisableOverride] uint8 inScalUint8, [in : DisableOverride] sint8
+ inScalSint8, [in : DisableOverride] uint16 inScalUint16, [in :
+ DisableOverride] sint16 inScalSint16, [in : DisableOverride] uint32
+ inScalUint32, [in : DisableOverride] sint32 inScalSint32, [in :
+ DisableOverride] uint64 inScalUint64, [in : DisableOverride] real32
+ inScalReal32, [in : DisableOverride] real64 inScalReal64, [in :
+ DisableOverride] string inScalString, [in : DisableOverride] datetime
+ inScalDateTime, [out : DisableOverride] boolean outScalBool, [out
+ : DisableOverride] uint8 outScalUint8, [out : DisableOverride]
+ sint8 outScalSint8, [out : DisableOverride] uint16 outScalUint16,
+ [out : DisableOverride] sint16 outScalSint16, [out : DisableOverride]
+ uint32 outScalUint32, [out : DisableOverride] sint32 outScalSint32,
+ [out : DisableOverride] uint64 outScalUint64, [out : DisableOverride]
+ real32 outScalReal32, [out : DisableOverride] real64 outScalReal64,
+ [out : DisableOverride] string outScalString, [out : DisableOverride]
+ datetime outScalDateTime);
+};
+
+// Class Test_CLITestProviderLinkClass
+
+ [ASSOCIATION : DisableOverride,
+ Version ("1.0.0") : Restricted, Translatable,
+ Description ("Defines the relationship between parents and children. "
+ "Test Ref/Assoc functions in cimli") : Translatable]
+class Test_CLITestProviderLinkClass
+{
+ [key : DisableOverride]
+reference parent;
+ [key : DisableOverride]
+reference child;
+string requestInputParameters;
+};
+8. +++++ Test QualifierDecl Operations
+
+Qualifier ASSOCIATION : boolean = FALSE, Scope(class association),
+ Flavor(DisableOverride);
+9. +++++ getClass Operation
+64 class names returned.
+CIM_CollectionInSystem
+CIM_ProductFRU
+CIM_Statistics
+CIM_FromDirectorySpecification
+CIM_RecordInLog
+CIM_CollectionSetting
+CIM_Indication
+CIM_ElementCapacity
+CIM_CollectionConfiguration
+CIM_ProductSoftwareFeatures
+CIM_ProductParentChild
+CIM_StorageDefect
+CIM_CollectionInOrganization
+CIM_FRUIncludesProduct
+CIM_SystemSettingContext
+CIM_ActionSequence
+CIM_DiagnosticResultForTest
+CIM_DiagnosticResultForMSE
+CIM_CompatibleProduct
+CIM_PhysicalElementLocation
+CIM_FRUIncludesSoftwareFeature
+CIM_InstalledSoftwareElement
+CIM_FibrePortActiveLogin
+CIM_CollectedCollections
+CIM_ElementConfiguration
+CIM_NetworksInAdminDomain
+CIM_ToDirectoryAction
+CIM_Dependency
+CIM_DiagnosticResultInPackage
+CIM_IndicationSubscription
+CIM_RelatedStatistics
+CIM_BGPClustersInAS
+CIM_FromDirectoryAction
+CIM_AFRelatedServices
+CIM_ActsAsSpare
+CIM_OrgStructure
+CIM_SettingContext
+CIM_FRUPhysicalElements
+CIM_NextService
+CIM_LogicalNetworkService
+CIM_ElementSetting
+CIM_DependencyContext
+CIM_ProductSupport
+CIM_Synchronized
+CIM_ServiceProcess
+CIM_ParameterValueSources
+CIM_DirectorySpecificationFile
+CIM_ParametersForMethod
+CIM_Export
+CIM_AdjacentSlots
+CIM_ProductPhysicalElements
+CIM_ToDirectorySpecification
+CIM_InstalledProductImage
+CIM_ProductProductDependency
+CIM_DiagnosticResult
+CIM_SoftwareElementActions
+CIM_PolicyComponent
+CIM_SoftwareElementChecks
+CIM_ParticipatesInSet
+CIM_LogicalIdentity
+CIM_ManagedElement
+CIM_ConfigurationComponent
+CIM_Component
+CIM_MemberOfCollection
+
+// Class CIM_ManagedElement
+
+ [Abstract : DisableOverride, Restricted,
+ Description ("ManagedElement is an abstract class that provides "
+ "a common superclass (or top of the inheritance tree) for the "
+ "non-association classes in the CIM Schema.") : Translatable]
+class CIM_ManagedElement
+{
+ [MaxLen (64),
+ Description ("The Caption property is a short textual description "
+ "(one-line string) of the object.") : Translatable]
+string Caption;
+ [Description ("The Description property provides a textual description "
+ "of the object.") : Translatable]
+string Description;
+};
+<CLASS NAME="CIM_ManagedElement">
+ <QUALIFIER NAME="Abstract" TYPE="boolean" OVERRIDABLE="false" TOSUBCLASS="false">
+ <VALUE>
+ TRUE
+ </VALUE>
+ </QUALIFIER>
+ <QUALIFIER NAME="Description" TYPE="string" TRANSLATABLE="true">
+ <VALUE>
+ ManagedElement is an abstract class that provides a common superclass (or top of the inheritance tree) for the non-association classes in the CIM Schema.
+ </VALUE>
+ </QUALIFIER>
+ <PROPERTY NAME="Caption" TYPE="string">
+ <QUALIFIER NAME="MaxLen" TYPE="uint32">
+ <VALUE>
+ 64
+ </VALUE>
+ </QUALIFIER>
+ <QUALIFIER NAME="Description" TYPE="string" TRANSLATABLE="true">
+ <VALUE>
+ The Caption property is a short textual description (one-line string) of the object.
+ </VALUE>
+ </QUALIFIER>
+ </PROPERTY>
+ <PROPERTY NAME="Description" TYPE="string">
+ <QUALIFIER NAME="Description" TYPE="string" TRANSLATABLE="true">
+ <VALUE>
+ The Description property provides a textual description of the object.
+ </VALUE>
+ </QUALIFIER>
+ </PROPERTY>
+</CLASS>
+1. +++++ Test For Reference params
+2. +++++ Test Getproperty and setProperty
Name = Bob
+Test_CLITestProviderClass.Id="Mike"
+path= Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "Mike";
+Name = "Bob";
+scalBool = TRUE;
+scalUint8 = 220;
+scalSint8 = 124;
+scalUint16 = 100;
+scalSint16 = 100;
+scalUint32 = 100;
+scalSint32 = 100;
+scalUint64 = 100;
+scalReal32 = 1.0000000000000000e+02;
+scalReal64 = 1.0000000000000000e+02;
+scalString = "teststring";
+scalDateTime = "19991224120000.000000+360";
+arrayBool = {TRUE, FALSE, TRUE};
+arrayUint8 = {4, 128, 240};
+arraySint8 = {4, 126, -126};
+arrayUint16 = {4, 128, 240};
+arraySint16 = {4, 126, -126};
+arrayUint32 = {4, 128, 240};
+arraySint32 = {4, 126, -126};
+arrayUint64 = {4, 128, 240};
+arrayReal32 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayReal64 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayString = {"First", "Second", "Third"};
+requestInputParameters = "propertyList=Id, Name, requestInputParameters, "
+ "scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, "
+ "scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, "
+ "scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, "
+ "defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, "
+ "defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, "
+ "arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, "
+ "arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, "
+ "arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false";
+};
+3. +++++ Tests Instances create Instance
+Returned Path Test_CLITestProviderClass.Id="ScalarTest"
+test instance Test_CLITestProviderClass.Id="ScalarTest" OK
+Parse Error: Value conversion error. 127arrayUint32=99. type sint8
+Parse Error: Value conversion error. 31000. type sint8
+Parse Error: Value conversion error. 63000. type sint8
+Parse Error: Value conversion error. 4294967295. type sint8
+Returned Path Test_CLITestProviderClass.Id="arrayTest"
+Parse Error: Value conversion error. 127arrayUint32=99. type sint8
+Parse Error: Value conversion error. 31000. type sint8
+Parse Error: Value conversion error. 63000. type sint8
+Parse Error: Value conversion error. 4294967295. type sint8
+test instance Test_CLITestProviderClass.Id="arrayTest" OK
+Test_CLITestProviderClass.Id="Mike"
+Test_CLITestProviderClass.Id="ScalarTest"
+Test_CLITestProviderClass.Id="arrayTest"
+path= Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "Mike";
+Name = "Bob";
+scalBool = TRUE;
+scalUint8 = 220;
+scalSint8 = 124;
+scalUint16 = 100;
+scalSint16 = 100;
+scalUint32 = 100;
+scalSint32 = 100;
+scalUint64 = 100;
+scalReal32 = 1.0000000000000000e+02;
+scalReal64 = 1.0000000000000000e+02;
+scalString = "teststring";
+scalDateTime = "19991224120000.000000+360";
+arrayBool = {TRUE, FALSE, TRUE};
+arrayUint8 = {4, 128, 240};
+arraySint8 = {4, 126, -126};
+arrayUint16 = {4, 128, 240};
+arraySint16 = {4, 126, -126};
+arrayUint32 = {4, 128, 240};
+arraySint32 = {4, 126, -126};
+arrayUint64 = {4, 128, 240};
+arrayReal32 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayReal64 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayString = {"First", "Second", "Third"};
+requestInputParameters = "propertyList=Id, Name, requestInputParameters, "
+ "scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, "
+ "scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, "
+ "scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, "
+ "defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, "
+ "defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, "
+ "arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, "
+ "arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, "
+ "arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false";
+};
+path= Test_CLITestProviderClass.Id="ScalarTest"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "ScalarTest";
+scalBool = TRUE;
+scalUint8 = 12;
+scalSint8 = 12;
+scalUint16 = 500;
+scalSint16 = 500;
+scalUint32 = 9999;
+scalSint32 = 9999;
+scalUint64 = 99999;
+scalString = "testString";
+requestInputParameters = "propertyList=Id, Name, requestInputParameters, "
+ "scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, "
+ "scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, "
+ "scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, "
+ "defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, "
+ "defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, "
+ "arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, "
+ "arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, "
+ "arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false";
+};
+path= Test_CLITestProviderClass.Id="arrayTest"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "arrayTest";
+scalString = "testString";
+scalDateTime = "19991224120000.000000+360";
+arrayBool = {TRUE, TRUE, TRUE, FALSE, TRUE};
+arrayUint8 = {12};
+arraySint8 = {-127, 0, 12, 0, 0, 24, 24, -1};
+arraySint32 = {-32000, 0, 32000, -2147483648, 2147483647};
+arrayUint64 = {99, 0, 31000, 63000, 18446744073709551615};
+arraySint64 = {-32000, 0, 32000, -9223372036854775808};
+requestInputParameters = "propertyList=Id, Name, requestInputParameters, "
+ "scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, "
+ "scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, "
+ "scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, "
+ "defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, "
+ "defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, "
+ "arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, "
+ "arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, "
+ "arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false";
+};
+4. +++++ Test Instances modify Instance
+modified
+test instance Test_CLITestProviderClass.Id="ScalarTest" OK
+modified
+test instance Test_CLITestProviderClass.Id="ScalarTest" OK
+5. +++++ Test delete instance
+Returned Path Test_CLITestProviderClass.Id="ScalarTest"
+test instance Test_CLITestProviderClass.Id="ScalarTest" OK
+6. +++++ Test invokeMethod
+Return Value= 0
+7. +++++ Test table output format
+10. +++++ testPropertyListOptions
+
+// Class CIM_ManagedElement
+
+ [Abstract : Restricted,
+ Version ("2.19.0") : Restricted, Translatable,
+ UMLPackagePath ("CIM::Core::CoreElements"),
+ Description ("ManagedElement is an abstract class that provides "
+ "a common superclass (or top of the inheritance tree) for the "
+ "non-association classes in the CIM Schema.") : Translatable]
+class CIM_ManagedElement
+{
+ [Description ("The Caption property is a short textual description "
+ "(one- line string) of the object.") : Translatable,
+ MaxLen (64)]
+string Caption;
+};
+
+// Class CIM_ManagedElement
+
+ [Abstract : Restricted,
+ Version ("2.19.0") : Restricted, Translatable,
+ UMLPackagePath ("CIM::Core::CoreElements"),
+ Description ("ManagedElement is an abstract class that provides "
+ "a common superclass (or top of the inheritance tree) for the "
+ "non-association classes in the CIM Schema.") : Translatable]
+class CIM_ManagedElement
+{
+ [Description ("The Caption property is a short textual description "
+ "(one- line string) of the object.") : Translatable,
+ MaxLen (64)]
+string Caption;
+ [Description ("The Description property provides a textual description "
+ "of the object.") : Translatable]
+string Description;
+};
+
+// Class CIM_ManagedElement
+
+ [Abstract : Restricted,
+ Version ("2.19.0") : Restricted, Translatable,
+ UMLPackagePath ("CIM::Core::CoreElements"),
+ Description ("ManagedElement is an abstract class that provides "
+ "a common superclass (or top of the inheritance tree) for the "
+ "non-association classes in the CIM Schema.") : Translatable]
+class CIM_ManagedElement
+{
+ [Description ("The Caption property is a short textual description "
+ "(one- line string) of the object.") : Translatable,
+ MaxLen (64)]
+string Caption;
+ [Description ("The Description property provides a textual description "
+ "of the object.") : Translatable]
+string Description;
+ [Description ("A user-friendly name for the object. This property allows "
+ "each instance to define a user-friendly name in addition to "
+ "its key properties, identity data, and description information. "
+ "\nNote that the Name property of ManagedSystemElement is also "
+ "defined as a user-friendly name. But, it is often subclassed "
+ "to be a Key. It is not reasonable that the same property can "
+ "convey both identity and a user-friendly name, without inconsistencies. "
+ "Where Name exists and is not a Key (such as for instances of "
+ "LogicalDevice), the same information can be present in both "
+ "the Name and ElementName properties. Note that if there is "
+ "an associated instance of CIM_EnabledLogicalElementCapabilities, "
+ "restrictions on this properties may exist as defined in ElementNameMask "
+ "and MaxElementNameLen properties defined in that class.") :
+ Translatable]
+string ElementName;
+};
+
+// Class CIM_ManagedElement
+
+ [Abstract : Restricted,
+ Version ("2.19.0") : Restricted, Translatable,
+ UMLPackagePath ("CIM::Core::CoreElements"),
+ Description ("ManagedElement is an abstract class that provides "
+ "a common superclass (or top of the inheritance tree) for the "
+ "non-association classes in the CIM Schema.") : Translatable]
+class CIM_ManagedElement
+{
+};
+path= Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+scalBool = TRUE;
+arrayUint64 = {4, 128, 240};
+};
+path= Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+};
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+scalBool = TRUE;
+scalString = "teststring";
+arrayUint64 = {4, 128, 240};
+};
+12. +++++ test getInstance Operation
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "Mike";
+Name = "Bob";
+scalBool = TRUE;
+scalUint8 = 220;
+scalSint8 = 124;
+scalUint16 = 100;
+scalSint16 = 100;
+scalUint32 = 100;
+scalSint32 = 100;
+scalUint64 = 100;
+scalReal32 = 1.0000000000000000e+02;
+scalReal64 = 1.0000000000000000e+02;
+scalString = "teststring";
+scalDateTime = "19991224120000.000000+360";
+arrayBool = {TRUE, FALSE, TRUE};
+arrayUint8 = {4, 128, 240};
+arraySint8 = {4, 126, -126};
+arrayUint16 = {4, 128, 240};
+arraySint16 = {4, 126, -126};
+arrayUint32 = {4, 128, 240};
+arraySint32 = {4, 126, -126};
+arrayUint64 = {4, 128, 240};
+arrayReal32 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayReal64 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayString = {"First", "Second", "Third"};
+arrayCIMDateTime = {"19991224120000.000000+360", "19991224120000.000000+360",
+ "19991224120000.000000+360"};
+requestInputParameters = "propertyList=NULL; includeQualifiers=true; "
+ "includeClassOrigin=false";
+};
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Name = "Bob";
+scalBool = TRUE;
+};
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Name = "Bob";
+scalBool = TRUE;
+};
+13. +++++ test TestInstance Operations
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+test instance Test_CLITestProviderClass.Id="Mike" OK
+14. +++++ test Integer Variations
+Returned Path Test_CLITestProviderClass.Id="integerVariationTest"
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "integerVariationTest";
+scalBool = TRUE;
+scalUint8 = 12;
+scalUint16 = 100;
+scalUint32 = 9999;
+scalUint64 = 99999;
+arrayUint32 = {99, 0, 31000, 63000, 4294967295};
+requestInputParameters = "propertyList=NULL; includeQualifiers=true; "
+ "includeClassOrigin=false";
+};
+test instance Test_CLITestProviderClass.Id="integerVariationTest" OK
+15. +++++ referencetests
+
+// Class Test_CLITestProviderLinkClass
+
+ [ASSOCIATION : DisableOverride,
+ Version ("1.0.0") : Restricted, Translatable,
+ Description ("Defines the relationship between parents and children. "
+ "Test Ref/Assoc functions in cimli") : Translatable]
+class Test_CLITestProviderLinkClass
+{
+ [key : DisableOverride]
+reference parent;
+ [key : DisableOverride]
+reference child;
+string requestInputParameters;
+};
+1 referenceNames
+//ubuntu804c/test/TestProvider:Test_CLITestProviderLinkClass
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderLinkClass.child="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"",parent="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\""
+
+//Instance of Test_CLITestProviderLinkClass
+instance of Test_CLITestProviderLinkClass
+{
+parent = "//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"";
+child = "//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"";
+requestInputParameters = "role=; resultClass=Test_CLITestProviderLinkClass; "
+ "includeQualifiers=true; includeClassOrigin=false; propertyList=NULL";
+};
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderLinkClass.child="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"",parent="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\""
+
+//Instance of Test_CLITestProviderLinkClass
+instance of Test_CLITestProviderLinkClass
+{
+parent = "//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"";
+child = "//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"";
+requestInputParameters = "role=parent; resultClass=Test_CLITestProviderLinkClass; "
+ "includeQualifiers=true; includeClassOrigin=false; propertyList=NULL";
+};
+1 referenceNames
+//ubuntu804c/test/TestProvider:Test_CLITestProviderLinkClass.child="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"",parent="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\""
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderLinkClass.child="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\"",parent="//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id=\"Mike\""
+
+//Instance of Test_CLITestProviderLinkClass
+instance of Test_CLITestProviderLinkClass
+{
+requestInputParameters = "role=child; resultClass=Test_CLITestProviderLinkClass; "
+ "includeQualifiers=true; includeClassOrigin=false; propertyList=requestInputParameters";
+};
+16. +++++ associationtests
+
+// Class Test_CLITestProviderClass
+
+ [Version ("2.5.0") : Restricted, Translatable]
+class Test_CLITestProviderClass
+{
+ [key : DisableOverride]
+string Id;
+string Name;
+string requestInputParameters;
+boolean scalBool;
+uint8 scalUint8;
+sint8 scalSint8;
+uint16 scalUint16;
+sint16 scalSint16;
+uint32 scalUint32;
+sint32 scalSint32;
+uint64 scalUint64;
+sint64 scalSint64;
+real32 scalReal32;
+real64 scalReal64;
+string scalString;
+datetime scalDateTime;
+boolean defaultBool = TRUE;
+uint8 defaultUint8 = 4;
+sint8 defaultSint8 = 4;
+uint16 defaultUint16 = 4;
+sint16 defaultSint16 = 4;
+uint32 defaultUint32 = 4;
+sint32 defaultSint32 = 4;
+uint64 defaultUint64 = 4;
+sint64 defaultSint64 = 4;
+real32 defaultReal32;
+real64 defaultReal64;
+string defaultString = "test\"embedded\"quote";
+datetime defaultDateTime;
+boolean arrayBool[];
+uint8 arrayUint8[];
+sint8 arraySint8[];
+uint16 arrayUint16[];
+sint16 arraySint16[];
+uint32 arrayUint32[];
+sint32 arraySint32[];
+uint64 arrayUint64[];
+sint64 arraySint64[];
+real32 arrayReal32[];
+real64 arrayReal64[];
+string arrayString[];
+datetime arrayDateTime[];
+uint32 ReferenceParamTest([in : DisableOverride] uint32 InParam1, [out
+ : DisableOverride] uint32 OutParam2);
+uint32 InOutParamTest([in : DisableOverride,
+out : DisableOverride] boolean scalBool, [in : DisableOverride,
+out : DisableOverride] uint8 scalUint8, [in : DisableOverride,
+out : DisableOverride] sint8 scalSint8, [in : DisableOverride,
+out : DisableOverride] uint16 scalUint16, [in : DisableOverride,
+out : DisableOverride] sint16 scalSint16, [in : DisableOverride,
+out : DisableOverride] uint32 scalUint32, [in : DisableOverride,
+out : DisableOverride] sint32 scalSint32, [in : DisableOverride,
+out : DisableOverride] uint64 scalUint64, [in : DisableOverride,
+out : DisableOverride] real32 scalReal32, [in : DisableOverride,
+out : DisableOverride] real64 scalReal64, [in : DisableOverride,
+out : DisableOverride] string scalString, [in : DisableOverride,
+out : DisableOverride] datetime scalDateTime, [in : DisableOverride,
+
+out : DisableOverride] boolean arrayBool[], [in : DisableOverride,
+
+out : DisableOverride] uint8 arrayUint8[], [in : DisableOverride,
+out : DisableOverride] sint8 arraySint8[], [in : DisableOverride,
+out : DisableOverride] uint16 arrayUint16[], [in : DisableOverride,
+
+out : DisableOverride] sint16 arraySint16[], [in : DisableOverride,
+
+out : DisableOverride] uint32 arrayUint32[], [in : DisableOverride,
+
+out : DisableOverride] sint32 arraySint32[], [in : DisableOverride,
+
+out : DisableOverride] uint64 arrayUint64[], [in : DisableOverride,
+
+out : DisableOverride] real32 arrayReal32[], [in : DisableOverride,
+
+out : DisableOverride] real64 arrayReal64[], [in : DisableOverride,
+
+out : DisableOverride] string arrayString[], [in : DisableOverride,
+
+out : DisableOverride] datetime arrayDateTime[], [in : DisableOverride,
+
+out : DisableOverride] uint32 returnValue);
+uint32 FullParamTest([in : DisableOverride] boolean inScalBool, [in
+ : DisableOverride] uint8 inScalUint8, [in : DisableOverride] sint8
+ inScalSint8, [in : DisableOverride] uint16 inScalUint16, [in :
+ DisableOverride] sint16 inScalSint16, [in : DisableOverride] uint32
+ inScalUint32, [in : DisableOverride] sint32 inScalSint32, [in :
+ DisableOverride] uint64 inScalUint64, [in : DisableOverride] real32
+ inScalReal32, [in : DisableOverride] real64 inScalReal64, [in :
+ DisableOverride] string inScalString, [in : DisableOverride] datetime
+ inScalDateTime, [out : DisableOverride] boolean outScalBool, [out
+ : DisableOverride] uint8 outScalUint8, [out : DisableOverride]
+ sint8 outScalSint8, [out : DisableOverride] uint16 outScalUint16,
+ [out : DisableOverride] sint16 outScalSint16, [out : DisableOverride]
+ uint32 outScalUint32, [out : DisableOverride] sint32 outScalSint32,
+ [out : DisableOverride] uint64 outScalUint64, [out : DisableOverride]
+ real32 outScalReal32, [out : DisableOverride] real64 outScalReal64,
+ [out : DisableOverride] string outScalString, [out : DisableOverride]
+ datetime outScalDateTime);
+};
+1 associator names
+//ubuntu804c/test/TestProvider:Test_CLITestProviderClass
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "Mike";
+Name = "Bob";
+scalBool = TRUE;
+scalUint8 = 220;
+scalSint8 = 124;
+scalUint16 = 100;
+scalSint16 = 100;
+scalUint32 = 100;
+scalSint32 = 100;
+scalUint64 = 100;
+scalReal32 = 1.0000000000000000e+02;
+scalReal64 = 1.0000000000000000e+02;
+scalString = "teststring";
+scalDateTime = "19991224120000.000000+360";
+arrayBool = {TRUE, FALSE, TRUE};
+arrayUint8 = {4, 128, 240};
+arraySint8 = {4, 126, -126};
+arrayUint16 = {4, 128, 240};
+arraySint16 = {4, 126, -126};
+arrayUint32 = {4, 128, 240};
+arraySint32 = {4, 126, -126};
+arrayUint64 = {4, 128, 240};
+arrayReal32 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayReal64 = {4.0000000000000000e+00, 1.2800000000000000e+02, 2.4000000000000000e+02};
+arrayString = {"First", "Second", "Third"};
+arrayCIMDateTime = {"19991224120000.000000+360", "19991224120000.000000+360",
+ "19991224120000.000000+360"};
+requestInputParameters = "role=; resultRole=; associationClass=Test_CLITestProviderLinkClass; "
+ "resultClass=; includeQualifiers=true; includeClassOrigin=false; "
+ "propertyList=NULL";
+};
+1 associator names
+//ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id="Mike"
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+};
+path= //ubuntu804c/test/TestProvider:Test_CLITestProviderClass.Id="Mike"
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+requestInputParameters = "role=child; resultRole=parent; associationClass=Test_CLITestProviderLinkClass; "
+ "resultClass=Test_CLITestProviderClass; includeQualifiers=true; "
+ "includeClassOrigin=false; propertyList=requestInputParameters";
+};
+18. +++++ nullvaluetests
+Returned Path Test_CLITestProviderClass.Id="NullValueTest"
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "NullValueTest";
+scalBool = NULL;
+scalUint32 = NULL;
+scalString = NULL;
+defaultBool = TRUE;
+defaultUint32 = 4;
+defaultString = "test\"embedded\"quote";
+requestInputParameters = "propertyList=NULL; includeQualifiers=true; "
+ "includeClassOrigin=false";
+};
+Returned Path Test_CLITestProviderClass.Id="EmptyStringTest"
+path= Test_CLITestProviderClass
+
+//Instance of Test_CLITestProviderClass
+instance of Test_CLITestProviderClass
+{
+Id = "EmptyStringTest";
+scalUint32 = NULL;
+scalUint64 = 99999;
+scalString = NULL;
+defaultString = "";
+arrayUint32 = {99, 0, 31000, 63000, 4294967295};
+requestInputParameters = "propertyList=NULL; includeQualifiers=true; "
+ "includeClassOrigin=false";
+};
+test instance Test_CLITestProviderClass.Id="EmptyStringTest" OK
-Id Name
-Mike Bob
-Norman Susan
-Thomas Peter
-Louis
+Id Name scalBool scalUint8 scalSint8 scalUint16 scalSint16 scalUint32 scalSint32 scalUint64 scalReal32 scalReal64 scalString scalDateTime arrayBool arrayUint8 arraySint8 arrayUint16 arraySint16 arrayUint32 arraySint32 arrayUint64 arrayReal32 arrayReal64 arrayString requestInputParameters
+Mike Bob TRUE 220 124 100 100 100 100 100 1.0000000000000000e+02 1.0000000000000000e+02 teststring 19991224120000.000000+360 TRUE FALSE TRUE 4 128 240 4 126 -126 4 128 240 4 126 -126 4 128 240 4 126 -126 4 128 240 4.0000000000000000e+00 1.2800000000000000e+02 2.4000000000000000e+02 4.0000000000000000e+00 1.2800000000000000e+02 2.4000000000000000e+02 First Second Third propertyList=Id, Name, requestInputParameters, scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false
+Norman Susan propertyList=Id, Name, requestInputParameters, scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false
+Thomas Peter propertyList=Id, Name, requestInputParameters, scalBool, scalUint8, scalSint8, scalUint16, scalSint16, scalUint32, scalSint32, scalUint64, scalSint64, scalReal32, scalReal64, scalString, scalDateTime, defaultBool, defaultUint8, defaultSint8, defaultUint16, defaultSint16, defaultUint32, defaultSint32, defaultUint64, defaultSint64, defaultReal32, defaultReal64, defaultString, defaultDateTime, arrayBool, arrayUint8, arraySint8, arrayUint16, arraySint16, arrayUint32, arraySint32, arrayUint64, arraySint64, arrayReal32, arrayReal64, arrayString, arrayDateTime; includeQualifiers=true; includeClassOrigin=false
$(SHH)cimcli an "TST_PersonDynamic" -n "$(PROVIDERNS)" -rc TST_PersonDynamic --sum -count 1
$(SHH)cimcli an "TST_PersonDynamic" -n "$(PROVIDERNS)" -rc TST_Person --sum -count 2
+ @$(ECHO) +++++ All FamilyProvider tests Passed.
+
general:
clean:
class Test_CLITestProviderClass
{
[key]
- string Id;
+ String Id;
String Name;
+ String requestInputParameters;
- uint32 ReferenceParamTest(
+ // scalar property tests
+ Boolean scalBool;
+ Uint8 scalUint8;
+ Sint8 scalSint8;
+ Uint16 scalUint16;
+ Sint16 scalSint16;
+ Uint32 scalUint32;
+ Sint32 scalSint32;
+ Uint64 scalUint64;
+ Sint64 scalSint64;
+ Real32 scalReal32;
+ Real64 scalReal64;
+ String scalString;
+ Datetime scalDateTime;
+
+ // Scalar properties with default values
+ // scalar property tests
+ Boolean defaultBool = true;
+ Uint8 defaultUint8 = 4;
+ Sint8 defaultSint8 = 4;
+ Uint16 defaultUint16 = 4;
+ Sint16 defaultSint16 = 4;
+ Uint32 defaultUint32 = 4;
+ Sint32 defaultSint32 = 4;
+ Uint64 defaultUint64 = 4;
+ Sint64 defaultSint64 = 4;
+ Real32 defaultReal32;
+ Real64 defaultReal64;
+ String defaultString = "test\"embedded\"quote";
+ Datetime defaultDateTime;
+
+ // Array Property tests
+ Boolean arrayBool[];
+ Uint8 arrayUint8[];
+ Sint8 arraySint8[];
+ Uint16 arrayUint16[];
+ Sint16 arraySint16[];
+ Uint32 arrayUint32[];
+ Sint32 arraySint32[];
+ Uint64 arrayUint64[];
+ Sint64 arraySint64[];
+ Real32 arrayReal32[];
+ Real64 arrayReal64[];
+ String arrayString[];
+ Datetime arrayDateTime[];
+
+ uint32 ReferenceParamTest(
[in] uint32 InParam1,
[out] uint32 OutParam2);
+ // Test input and output of all parameter types
+ uint32 InOutParamTest(
+ [in, out] Boolean scalBool,
+ [in, out] Uint8 scalUint8,
+ [in, out] Sint8 scalSint8,
+ [in, out] Uint16 scalUint16,
+ [in, out] Sint16 scalSint16,
+ [in, out] Uint32 scalUint32,
+ [in, out] Sint32 scalSint32,
+ [in, out] Uint64 scalUint64,
+ [in, out] Real32 scalReal32,
+ [in, out] Real64 scalReal64,
+ [in, out] String scalString,
+ [in, out] Datetime scalDateTime,
+ [in, out] Boolean arrayBool[],
+ [in, out] Uint8 arrayUint8[],
+ [in, out] Sint8 arraySint8[],
+ [in, out] Uint16 arrayUint16[],
+ [in, out] Sint16 arraySint16[],
+ [in, out] Uint32 arrayUint32[],
+ [in, out] Sint32 arraySint32[],
+ [in, out] Uint64 arrayUint64[],
+ [in, out] Real32 arrayReal32[],
+ [in, out] Real64 arrayReal64[],
+ [in, out] String arrayString[],
+ [in, out] Datetime arrayDateTime[],
+ [in, out] Uint32 returnValue
+ );
+ // Test input and output of all parameter types
+ uint32 FullParamTest(
+ [in] Boolean inScalBool,
+ [in] Uint8 inScalUint8,
+ [in] Sint8 inScalSint8,
+ [in] Uint16 inScalUint16,
+ [in] Sint16 inScalSint16,
+ [in] Uint32 inScalUint32,
+ [in] Sint32 inScalSint32,
+ [in] Uint64 inScalUint64,
+ [in] Real32 inScalReal32,
+ [in] Real64 inScalReal64,
+ [in] String inScalString,
+ [in] Datetime inScalDateTime,
+
+ [out] Boolean outScalBool,
+ [out] Uint8 outScalUint8,
+ [out] Sint8 outScalSint8,
+ [out] Uint16 outScalUint16,
+ [out] Sint16 outScalSint16,
+ [out] Uint32 outScalUint32,
+ [out] Sint32 outScalSint32,
+ [out] Uint64 outScalUint64,
+ [out] Real32 outScalReal32,
+ [out] Real64 outScalReal64,
+ [out] String outScalString,
+ [out] Datetime outScalDateTime
+ );
+};
+[Association, Version("1.0.0"), Description("Defines the "
+"relationship between parents and children. Test Ref/Assoc functions in cimli") ]
+class Test_CLITestProviderLinkClass
+{
+ [key] Test_CLITestProviderClass ref parent;
+ [key] Test_CLITestProviderClass ref child;
+ String requestInputParameters;
};
CapabilityID = "CLITestProviderCapability1";
ClassName = "Test_CLITestProviderClass";
Namespaces = { "test/TestProvider" };
- ProviderType = { 2,5 };
+ ProviderType = { 2, 5 };
SupportedProperties = NULL;
- SupportedMethods = { "ReferenceParamTest" };
+ SupportedMethods = { "ReferenceParamTest" , "InOutParamTest" };
+};
+
+instance of PG_ProviderCapabilities
+{
+ ProviderModuleName = "CLITestProviderModule";
+ ProviderName = "CLITestProvider";
+ CapabilityID = "CLITestProviderCapability2";
+ ClassName = "Test_CLITestProviderLinkClass";
+ Namespaces = { "test/TestProvider" };
+ ProviderType = { 2, 3 };
+ SupportedProperties = NULL;
+ SupportedMethods = NULL;
};