os-cmpi-xen

view src/Xen_HostedProcessor.c @ 121:4868ace2726b

Add initial consistence checks in test suite for Xen_MemoryPool, Xen_ProcessorPool and Xen_VirtualSystemManagementService.

Signed-off-by: Luke Szymanski <Lukasz.Szymanski@Unisys.com>
author Jim Fehlig <jfehlig@novell.com>
date Fri Jun 08 10:22:05 2007 -0600 (2007-06-08)
parents ab8e99c757f5
children
line source
1 // Copyright (C) 2006 IBM Corporation
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 // ============================================================================
17 // Authors: Dr. Gareth S. Bestor, <bestor@us.ibm.com>
18 // Tokunbo Adeshiyan, <tokunbo@us.ibm.com>
19 // Contributors: Jim Fehlig, <jfehlig@novell.com>
20 // Description:
21 // ============================================================================
23 #include <string.h>
25 /* Include the required CMPI data types, function headers, and macros */
26 #include "cmpidt.h"
27 #include "cmpift.h"
28 #include "cmpimacs.h"
31 // ----------------------------------------------------------------------------
32 // COMMON GLOBAL VARIABLES
33 // ----------------------------------------------------------------------------
35 /* Handle to the CIM broker. Initialized when the provider lib is loaded. */
36 static const CMPIBroker *_BROKER;
38 /* Include utility functions */
39 #include "cmpiutil.h"
41 /* Include _SBLIM_TRACE() logging support */
42 #include "cmpitrace.h"
45 // ============================================================================
46 // CMPI ASSOCIATION PROVIDER FUNCTION TABLE
47 // ============================================================================
49 // ----------------------------------------------------------------------------
50 // Info for the class supported by the association provider
51 // ----------------------------------------------------------------------------
53 /* Name of the left and right hand side classes of this association. */
54 static char * _ASSOCCLASS = "Xen_HostedProcessor";
55 static char * _LHSCLASSNAME = "Xen_Processor";
56 static char * _RHSCLASSNAME = "CIM_Processor";
57 static char * _LHSPROPERTYNAME = "Dependent";
58 static char * _RHSPROPERTYNAME = "Antecedent";
60 // ----------------------------------------------------------------------------
61 // AssociationCleanup()
62 // Perform any necessary cleanup immediately before this provider is unloaded.
63 // ----------------------------------------------------------------------------
64 static CMPIStatus AssociationCleanup(
65 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
66 const CMPIContext * context, /* [in] Additional context info, if any. */
67 CMPIBoolean terminating) /* [in] True if MB is terminating */
68 {
69 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
71 _SBLIM_ENTER("AssociationCleanup");
72 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
73 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
75 /* Nothing needs to be done for cleanup. */
76 _SBLIM_RETURNSTATUS(status);
77 }
80 // ----------------------------------------------------------------------------
81 // AssociatorNames()
82 // ----------------------------------------------------------------------------
83 static CMPIStatus AssociatorNames(
84 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
85 const CMPIContext * context, /* [in] Additional context info, if any. */
86 const CMPIResult * results, /* [out] Results of this operation. */
87 const CMPIObjectPath * reference, /* [in] Contains source namespace, classname and object path. */
88 const char * assocClass,
89 const char * resultClass,
90 const char * role,
91 const char * resultRole)
92 {
93 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
94 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
95 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
96 char *targetclass; /* Class of the target object(s). */
98 _SBLIM_ENTER("AssociatorNames");
99 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
100 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
101 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
102 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
103 _SBLIM_TRACE(2, ("--- resultClass=\"%s\"", resultClass));
104 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
105 _SBLIM_TRACE(2, ("--- resultRole=\"%s\"", resultRole));
106 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
107 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
109 /* Check that the requested association class, if any, is supported. */
110 if (assocClass != NULL) {
111 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
112 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
113 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
114 goto exit;
115 }
116 }
118 /* Check that the reference matches the required role, if any. */
119 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
120 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
121 goto exit;
122 }
124 /* Determine the target class from the source class. */
125 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
126 targetclass = _RHSCLASSNAME;
127 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
128 targetclass = _LHSCLASSNAME;
129 } else {
130 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
131 goto exit;
132 }
133 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
135 /* Create an object path for the result class. */
136 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
137 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
138 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
139 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
140 goto exit;
141 }
143 /* Get the list of all target class object paths from the CIMOM. */
144 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
145 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
146 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
147 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
148 goto exit;
149 }
151 /* Return all object paths that exactly match the target class and resultClass, if specified. */
152 while (CMHasNext(objectpaths, NULL)) {
153 CMPIData data = CMGetNext(objectpaths, NULL);
154 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
155 if ((strcmp(class,targetclass) == 0) && ((resultClass == NULL) || (strcmp(class,resultClass) == 0))) {
156 CMReturnObjectPath(results, data.value.ref);
157 }
158 }
160 CMReturnDone(results);
162 exit:
163 _SBLIM_RETURNSTATUS(status);
164 }
167 // ----------------------------------------------------------------------------
168 // Associators()
169 // ----------------------------------------------------------------------------
170 static CMPIStatus Associators(
171 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
172 const CMPIContext * context, /* [in] Additional context info, if any. */
173 const CMPIResult * results, /* [out] Results of this operation. */
174 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
175 const char *assocClass,
176 const char *resultClass,
177 const char *role,
178 const char *resultRole,
179 const char ** properties) /* [in] List of desired properties (NULL=all). */
180 {
181 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
182 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
183 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
184 char *targetclass; /* Class of the target object(s). */
186 _SBLIM_ENTER("Associators");
187 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
188 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
189 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
190 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
191 _SBLIM_TRACE(2, ("--- resultClass=\"%s\"", resultClass));
192 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
193 _SBLIM_TRACE(2, ("--- resultRole=\"%s\"", resultRole));
194 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
195 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
197 /* Check that the requested association class, if any, is supported. */
198 if (assocClass != NULL) {
199 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
200 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
201 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
202 goto exit;
203 }
204 }
206 /* Check that the reference matches the required role, if any. */
207 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
208 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
209 goto exit;
210 }
212 /* Determine the target class from the source class. */
213 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
214 targetclass = _RHSCLASSNAME;
215 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
216 targetclass = _LHSCLASSNAME;
217 } else {
218 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
219 goto exit;
220 }
221 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
223 /* Create an object path for the result class. */
224 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
225 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
226 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
227 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
228 goto exit;
229 }
231 /* Get the list of all target class instances from the CIMOM. */
232 CMPIEnumeration * instances = CBEnumInstances(_BROKER, context, objectpath, NULL, &status);
233 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instances)) {
234 _SBLIM_TRACE(1,("--- CBEnumInstances() failed - %s", CMGetCharPtr(status.msg)));
235 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
236 goto exit;
237 }
239 /* Return all instances that exactly match the target class and resultClass, if specified. */
240 while (CMHasNext(instances, NULL)) {
241 CMPIData data = CMGetNext(instances, NULL);
242 char *class = CMGetCharPtr(CMGetClassName(CMGetObjectPath(data.value.inst,NULL), NULL));
243 if ((strcmp(class,targetclass) == 0) && ((resultClass == NULL) || (strcmp(class,resultClass) == 0))) {
244 // BUG - returning data causes crash !?!
245 _SBLIM_TRACE(2, ("--- data.value.inst=\"%s\"", CMGetCharPtr(CDToString(_BROKER, data.value.inst, NULL))));
246 CMReturnInstance(results, data.value.inst);
247 }
248 }
250 CMReturnDone(results);
252 exit:
253 _SBLIM_RETURNSTATUS(status);
254 }
257 // ----------------------------------------------------------------------------
258 // ReferenceNames()
259 // ----------------------------------------------------------------------------
260 static CMPIStatus ReferenceNames(
261 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
262 const CMPIContext * context, /* [in] Additional context info, if any. */
263 const CMPIResult * results, /* [out] Results of this operation. */
264 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
265 const char *assocClass,
266 const char *role)
267 {
268 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
269 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
270 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
271 char *targetclass; /* Class of the target object(s). */
273 _SBLIM_ENTER("ReferenceNames");
274 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
275 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
276 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
277 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
278 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
279 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
280 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
282 /* Check that the requested association class, if any, is supported. */
283 if (assocClass != NULL) {
284 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
285 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
286 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
287 goto exit;
288 }
289 }
291 /* Check that the reference matches the required role, if any. */
292 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
293 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
294 goto exit;
295 }
297 /* Determine the target class from the source class. */
298 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
299 targetclass = _RHSCLASSNAME;
300 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
301 targetclass = _LHSCLASSNAME;
302 } else {
303 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
304 goto exit;
305 }
306 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
308 /* Create an object path for the result class. */
309 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
310 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
311 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
312 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
313 goto exit;
314 }
316 /* Get the list of all target class object paths from the CIMOM. */
317 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
318 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
319 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
320 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
321 goto exit;
322 }
324 /* Return all object paths that exactly match the target class and resultClass, if specified. */
325 while (CMHasNext(objectpaths, NULL)) {
326 CMPIData data = CMGetNext(objectpaths, NULL);
327 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
328 if (strcmp(class,targetclass) == 0) {
330 /* Create an object path for the association. */
331 CMPIObjectPath * refobjectpath = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, &status);
332 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refobjectpath)) {
333 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
334 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
335 goto exit;
336 }
338 /* Assign the references in the association appropriately. */
339 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
340 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &reference, CMPI_ref);
341 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
342 } else {
343 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
344 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &reference, CMPI_ref);
345 }
347 CMReturnObjectPath(results, refobjectpath);
348 }
349 }
351 exit:
352 _SBLIM_RETURNSTATUS(status);
353 }
356 // ----------------------------------------------------------------------------
357 // References()
358 // ----------------------------------------------------------------------------
359 static CMPIStatus References(
360 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
361 const CMPIContext * context, /* [in] Additional context info, if any. */
362 const CMPIResult * results, /* [out] Results of this operation. */
363 const CMPIObjectPath * reference, /* [in] Contains the namespace, classname and desired object path. */
364 const char *assocClass,
365 const char *role,
366 const char **properties) /* [in] List of desired properties (NULL=all). */
367 {
368 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
369 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
370 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
371 char *targetclass; /* Class of the target object(s). */
373 _SBLIM_ENTER("References");
374 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
375 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
376 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
377 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
378 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
379 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
380 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
382 /* Check that the requested association class, if any, is supported. */
383 if (assocClass != NULL) {
384 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
385 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
386 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
387 goto exit;
388 }
389 }
391 /* Check that the reference matches the required role, if any. */
392 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
393 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
394 goto exit;
395 }
397 /* Determine the target class from the source class. */
398 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
399 targetclass = _RHSCLASSNAME;
400 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
401 targetclass = _LHSCLASSNAME;
402 } else {
403 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
404 goto exit;
405 }
406 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
408 /* Create an object path for the result class. */
409 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
410 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
411 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
412 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
413 goto exit;
414 }
416 /* Get the list of all target class object paths from the CIMOM. */
417 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
418 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
419 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
420 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
421 goto exit;
422 }
424 /* Return all object paths that exactly match the target class and resultClass, if specified. */
425 while (CMHasNext(objectpaths, NULL)) {
426 CMPIData data = CMGetNext(objectpaths, NULL);
427 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
428 if (strcmp(class,targetclass) == 0) {
430 /* Create an instance for the association. */
431 CMPIInstance * refinstance = _CMNewInstance(_BROKER, namespace, _ASSOCCLASS, &status);
432 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refinstance)) {
433 _SBLIM_TRACE(1,("--- CMNewInstance() failed - %s", CMGetCharPtr(status.msg)));
434 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIInstance");
435 goto exit;
436 }
438 /* Assign the references in the association appropriately. */
439 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
440 CMSetProperty(refinstance, _RHSPROPERTYNAME, &reference, CMPI_ref);
441 CMSetProperty(refinstance, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
442 } else {
443 CMSetProperty(refinstance, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
444 CMSetProperty(refinstance, _LHSPROPERTYNAME, &reference, CMPI_ref);
445 }
447 CMReturnInstance(results, refinstance);
448 }
449 }
450 exit:
451 _SBLIM_RETURNSTATUS(status);
452 }
455 // ----------------------------------------------------------------------------
456 // AssociationInitialize()
457 // Perform any necessary initialization immediately after this provider is
458 // first loaded.
459 // ----------------------------------------------------------------------------
460 static void AssociationInitialize(
461 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
462 const CMPIContext * context) /* [in] Additional context info, if any. */
463 {
464 _SBLIM_ENTER("AssociationInitialize");
465 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
466 // _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
468 /* Nothing needs to be done to initialize this provider */
469 _SBLIM_RETURN();
470 }
473 // ============================================================================
474 // CMPI ASSOCIATION PROVIDER FUNCTION TABLE SETUP
475 // ============================================================================
476 CMAssociationMIStub( , Xen_HostedProcessor, _BROKER, AssociationInitialize(&mi, ctx));