os-cmpi-xen

view src/Xen_MemorySettingAllocationFromPool.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 Novell, Inc.
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: Jim Fehlig, <jfehlig@novell.com>
18 // Contributors:
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_MemorySettingAllocationFromPool";
54 static char * _LHSCLASSNAME = "Xen_MemoryPool";
55 static char * _RHSCLASSNAME = "Xen_MemorySettingData";
56 static char * _LHSPROPERTYNAME = "Antecedent";
57 static char * _RHSPROPERTYNAME = "Dependent";
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) &&
156 (resultClass == NULL || CMClassPathIsA(_BROKER, data.value.ref, resultClass, NULL))) {
157 CMReturnObjectPath(results, data.value.ref);
158 }
159 }
161 CMReturnDone(results);
163 exit:
164 _SBLIM_RETURNSTATUS(status);
165 }
168 // ----------------------------------------------------------------------------
169 // Associators()
170 // ----------------------------------------------------------------------------
171 static CMPIStatus Associators(
172 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
173 const CMPIContext * context, /* [in] Additional context info, if any. */
174 const CMPIResult * results, /* [out] Results of this operation. */
175 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
176 const char *assocClass,
177 const char *resultClass,
178 const char *role,
179 const char *resultRole,
180 const char ** properties) /* [in] List of desired properties (NULL=all). */
181 {
182 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
183 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
184 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
185 char *targetclass; /* Class of the target object(s). */
187 _SBLIM_ENTER("Associators");
188 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
189 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
190 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
191 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
192 _SBLIM_TRACE(2, ("--- resultClass=\"%s\"", resultClass));
193 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
194 _SBLIM_TRACE(2, ("--- resultRole=\"%s\"", resultRole));
195 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
196 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
198 /* Check that the requested association class, if any, is supported. */
199 if (assocClass != NULL) {
200 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
201 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
202 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
203 goto exit;
204 }
205 }
207 /* Check that the reference matches the required role, if any. */
208 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
209 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
210 goto exit;
211 }
213 /* Determine the target class from the source class. */
214 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
215 targetclass = _RHSCLASSNAME;
216 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
217 targetclass = _LHSCLASSNAME;
218 } else {
219 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
220 goto exit;
221 }
222 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
224 /* Create an object path for the result class. */
225 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
226 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
227 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
228 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
229 goto exit;
230 }
232 /* Get the list of all target class instances from the CIMOM. */
233 CMPIEnumeration * instances = CBEnumInstances(_BROKER, context, objectpath, NULL, &status);
234 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(instances)) {
235 _SBLIM_TRACE(1,("--- CBEnumInstances() failed - %s", CMGetCharPtr(status.msg)));
236 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
237 goto exit;
238 }
240 /* Return all instances that exactly match the target class and resultClass, if specified. */
241 while (CMHasNext(instances, NULL)) {
242 CMPIData data = CMGetNext(instances, NULL);
243 CMPIObjectPath *op = CMGetObjectPath(data.value.inst,NULL);
244 CMSetNameSpace(op, namespace);
245 char *class = CMGetCharPtr(CMGetClassName(op, NULL));
246 if ((strcmp(class, targetclass) == 0) &&
247 (resultClass == NULL || CMClassPathIsA(_BROKER, op, resultClass, NULL))) {
248 CMReturnInstance(results, data.value.inst);
249 }
250 }
252 CMReturnDone(results);
254 exit:
255 _SBLIM_RETURNSTATUS(status);
256 }
259 // ----------------------------------------------------------------------------
260 // ReferenceNames()
261 // ----------------------------------------------------------------------------
262 static CMPIStatus ReferenceNames(
263 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
264 const CMPIContext * context, /* [in] Additional context info, if any. */
265 const CMPIResult * results, /* [out] Results of this operation. */
266 const CMPIObjectPath * reference, /* [in] Contains the source namespace, classname and object path. */
267 const char *assocClass,
268 const char *role)
269 {
270 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
271 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
272 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
273 char *targetclass; /* Class of the target object(s). */
275 _SBLIM_ENTER("ReferenceNames");
276 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
277 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
278 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
279 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
280 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
281 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
282 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
284 /* Check that the requested association class, if any, is supported. */
285 if (assocClass != NULL) {
286 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
287 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
288 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
289 goto exit;
290 }
291 }
293 /* Check that the reference matches the required role, if any. */
294 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
295 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
296 goto exit;
297 }
299 /* Determine the target class from the source class. */
300 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
301 targetclass = _RHSCLASSNAME;
302 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
303 targetclass = _LHSCLASSNAME;
304 } else {
305 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
306 goto exit;
307 }
308 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
310 /* Create an object path for the result class. */
311 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
312 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
313 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
314 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
315 goto exit;
316 }
318 /* Get the list of all target class object paths from the CIMOM. */
319 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
320 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
321 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
322 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
323 goto exit;
324 }
326 /* Return all object paths that exactly match the target class and resultClass, if specified. */
327 while (CMHasNext(objectpaths, NULL)) {
328 CMPIData data = CMGetNext(objectpaths, NULL);
329 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
330 if (strcmp(class, targetclass) == 0) {
331 /* Create an object path for the association. */
332 CMPIObjectPath * refobjectpath = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, &status);
333 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refobjectpath)) {
334 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
335 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
336 goto exit;
337 }
339 /* Assign the references in the association appropriately. */
340 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
341 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &reference, CMPI_ref);
342 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
343 } else {
344 CMAddKey(refobjectpath, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
345 CMAddKey(refobjectpath, _LHSPROPERTYNAME, &reference, CMPI_ref);
346 }
348 CMReturnObjectPath(results, refobjectpath);
349 }
350 }
352 exit:
353 _SBLIM_RETURNSTATUS(status);
354 }
357 // ----------------------------------------------------------------------------
358 // References()
359 // ----------------------------------------------------------------------------
360 static CMPIStatus References(
361 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
362 const CMPIContext * context, /* [in] Additional context info, if any. */
363 const CMPIResult * results, /* [out] Results of this operation. */
364 const CMPIObjectPath * reference, /* [in] Contains the namespace, classname and desired object path. */
365 const char *assocClass,
366 const char *role,
367 const char **properties) /* [in] List of desired properties (NULL=all). */
368 {
369 CMPIStatus status = { CMPI_RC_OK, NULL }; /* Return status of CIM operations. */
370 char *namespace = CMGetCharPtr(CMGetNameSpace(reference, NULL)); /* Target namespace. */
371 char *sourceclass = CMGetCharPtr(CMGetClassName(reference, &status)); /* Class of the source reference object */
372 char *targetclass; /* Class of the target object(s). */
374 _SBLIM_ENTER("References");
375 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
376 _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
377 _SBLIM_TRACE(2, ("--- reference=\"%s\"", CMGetCharPtr(CDToString(_BROKER, reference, NULL))));
378 _SBLIM_TRACE(2, ("--- assocClass=\"%s\"", assocClass));
379 _SBLIM_TRACE(2, ("--- role=\"%s\"", role));
380 _SBLIM_TRACE(2, ("--- namespace=\"%s\"", namespace));
381 _SBLIM_TRACE(2, ("--- sourceclass=\"%s\"", sourceclass));
383 /* Check that the requested association class, if any, is supported. */
384 if (assocClass != NULL) {
385 CMPIObjectPath * assoc = CMNewObjectPath(_BROKER, namespace, _ASSOCCLASS, NULL);
386 if (!CMClassPathIsA(_BROKER, assoc, assocClass, NULL)) {
387 _SBLIM_TRACE(2, ("--- Unrecognized association class. Ignoring request."));
388 goto exit;
389 }
390 }
392 /* Check that the reference matches the required role, if any. */
393 if ((role != NULL) && strcmp(role, sourceclass) != 0) {
394 _SBLIM_TRACE(2, ("--- Reference does not match required role. Ignoring request."));
395 goto exit;
396 }
398 /* Determine the target class from the source class. */
399 if (strcmp(sourceclass, _LHSCLASSNAME) == 0) {
400 targetclass = _RHSCLASSNAME;
401 } else if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
402 targetclass = _LHSCLASSNAME;
403 } else {
404 _SBLIM_TRACE(2, ("--- Unrecognized source class. Ignoring request."));
405 goto exit;
406 }
407 _SBLIM_TRACE(2, ("--- targetclass=\"%s\"", targetclass));
409 /* Create an object path for the result class. */
410 CMPIObjectPath * objectpath = CMNewObjectPath(_BROKER, namespace, targetclass, &status);
411 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpath)) {
412 _SBLIM_TRACE(1,("--- CMNewObjectPath() failed - %s", CMGetCharPtr(status.msg)));
413 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIObjectPath");
414 goto exit;
415 }
417 /* Get the list of all target class object paths from the CIMOM. */
418 CMPIEnumeration * objectpaths = CBEnumInstanceNames(_BROKER, context, objectpath, &status);
419 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(objectpaths)) {
420 _SBLIM_TRACE(1,("--- CBEnumInstanceNames() failed - %s", CMGetCharPtr(status.msg)));
421 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot enumerate target class");
422 goto exit;
423 }
425 /* Return all object paths that exactly match the target class and resultClass, if specified. */
426 while (CMHasNext(objectpaths, NULL)) {
427 CMPIData data = CMGetNext(objectpaths, NULL);
428 char *class = CMGetCharPtr(CMGetClassName(data.value.ref, NULL));
430 if (strcmp(class, targetclass) == 0) {
431 /* Create an instance for the association. */
432 CMPIInstance * refinstance = _CMNewInstance(_BROKER, namespace, _ASSOCCLASS, &status);
433 if ((status.rc != CMPI_RC_OK) || CMIsNullObject(refinstance)) {
434 _SBLIM_TRACE(1,("--- CMNewInstance() failed - %s", CMGetCharPtr(status.msg)));
435 CMSetStatusWithChars(_BROKER, &status, CMPI_RC_ERROR, "Cannot create new CMPIInstance");
436 goto exit;
437 }
439 /* Assign the references in the association appropriately. */
440 if (strcmp(sourceclass, _RHSCLASSNAME) == 0) {
441 CMSetProperty(refinstance, _RHSPROPERTYNAME, &reference, CMPI_ref);
442 CMSetProperty(refinstance, _LHSPROPERTYNAME, &data.value.ref, CMPI_ref);
443 } else {
444 CMSetProperty(refinstance, _RHSPROPERTYNAME, &data.value.ref, CMPI_ref);
445 CMSetProperty(refinstance, _LHSPROPERTYNAME, &reference, CMPI_ref);
446 }
448 CMReturnInstance(results, refinstance);
449 }
450 }
451 exit:
452 _SBLIM_RETURNSTATUS(status);
453 }
456 // ----------------------------------------------------------------------------
457 // AssociationInitialize()
458 // Perform any necessary initialization immediately after this provider is
459 // first loaded.
460 // ----------------------------------------------------------------------------
461 static void AssociationInitialize(
462 CMPIAssociationMI * self, /* [in] Handle to this provider (i.e. 'self'). */
463 const CMPIContext * context) /* [in] Additional context info, if any. */
464 {
465 _SBLIM_ENTER("AssociationInitialize");
466 _SBLIM_TRACE(2, ("--- self=\"%s\"", self->ft->miName));
467 // _SBLIM_TRACE(2, ("--- context=\"%s\"", CMGetCharPtr(CDToString(_BROKER, context, NULL))));
469 /* Nothing needs to be done to initialize this provider */
470 _SBLIM_RETURN();
471 }
474 // ============================================================================
475 // CMPI ASSOCIATION PROVIDER FUNCTION TABLE SETUP
476 // ============================================================================
477 CMAssociationMIStub( , Xen_MemorySettingAllocationFromPool, _BROKER, AssociationInitialize(&mi, ctx));