os-cmpi-xen

view src/Xen_HasVirtualizationCapabilities.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 // Contributors: Jim Fehlig, <jfehlig@novell.com>
19 // Description:
20 // ============================================================================
22 #include <string.h>
24 /* Include the required CMPI data types, function headers, and macros */
25 #include "cmpidt.h"
26 #include "cmpift.h"
27 #include "cmpimacs.h"
30 // ----------------------------------------------------------------------------
31 // COMMON GLOBAL VARIABLES
32 // ----------------------------------------------------------------------------
34 /* Handle to the CIM broker. Initialized when the provider lib is loaded. */
35 static const CMPIBroker *_BROKER;
37 /* Include utility functions */
38 #include "cmpiutil.h"
40 /* Include _SBLIM_TRACE() logging support */
41 #include "cmpitrace.h"
44 // ============================================================================
45 // CMPI ASSOCIATION PROVIDER FUNCTION TABLE
46 // ============================================================================
48 // ----------------------------------------------------------------------------
49 // Info for the class supported by the association provider
50 // ----------------------------------------------------------------------------
52 /* Name of the left and right hand side classes of this association. */
53 static char * _ASSOCCLASS = "Xen_HasVirtualizationCapabilities";
54 static char * _LHSCLASSNAME = "Xen_VirtualizationCapabilities";
55 static char * _RHSCLASSNAME = "Linux_ComputerSystem";
56 static char * _LHSPROPERTYNAME = "Capabilities";
57 static char * _RHSPROPERTYNAME = "ManagedElement";
59 // ----------------------------------------------------------------------------
60 // AssociationCleanup()
61 // Perform any necessary cleanup immediately before this provider is unloaded.
62 // ----------------------------------------------------------------------------
63 static CMPIStatus AssociationCleanup(
64 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
65 const CMPIContext * context, /* [in] Additional context info, if any. */
66 CMPIBoolean terminating) /* [in] True if MB is terminating */
67 {
68 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
70 _SBLIM_ENTER("AssociationCleanup");
71 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
72 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
74 /* Nothing needs to be done for cleanup. */
75 _SBLIM_RETURNSTATUS(status);
76 }
79 // ----------------------------------------------------------------------------
80 // AssociatorNames()
81 // ----------------------------------------------------------------------------
82 static CMPIStatus AssociatorNames(
83 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
84 const CMPIContext * context, /* [in] Additional context info, if any. */
85 const CMPIResult * results, /* [out] Results of this operation. */
86 const CMPIObjectPath * reference, /* [in] Contains source namespace, classname and object path. */
87 const char * assocClass,
88 const char * resultClass,
89 const char * role,
90 const char * resultRole)
91 {
92 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
93 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
94 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
95 char *targetclass; /* Class of the target object(s). */
97 _SBLIM_ENTER("AssociatorNames");
98 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
99 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
100 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
101 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
102 _SBLIM_TRACE(2, ("--- resultClass=\"%s\"", resultClass));
103 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
104 _SBLIM_TRACE(2, ("--- resultRole=\"%s\"", resultRole));
105 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
106 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
108 /* Check that the requested association class, if any, is supported. */
109 if (assocClass != NULL) {
110 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
111 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
112 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
113 goto exit;
114 }
115 }
117 /* Check that the reference matches the required role, if any. */
118 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
119 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
120 goto exit;
121 }
123 /* Determine the target class from the source class. */
124 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
125 targetclass = _RHSCLASSNAME;
126 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
127 targetclass = _LHSCLASSNAME;
128 } else {
129 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
130 goto exit;
131 }
132 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
134 /* Create an object path for the result class. */
135 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
136 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
137 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
138 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
139 goto exit;
140 }
142 /* Get the list of all target class object paths from the CIMOM. */
143 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
144 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
145 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
146 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
147 goto exit;
148 }
150 /* Return all object paths that exactly match the target class and resultClass, if specified. */
151 while (CMHasNext(objectpaths, NULL)) {
152 CMPIData data = CMGetNext(objectpaths, NULL);
153 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
154 if ((strcmp(class,targetclass) == 0) && ((resultClass == NULL) || (strcmp(class,resultClass) == 0))) {
155 CMReturnObjectPath(results, data.value.ref);
156 }
157 }
159 CMReturnDone(results);
161 exit:
162 _SBLIM_RETURNSTATUS(status);
163 }
166 // ----------------------------------------------------------------------------
167 // Associators()
168 // ----------------------------------------------------------------------------
169 static CMPIStatus Associators(
170 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
171 const CMPIContext * context, /* [in] Additional context info, if any. */
172 const CMPIResult * results, /* [out] Results of this operation. */
173 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
174 const char *assocClass,
175 const char *resultClass,
176 const char *role,
177 const char *resultRole,
178 const char ** properties) /* [in] List of desired properties (NULL=all). */
179 {
180 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
181 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
182 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
183 char *targetclass; /* Class of the target object(s). */
185 _SBLIM_ENTER("Associators");
186 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
187 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
188 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
189 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
190 _SBLIM_TRACE(2, ("--- resultClass=\"%s\"", resultClass));
191 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
192 _SBLIM_TRACE(2, ("--- resultRole=\"%s\"", resultRole));
193 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
194 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
196 /* Check that the requested association class, if any, is supported. */
197 if (assocClass != NULL) {
198 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
199 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
200 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
201 goto exit;
202 }
203 }
205 /* Check that the reference matches the required role, if any. */
206 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
207 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
208 goto exit;
209 }
211 /* Determine the target class from the source class. */
212 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
213 targetclass = _RHSCLASSNAME;
214 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
215 targetclass = _LHSCLASSNAME;
216 } else {
217 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
218 goto exit;
219 }
220 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
222 /* Create an object path for the result class. */
223 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
224 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
225 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
226 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
227 goto exit;
228 }
230 /* Get the list of all target class instances from the CIMOM. */
231 CMPIEnumeration * instances = CBEnumInstances(_BROKER, context, objectpath, NULL, &status);
232 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instances)) {
233 _SBLIM_TRACE(1,("--- CBEnumInstances() failed - %s", CMGetCharPtr(status.msg)));
234 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
235 goto exit;
236 }
238 /* Return all instances that exactly match the target class and resultClass, if specified. */
239 while (CMHasNext(instances, NULL)) {
240 CMPIData data = CMGetNext(instances, NULL);
241 char *class = CMGetCharPtr(CMGetClassName(CMGetObjectPath(data.value.inst,NULL), NULL));
242 if ((strcmp(class,targetclass) == 0) && ((resultClass == NULL) || (strcmp(class,resultClass) == 0))) {
243 // BUG - returning data causes crash !?!
244 _SBLIM_TRACE(2, ("--- data.value.inst=\"%s\"", CMGetCharPtr(CDToString(_BROKER, data.value.inst, NULL))));
245 CMReturnInstance(results, data.value.inst);
246 }
247 }
249 CMReturnDone(results);
251 exit:
252 _SBLIM_RETURNSTATUS(status);
253 }
256 // ----------------------------------------------------------------------------
257 // ReferenceNames()
258 // ----------------------------------------------------------------------------
259 static CMPIStatus ReferenceNames(
260 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
261 const CMPIContext * context, /* [in] Additional context info, if any. */
262 const CMPIResult * results, /* [out] Results of this operation. */
263 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
264 const char *assocClass,
265 const char *role)
266 {
267 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
268 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
269 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
270 char *targetclass; /* Class of the target object(s). */
272 _SBLIM_ENTER("ReferenceNames");
273 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
274 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
275 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
276 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
277 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
278 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
279 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
281 /* Check that the requested association class, if any, is supported. */
282 if (assocClass != NULL) {
283 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
284 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
285 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
286 goto exit;
287 }
288 }
290 /* Check that the reference matches the required role, if any. */
291 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
292 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
293 goto exit;
294 }
296 /* Determine the target class from the source class. */
297 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
298 targetclass = _RHSCLASSNAME;
299 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
300 targetclass = _LHSCLASSNAME;
301 } else {
302 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
303 goto exit;
304 }
305 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
307 /* Create an object path for the result class. */
308 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
309 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
310 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
311 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
312 goto exit;
313 }
315 /* Get the list of all target class object paths from the CIMOM. */
316 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
317 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
318 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
319 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
320 goto exit;
321 }
323 /* Return all object paths that exactly match the target class and resultClass, if specified. */
324 while (CMHasNext(objectpaths, NULL)) {
325 CMPIData data = CMGetNext(objectpaths, NULL);
326 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
327 if (strcmp(class,targetclass) == 0) {
329 /* Create an object path for the association. */
330 CMPIObjectPath * refobjectpath = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, &status);
331 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refobjectpath)) {
332 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
333 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
334 goto exit;
335 }
337 /* Assign the references in the association appropriately. */
338 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
339 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &reference, CMPI_ref);
340 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
341 } else {
342 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
343 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &reference, CMPI_ref);
344 }
346 CMReturnObjectPath(results, refobjectpath);
347 }
348 }
350 exit:
351 _SBLIM_RETURNSTATUS(status);
352 }
355 // ----------------------------------------------------------------------------
356 // References()
357 // ----------------------------------------------------------------------------
358 static CMPIStatus References(
359 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
360 const CMPIContext * context, /* [in] Additional context info, if any. */
361 const CMPIResult * results, /* [out] Results of this operation. */
362 const CMPIObjectPath * reference, /* [in] Contains the namespace, classname and desired object path. */
363 const char *assocClass,
364 const char *role,
365 const char **properties) /* [in] List of desired properties (NULL=all). */
366 {
367 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
368 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
369 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
370 char *targetclass; /* Class of the target object(s). */
372 _SBLIM_ENTER("References");
373 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
374 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
375 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
376 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
377 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
378 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
379 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
381 /* Check that the requested association class, if any, is supported. */
382 if (assocClass != NULL) {
383 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
384 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
385 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
386 goto exit;
387 }
388 }
390 /* Check that the reference matches the required role, if any. */
391 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
392 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
393 goto exit;
394 }
396 /* Determine the target class from the source class. */
397 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
398 targetclass = _RHSCLASSNAME;
399 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
400 targetclass = _LHSCLASSNAME;
401 } else {
402 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
403 goto exit;
404 }
405 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
407 /* Create an object path for the result class. */
408 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
409 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
410 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
411 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
412 goto exit;
413 }
415 /* Get the list of all target class object paths from the CIMOM. */
416 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
417 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
418 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
419 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
420 goto exit;
421 }
423 /* Return all object paths that exactly match the target class and resultClass, if specified. */
424 while (CMHasNext(objectpaths, NULL)) {
425 CMPIData data = CMGetNext(objectpaths, NULL);
426 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
427 if (strcmp(class,targetclass) == 0) {
429 /* Create an instance for the association. */
430 CMPIInstance * refinstance = _CMNewInstance(_BROKER, namespace, _ASSOCCLASS, &status);
431 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refinstance)) {
432 _SBLIM_TRACE(1,("--- CMNewInstance() failed - %s", CMGetCharPtr(status.msg)));
433 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIInstance");
434 goto exit;
435 }
437 /* Assign the references in the association appropriately. */
438 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
439 CMSetProperty(refinstance, _RHSPROPERTYNAME, &reference, CMPI_ref);
440 CMSetProperty(refinstance, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
441 } else {
442 CMSetProperty(refinstance, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
443 CMSetProperty(refinstance, _LHSPROPERTYNAME, &reference, CMPI_ref);
444 }
446 CMReturnInstance(results, refinstance);
447 }
448 }
449 exit:
450 _SBLIM_RETURNSTATUS(status);
451 }
454 // ----------------------------------------------------------------------------
455 // AssociationInitialize()
456 // Perform any necessary initialization immediately after this provider is
457 // first loaded.
458 // ----------------------------------------------------------------------------
459 static void AssociationInitialize(
460 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
461 const CMPIContext * context) /* [in] Additional context info, if any. */
462 {
463 _SBLIM_ENTER("AssociationInitialize");
464 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
465 // _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
467 /* Nothing needs to be done to initialize this provider */
468 _SBLIM_RETURN();
469 }
472 // ============================================================================
473 // CMPI ASSOCIATION PROVIDER FUNCTION TABLE SETUP
474 // ============================================================================
475 CMAssociationMIStub( , Xen_HasVirtualizationCapabilities, _BROKER, AssociationInitialize(&mi, ctx));