1 //%LICENSE////////////////////////////////////////////////////////////////
3 // Licensed to The Open Group (TOG) under one or more contributor license
4 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
5 // this work for additional information regarding copyright ownership.
6 // Each contributor licenses this file to you under the OpenPegasus Open
7 // Source License; you may not use this file except in compliance with the
10 // Permission is hereby granted, free of charge, to any person obtaining a
11 // copy of this software and associated documentation files (the "Software"),
12 // to deal in the Software without restriction, including without limitation
13 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
14 // and/or sell copies of the Software, and to permit persons to whom the
15 // Software is furnished to do so, subject to the following conditions:
17 // The above copyright notice and this permission notice shall be included
18 // in all copies or substantial portions of the Software.
20 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
22 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
23 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
24 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
25 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
26 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 //////////////////////////////////////////////////////////////////////////
30 //%/////////////////////////////////////////////////////////////////////////////
33 Test Provider for cimcli. This provider is intended to be used as a
34 test driver only for cimcli.
36 This provider is based on the Test_CLITestProviderClass class. This class
37 includes all of the CIM Data types in both scalar and array form
38 and provides the following operations:
40 1. Initialize - Creates a single instance of the class with all of the
41 properties initialized. this is placed in an array.
43 2. EnumerateInstances - Returns all instances in the instances array
45 3. GetInstance - Returns the single instance found in the array with the
46 input object path if found
48 4. Create instance - Creates a new instance of the target class and puts it
51 5. ModifyInstance - Attempts to modify an instance of the target class if one
52 is found in the instances array.
54 6. DeleteInstance - Delete an instance of the test class if found in the
57 6. Invoke method: Includes several methods as follows:
60 LIMITATIONS: The provider is intended to be used in a single namespace and so
61 does not include the namespace in the instances placed in the array. Therefore
62 if it is enabled for multiple namespaces, a user from some other namespace could
63 remove, get, or enumerate an instance created in another namespace.
65 It is intended to run a set of tests fairly rapidly so does not hold itself in
66 memory. Therefore, if instances are put into the array after the normal Pegasus
67 timeout of providers for unload, they will be discarded.
70 #include "CLITestProvider.h"
71 #include <Pegasus/Common/PegasusAssert.h>
72 #include <Pegasus/Common/Tracer.h>
73 // Required because of some malignent link betweeh MessageLoader and Thread.h
74 #include <Pegasus/Common/MessageLoader.h>
75 #include <Pegasus/Common/Thread.h>
76 #include <Pegasus/Common/Mutex.h>
79 PEGASUS_USING_PEGASUS;
82 String _toString(Boolean x)
84 return((x)?"true" : "false");
87 static String _toString(const CIMPropertyList& pl)
95 else if (pl.size() == 0)
101 for (Uint32 i = 0; i < pl.size(); i++)
107 s.append(pl[i].getString());
113 Add the name value pair to the String target. The result is the pair
114 added to target in the form
117 void _addParam(String& target, const String& name, const String& value)
119 if (target.size() != 0)
125 target.append(value);
127 Complete the host and namespace fields of an object path if there are
130 void _completePath(const String& hostName,
131 const CIMNamespaceName& nameSpace,
132 CIMObjectPath& objectPath)
134 if (objectPath.getHost().size() == 0)
135 objectPath.setHost(hostName);
137 if (objectPath.getNameSpace().isNull())
138 objectPath.setNameSpace(nameSpace);
140 // convert a fully qualified reference into a local reference
141 // (class name and keys only).
142 CIMObjectPath _localPath(const CIMObjectPath& inputPath)
144 CIMObjectPath localPath = CIMObjectPath(
147 inputPath.getClassName(),
148 inputPath.getKeyBindings());
152 // Serializes access to the instances array during the CIM requests
153 static Mutex instanceArrayMutex;
155 CLITestProvider::CLITestProvider()
157 _initialized = false;
160 CLITestProvider::~CLITestProvider()
164 void CLITestProvider::initialize(CIMOMHandle & cimom)
169 void CLITestProvider::terminate()
174 void CLITestProvider::invokeMethod(
175 const OperationContext & context,
176 const CIMObjectPath & objectReference,
177 const CIMName & methodName,
178 const Array<CIMParamValue> & inParameters,
179 MethodResultResponseHandler & handler)
181 initializeProvider(objectReference.getNameSpace());
183 // convert a fully qualified reference into a local reference
184 // (class name and keys only).
186 CIMObjectPath localReference = CIMObjectPath(
189 objectReference.getClassName(),
190 objectReference.getKeyBindings());
192 handler.processing();
194 String outString = "CLITestProvider Tests : ";
196 if (objectReference.getClassName().equal("Test_CLITestProviderClass"))
198 if (methodName.equal("ReferenceParamTest"))
200 if (inParameters.size() > 0)
202 for(Uint32 i = 0; i < inParameters.size(); ++i)
204 CIMValue paramVal = inParameters[i].getValue();
205 if (!paramVal.isNull())
207 if(paramVal.getType() == CIMTYPE_REFERENCE)
209 CIMObjectPath cop,cop1(
210 "test/Testprovider:class.k1="
211 "\"v1\",k2=\"v2\",k3=\"v3\"");
213 PEGASUS_TEST_ASSERT(cop.identical(cop1) == true);
215 "\n Passed Reference params Test1 ");
216 PEGASUS_TEST_ASSERT(!cop.identical(cop1) == false);
218 "\n Passed Reference params Test2 ");
222 //This code gets excuted for non reference
225 paramVal.get(replyName);
226 if (replyName != String::EMPTY)
228 outString.append(replyName);
229 outString.append("\n");
230 outString.append("Passed String Param Test\n");
233 outString.append("\n");
237 outString.append("Param Value is NULL");
241 handler.deliver(CIMValue(outString));
245 outString.append("Empty Parameters");
246 handler.deliver(CIMValue(outString));
250 // This simply returns all parameters and
251 // sets return value set to zero. This should provide a complete
252 // test of all input and output parameter types for cimcli
253 else if(methodName.equal("InOutParamTest"))
255 if (inParameters.size() > 0)
257 //simply returns all parameters
258 handler.deliverParamValue(inParameters);
260 handler.deliver(Uint32(0));
266 void CLITestProvider::getInstance(
267 const OperationContext & context,
268 const CIMObjectPath & instanceReference,
269 const Boolean includeQualifiers,
270 const Boolean includeClassOrigin,
271 const CIMPropertyList & propertyList,
272 InstanceResponseHandler & handler)
274 initializeProvider(instanceReference.getNameSpace());
276 handler.processing();
278 AutoMutex autoMut(instanceArrayMutex);
281 if ((index = findInstance(instanceReference)) != PEG_NOT_FOUND)
283 // Put input parameters into the requestInputParameters property so
284 // they can be tested on by the client.
286 _addParam(text, "propertyList", _toString(propertyList));
287 _addParam(text, "includeQualifiers", _toString(includeQualifiers));
288 _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
290 // clone and filter the returned instance. Clone so the original
291 // not modified by filter.
294 CIMInstance temp = _instances[index].clone();
295 temp.addProperty(CIMProperty("requestInputParameters", text));
296 temp.filter(includeQualifiers,includeClassOrigin, propertyList);
297 handler.deliver(temp);
299 catch(CIMException& e)
301 cerr << "CIMCLITestProvider: Exception Occured on deliver : "
302 << e.getMessage() << endl;
303 throw CIMException(e);
308 throw CIMException(CIM_ERR_NOT_FOUND);
314 void CLITestProvider::enumerateInstances(
315 const OperationContext & context,
316 const CIMObjectPath & ref,
317 const Boolean includeQualifiers,
318 const Boolean includeClassOrigin,
319 const CIMPropertyList & propertyList,
320 InstanceResponseHandler & handler)
322 initializeProvider(ref.getNameSpace());
324 handler.processing();
326 AutoMutex autoMut(instanceArrayMutex);
328 CIMName reqClassName = ref.getClassName();
330 // Puts input parameters into the requestInputParameters property so
331 // they can be tested on by the client.
333 _addParam(text, "propertyList", _toString(propertyList));
334 _addParam(text, "includeQualifiers", _toString(includeQualifiers));
335 _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
337 for (Uint32 i = 0, n = _instances.size(); i < n; i++)
339 if (reqClassName == _instances[i].getClassName())
343 CIMInstance temp = _instances[i].clone();
344 temp.addProperty(CIMProperty("requestInputParameters", text));
345 temp.filter(includeQualifiers,includeClassOrigin,
347 handler.deliver(temp);
349 catch(CIMException& e)
351 cerr << "CIMCLITestProvider:Exception Occured : "
352 << e.getMessage() << endl;
353 throw CIMException(e);
360 void CLITestProvider::enumerateInstanceNames(
361 const OperationContext & context,
362 const CIMObjectPath & classReference,
363 ObjectPathResponseHandler & handler)
365 initializeProvider(classReference.getNameSpace());
367 handler.processing();
369 AutoMutex autoMut(instanceArrayMutex);
371 CIMName reqClassName = classReference.getClassName();
373 for (Uint32 i = 0, n = _instances.size(); i < n; i++)
375 if (reqClassName == _instances[i].getClassName())
379 handler.deliver(_instances[i].getPath());
381 catch(CIMException& e)
383 cerr << "CIMCLITestProvider:Exception Occured : "
384 << e.getMessage() << endl;
385 throw CIMException(e);
393 void CLITestProvider::modifyInstance(
394 const OperationContext & context,
395 const CIMObjectPath & instanceReference,
396 const CIMInstance & instanceObject,
397 const Boolean includeQualifiers,
398 const CIMPropertyList & propertyList,
399 ResponseHandler & handler)
401 initializeProvider(instanceReference.getNameSpace());
403 handler.processing();
405 // convert a fully qualified reference into a local reference
406 // (class name and keys only).
408 CIMClass mc = _getClass(instanceReference.getClassName(),
409 instanceReference.getNameSpace());
411 // TODO confirm the correctness of allowing either the input path or
412 // the build of the path from the instance to get the instance name
413 // to modify. Works but need to check DMTF specs.
415 // Get path from input instanceReference OR build it
417 CIMObjectPath localRef = (instanceReference.getKeyBindings().size() == 0)?
418 instanceObject.buildPath(mc)
420 _localPath(instanceReference);
422 AutoMutex autoMut(instanceArrayMutex);
424 // Find the proper instance.
426 if ((index = findInstance(localRef)) != PEG_NOT_FOUND)
428 // Modify the existing instance
430 for (Uint32 j = 0 ; j < instanceObject.getPropertyCount() ; j++)
432 CIMConstProperty r1 = instanceObject.getProperty(j);
433 CIMProperty r2 = r1.clone();
437 if ((pos = _instances[index].findProperty(r2.getName()))
440 _instances[index].removeProperty(pos);
441 _instances[index].addProperty(r2);
443 else // simply add the property since not in instance
445 // test if property is in class
446 if (mc.findProperty(r2.getName()) != PEG_NOT_FOUND)
448 _instances[index].addProperty(r2);
452 throw CIMException(CIM_ERR_INVALID_PARAMETER,
453 "Property Not in class " +
454 r2.getName().getString());
458 catch(CIMException& e)
460 throw CIMException(CIM_ERR_FAILED,
461 " Updating Property " + e.getMessage());
463 } // for loop processing properties
469 throw CIMException(CIM_ERR_NOT_FOUND);
473 void CLITestProvider::createInstance(
474 const OperationContext & context,
475 const CIMObjectPath & instanceReference,
476 const CIMInstance & instanceObject,
477 ObjectPathResponseHandler & handler)
479 initializeProvider(instanceReference.getNameSpace());
481 handler.processing();
483 CIMObjectPath newInstanceRef = _localPath(instanceReference);
485 AutoMutex autoMut(instanceArrayMutex);
486 // If there are no properties in the reference, try to get the
487 // key properties and their values from the instanceObject
488 if (instanceReference.getKeyBindings().size() == 0)
490 Array<CIMKeyBinding> keys;
492 Uint32 pos = instanceObject.findProperty("Id");
494 if (pos != PEG_NOT_FOUND)
496 CIMConstProperty cimProperty = instanceObject.getProperty(pos);
498 keys.append(CIMKeyBinding(cimProperty.getName(),
499 cimProperty.getValue()));
501 newInstanceRef.setKeyBindings(keys);
505 throw CIMPropertyNotFoundException("Id");
509 // If the instance exists, throw already_exists exception
510 // Note: instances in the array do not have path component
513 if ((index = findInstance(newInstanceRef)) == PEG_NOT_FOUND)
515 // add the instance to the set of instances saved in the provider.
516 CIMInstance myInstance = instanceObject.clone();
517 myInstance.setPath(newInstanceRef);
518 _instances.append(myInstance);
520 // Deliver path of new instance
521 handler.deliver(newInstanceRef);
527 throw CIMException(CIM_ERR_ALREADY_EXISTS);
531 void CLITestProvider::deleteInstance(
532 const OperationContext & context,
533 const CIMObjectPath & instanceReference,
534 ResponseHandler & handler)
536 initializeProvider(instanceReference.getNameSpace());
538 handler.processing();
540 // convert a fully qualified reference into a local reference
541 // (class name and keys only).
543 AutoMutex autoMut(instanceArrayMutex);
546 if ((index = findInstance(instanceReference)) != PEG_NOT_FOUND)
548 _instances.remove(index);
552 throw CIMException(CIM_ERR_NOT_FOUND);
560 Processing of associator/Reference Operation Requests
562 NOTE: This code is not based on any clear definition of the
563 relationship between objects but simply returning information
564 on instances that exist in the repository. Thus typically it returns
565 the target instance itself (i.e. association of an instance with
566 itself). This works since the only goal of this provider
567 is a syntatic test of cimcli, not any association structure. So our
568 association is that every instance is associated with itself. Note that
569 this removes any meaning from the role and assoc/result class parameters
570 but we test the validity of these by returning a property in the
571 returned isntances containing all of these values so that the client
572 can test to determine if the provider received what was input.
574 void CLITestProvider::associators(
575 const OperationContext& context,
576 const CIMObjectPath& objectName,
577 const CIMName& associationClass,
578 const CIMName& resultClass,
580 const String& resultRole,
581 const Boolean includeQualifiers,
582 const Boolean includeClassOrigin,
583 const CIMPropertyList& propertyList,
584 ObjectResponseHandler& handler)
586 initializeProvider(objectName.getNameSpace());
588 // Get the namespace and host names to create the CIMObjectPath
589 CIMNamespaceName nameSpace = objectName.getNameSpace();
590 String host = System::getHostName();
592 handler.processing();
593 // complete processing the request
594 // Puts input parameters into the requestInputParameters property so that
595 // they can be tested on by the client.
597 _addParam(text, "role", role);
598 _addParam(text, "resultRole", resultRole);
599 _addParam(text, "associationClass", associationClass.getString());
600 _addParam(text, "resultClass", resultClass.getString());
601 _addParam(text, "includeQualifiers", _toString(includeQualifiers));
602 _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
603 _addParam(text, "propertyList", _toString(propertyList));
605 // Return an instance of the associated class for every instance
606 // currently in the local list.
608 if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
612 CIMInstance temp = _instances[index].clone();
613 temp.addProperty(CIMProperty("requestInputParameters", text));
614 temp.setPath(objectName);
615 temp.filter(includeQualifiers,
616 includeClassOrigin, propertyList);
617 handler.deliver(temp);
619 catch(CIMException& e)
621 cerr << "CIMCLITestProvider:Exception Occured : "
622 << e.getMessage() << endl;
623 throw CIMException(e);
629 void CLITestProvider::associatorNames(
630 const OperationContext& context,
631 const CIMObjectPath& objectName,
632 const CIMName& associationClass,
633 const CIMName& resultClass,
635 const String& resultRole,
636 ObjectPathResponseHandler& handler)
638 initializeProvider(objectName.getNameSpace());
639 // Get the namespace and host names to create the CIMObjectPath
640 CIMNamespaceName nameSpace = objectName.getNameSpace();
641 String host = System::getHostName();
643 handler.processing();
644 // complete processing the request
646 // Return an instance of the associated class for every instance
647 // currently in the local list. Simple since we just return the
648 // input path if the instance exists.
650 if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
654 handler.deliver(objectName);
656 catch(CIMException& e)
658 cerr << "CIMCLITestProvider:Exception Occured : "
659 << e.getMessage() << endl;
660 throw CIMException(e);
666 void CLITestProvider::references(
667 const OperationContext& context,
668 const CIMObjectPath& objectName,
669 const CIMName& resultClass,
671 const Boolean includeQualifiers,
672 const Boolean includeClassOrigin,
673 const CIMPropertyList& propertyList,
674 ObjectResponseHandler& handler)
676 initializeProvider(objectName.getNameSpace());
677 // Get the namespace and host names to create the CIMObjectPath
678 CIMNamespaceName nameSpace = objectName.getNameSpace();
679 String host = System::getHostName();
681 handler.processing();
683 CIMName objectClassName = objectName.getClassName();
685 // if the target instance exists in the local storage, build the
686 // association class instance
687 AutoMutex autoMut(instanceArrayMutex);
689 if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
691 Array<CIMName> refClassArray;
692 refClassArray.append(CIMName("Test_CLITestProviderLinkClass"));
694 // Create a single instance of the Test_CLITestProviderLinkClass
695 // This creates a single fixed instance simply to allow the
696 // cimcli client to test results. It also places the input parameters
697 // into the text result so that the client can confirm that the
698 // input parameters were passed to the provider.
700 CIMInstance assocInstance("Test_CLITestProviderLinkClass");
702 assocInstance.addProperty(CIMProperty(CIMName("parent"),
705 CIMName("Test_CLITestProviderClass")));
707 assocInstance.addProperty(CIMProperty(CIMName("child"),
710 CIMName("Test_CLITestProviderClass")));
713 // Put input parameters into the requestInputParameters property so
714 // they can be tested on by the client.
716 _addParam(text, "role", role);
717 _addParam(text, "resultClass", resultClass.getString());
718 _addParam(text, "includeQualifiers", _toString(includeQualifiers));
719 _addParam(text, "includeClassOrigin", _toString(includeClassOrigin));
720 _addParam(text, "propertyList", _toString(propertyList));
722 assocInstance.addProperty(CIMProperty("requestInputParameters",
724 // Create path for assoc instance.
725 CIMClass assocClass = _getClass(CIMName(
726 "Test_CLITestProviderLinkClass"),
729 CIMObjectPath objectPath =
730 assocInstance.buildPath(assocClass);
732 _completePath(host, nameSpace, objectPath);
734 assocInstance.setPath(objectPath);
736 // complete processing the request
737 assocInstance.filter(includeQualifiers,
738 includeClassOrigin, propertyList);
740 handler.deliver(assocInstance);
745 // Return all references (association instance names) in which the given
746 // object is involved.
748 void CLITestProvider::referenceNames(
749 const OperationContext& context,
750 const CIMObjectPath& objectName,
751 const CIMName& resultClass,
753 ObjectPathResponseHandler& handler)
755 CIMNamespaceName nameSpace = objectName.getNameSpace();
756 initializeProvider(nameSpace);
757 // Get the namespace and host names to create the CIMObjectPath
758 String host = System::getHostName();
760 // If the objectName exists in the local list, build the instance
761 // of the association and then build the path for this instance.
763 AutoMutex autoMut(instanceArrayMutex);
766 if ((index = findInstance(objectName)) != PEG_NOT_FOUND)
768 Array<CIMName> refClassArray;
769 refClassArray.append(CIMName("Test_CLITestProviderLinkClass"));
771 CIMInstance assocInstance("Test_CLITestProviderLinkClass");
773 assocInstance.addProperty(CIMProperty(CIMName("parent"),
776 CIMName("Test_CLITestProviderClass")));
778 assocInstance.addProperty(CIMProperty(CIMName("child"),
781 CIMName("Test_CLITestProviderClass")));
783 CIMClass assocClass = _getClass(
784 CIMName("Test_CLITestProviderLinkClass"),
787 // build path for this instance
788 CIMObjectPath objectPath =
789 assocInstance.buildPath(assocClass);
791 _completePath(host, nameSpace, objectPath);
793 handler.deliver(objectPath);
795 // complete processing the request
800 /* get the defined class from the repository.
801 @param className CIMName name of the class to get
802 @return CIMClass with the class or unitialized if
803 there was an error in the getClass
805 CIMClass CLITestProvider::_getClass(const CIMName& className,
806 const CIMNamespaceName& ns)
820 catch (CIMException& e)
822 PEG_TRACE((TRC_DISCARDED_DATA, Tracer::LEVEL1,
823 "CLITestProvider GetClass operation failed: Class %s. Msg %s",
824 (const char*) className.getString().getCString(),
825 (const char*) e.getMessage().getCString()));
826 throw CIMException(CIM_ERR_FAILED);
832 Find an instance in the instance array with path defined by
833 the input parameter. returns the index of the instance or PEG_NOT_FOUND
835 Uint32 CLITestProvider::findInstance(const CIMObjectPath& path)
837 CIMObjectPath localPath = _localPath(path);
839 for (Uint32 i = 0; i < _instances.size(); i++)
841 if(localPath == _instances[i].getPath())
846 return PEG_NOT_FOUND;
848 // Create the instances that will be considered inherently part of the
849 // provider for these tests. This includes one instance of each class
850 // This was done with namespace input so that we could build association
851 // instances that require namespace. It later turned out to be easier
852 // to build them on the fly so that the namespace parameter and the
853 // corresponding dynamic initialization of the provider (initializeProvider)
854 // are not really necessary.
856 void CLITestProvider::createInstances(const CIMNamespaceName& ns)
858 AutoMutex autoMut(instanceArrayMutex);
860 // Create a single instance with all properties and with path
861 // independent of namespace or hostname
863 CIMInstance instance("Test_CLITestProviderClass");
865 instance.addProperty(CIMProperty("Id", String("Mike")));
866 instance.addProperty(CIMProperty("Name", String("Bob")));
867 instance.addProperty(CIMProperty("scalBool", Boolean(true)));
868 instance.addProperty(CIMProperty("scalUint8", Uint8(220)));
869 instance.addProperty(CIMProperty("scalSint8", Sint8(124)));
870 instance.addProperty(CIMProperty("scalUint16", Uint16(100)));
871 instance.addProperty(CIMProperty("scalSint16", Sint16(100)));
872 instance.addProperty(CIMProperty("scalUint32", Uint32(100)));
873 instance.addProperty(CIMProperty("scalSint32", Sint32(100)));
874 instance.addProperty(CIMProperty("scalUint64", Uint64(100)));
875 instance.addProperty(CIMProperty("scalReal32", Real32(100)));
876 instance.addProperty(CIMProperty("scalReal64", Real64(100)));
877 instance.addProperty(CIMProperty("scalString", String("teststring")));
878 instance.addProperty(CIMProperty("scalDateTime",
879 CIMDateTime("19991224120000.000000+360")));
881 // set Values into the corresponding array properties
883 ab.append(true); ab.append(false); ab.append(true);
884 instance.addProperty(CIMProperty("arrayBool", CIMValue(ab)));
887 auint8.append(4); auint8.append(128); auint8.append(240);
888 instance.addProperty(CIMProperty("arrayUint8", CIMValue(auint8)));
891 asint8.append(4); asint8.append(126); asint8.append(-126);
892 instance.addProperty(CIMProperty("arraySint8", CIMValue(asint8)));
894 Array<Uint16> auint16;
895 auint16.append(4); auint16.append(128); auint16.append(240);
896 instance.addProperty(CIMProperty("arrayUint16", CIMValue(auint16)));
898 Array<Sint16> asint16;
899 asint16.append(4); asint16.append(126); asint16.append(-126);
900 instance.addProperty(CIMProperty("arraySint16", CIMValue(asint16)));
902 Array<Uint32> auint32;
903 auint32.append(4); auint32.append(128); auint32.append(240);
904 instance.addProperty(CIMProperty("arrayUint32", CIMValue(auint32)));
906 Array<Sint32> asint32;
907 asint32.append(4); asint32.append(126); asint32.append(-126);
908 instance.addProperty(CIMProperty("arraySint32", CIMValue(asint32)));
910 Array<Uint64> auint64;
911 auint64.append(4); auint64.append(128); auint64.append(240);
912 instance.addProperty(CIMProperty("arrayUint64", CIMValue(auint64)));
914 Array<Real32> aReal32;
915 aReal32.append(4); aReal32.append(128); aReal32.append(240);
916 instance.addProperty(CIMProperty("arrayReal32", CIMValue(aReal32)));
918 Array<Real64> aReal64;
919 aReal64.append(4); aReal64.append(128); aReal64.append(240);
920 instance.addProperty(CIMProperty("arrayReal64", CIMValue(aReal64)));
922 Array<String> aString;
923 aString.append("First"); aString.append("Second"); aString.append("Third");
924 instance.addProperty(CIMProperty("arrayString", CIMValue(aString)));
926 Array<CIMDateTime> aCIMDateTime;
927 aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
928 aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
929 aCIMDateTime.append(CIMDateTime("19991224120000.000000+360"));
930 instance.addProperty(CIMProperty("arrayCIMDateTime",
931 CIMValue(aCIMDateTime)));
932 CIMObjectPath p("Test_CLITestProviderClass.Id=\"Mike\"");
936 _instances.append(instance);
939 void CLITestProvider::initializeProvider(const CIMNamespaceName& ns)