OpenClovis Logo

clAmsUtils.h
1 /*
2  * Copyright (C) 2002-2012 OpenClovis Solutions Inc. All Rights Reserved.
3  *
4  * This file is available under a commercial license from the
5  * copyright holder or the GNU General Public License Version 2.0.
6  *
7  * The source code for this program is not published or otherwise
8  * divested of its trade secrets, irrespective of what has been
9  * deposited with the U.S. Copyright office.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * General Public License for more details.
15  *
16  * For more information, see the file COPYING provided with this
17  * material.
18  */
19 /*******************************************************************************
20  * ModuleName : amf
21  * File : clAmsUtils.h
22  *******************************************************************************/
23 
24 /*******************************************************************************
25  * Description :
26  * This header file contains utility definitions required by AMS.
27  ***************************** Editor Commands ********************************
28  * For vi/vim
29  * :set shiftwidth=4
30  * :set softtabstop=4
31  * :set expandtab
32  *****************************************************************************/
33 
34 #ifndef _CL_AMS_UTILS_H_
35 #define _CL_AMS_UTILS_H_
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
41 /******************************************************************************
42  * Include files needed to compile this file
43  *****************************************************************************/
44 
45 #include <stdio.h>
46 #include <string.h>
47 
48 #include <clCommon.h>
49 #include <clOsalApi.h>
50 #include <clDebugApi.h>
51 #include <clAmsErrors.h>
52 #include <clAmsMgmtCommon.h>
53 
54 /******************************************************************************
55  * Debug Defines
56  *****************************************************************************/
57 
58 extern char *clAmsFormatMsg(char *fmt, ...);
59 extern void clAmsLogMsgClient( const ClUint32T level, char *buffer);
60 
61 /******************************************************************************
62  * Common Error Checking Defines
63  *****************************************************************************/
64 
65 #define AMS_CLIENT_LOG(LEVEL, MSG) \
66 { \
67  clAmsLogMsgClient( LEVEL, clAmsFormatMsg MSG ); \
68 }
69 
70 #ifndef AMS_SERVER
71 #define AMS_LOG(LEVEL, MSG) AMS_CLIENT_LOG(LEVEL,MSG)
72 #endif
73 
74 #define AMS_CHECK_BAD_CLNAME(name) \
75 { \
76  if ( (name).length > CL_MAX_NAME_LENGTH ) \
77  { \
78  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
79  ("ALERT [%s:%d] : Invalid ClNameT structure\n", \
80  __FUNCTION__, __LINE__)); \
81  rc = CL_ERR_BUFFER_OVERRUN; \
82  goto exitfn; \
83  } \
84 }
85 
86 #define AMS_CHECK_ENTITY_TYPE(type) \
87 { \
88  if ( (type) > CL_AMS_ENTITY_TYPE_MAX ) \
89  { \
90  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
91  ("ERROR: Invalid entity type = %d\n", type)); \
92  return CL_AMS_RC(CL_AMS_ERR_INVALID_ENTITY); \
93  } \
94 }
95 
96 #define AMS_CHECK_ENTITY_TYPE_AND_EXIT(type) \
97 { \
98  if ( (type) > CL_AMS_ENTITY_TYPE_MAX ) \
99  { \
100  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
101  ("ERROR: Invalid entity type = %d\n", type)); \
102  rc = CL_AMS_RC (CL_AMS_ERR_INVALID_ENTITY); \
103  goto exitfn; \
104  } \
105 }
106 
107 #define AMS_CHECK_RC_ERROR(fn) \
108 { \
109  rc = (fn); \
110  \
111  if ( (rc) != CL_OK ) \
112  { \
113  goto exitfn; \
114  } \
115 }
116 
117 #define AMS_CHECK_RC_UNLOCK(fn) do { \
118  rc = (fn); \
119  if ( (rc) != CL_OK ) \
120  { \
121  goto out_unlock; \
122  } \
123 }while(0)
124 
125 #define AMS_CHECKPTR_SILENT(x) \
126 { \
127  if ( (x) != CL_FALSE ) \
128  { \
129  return CL_AMS_RC(CL_ERR_NULL_POINTER); \
130  } \
131 }
132 
133 #define AMS_CHECK_NO_MEMORY(x) \
134 { \
135  if ( (x) == NULL ) \
136  { \
137  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
138  ("ALERT [%s:%d] : Expression (%s) is True. No Memory\n", \
139  __FUNCTION__, __LINE__, #x)); \
140  return CL_AMS_RC(CL_ERR_NO_MEMORY); \
141  } \
142 }
143 
144 #define AMS_CHECK_NO_MEMORY_AND_EXIT(x) \
145 { \
146  if ( (x) == NULL ) \
147  { \
148  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
149  ("ALERT [%s:%d] : Expression (%s) is True. No Memory\n", \
150  __FUNCTION__, __LINE__, #x)); \
151  rc = CL_ERR_NO_MEMORY; \
152  goto exitfn; \
153  } \
154 }
155 
156 #define AMS_CHECKPTR_AND_EXIT(x) \
157 { \
158  if ( (x) != CL_FALSE ) \
159  { \
160  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
161  ("ALERT [%s:%d] : Expression (%s) is True. Null Pointer\n", \
162  __FUNCTION__, __LINE__, #x)); \
163  rc = CL_ERR_NULL_POINTER; \
164  goto exitfn; \
165  } \
166 }
167 
168 #define AMS_CHECKPTR(x) \
169 { \
170  if ( (x) != CL_FALSE ) \
171  { \
172  AMS_CLIENT_LOG(CL_DEBUG_ERROR, \
173  ("ALERT [%s:%d] : Expression (%s) is True. Null Pointer\n", \
174  __FUNCTION__, __LINE__, #x)); \
175  return CL_AMS_RC(CL_ERR_NULL_POINTER); \
176  } \
177 }
178 
179 /******************************************************************************
180  * Utility Functions
181  *****************************************************************************/
182 
183 #define AMS_MIN(x,y) ( (x) < (y) ) ? (x) : (y);
184 #define AMS_MAX(x,y) ( (x) > (y) ) ? (x) : (y);
185 
186 #define clAmsFreeMemory(mPtr) \
187 { \
188  if ( (mPtr) !=NULL ) \
189  { \
190  clHeapFree(mPtr); \
191  } \
192  mPtr = NULL; \
193 }
194 
195 /******************************************************************************
196  * Printing Related Defines
197  *****************************************************************************/
198 
199 #define CL_AMS_COLUMN_1_WIDTH 45
200 #define CL_AMS_COLUMN_2_WIDTH 35
201 #define CL_AMS_COLUMN_1_DELIMITER "--------------------------------------"
202 #define CL_AMS_COLUMN_2_DELIMITER "---------------------------------"
203 #define CL_AMS_DELIMITER \
204  "==========================================================================="
205 
206 #define CL_AMS_PRINT_TWO_COL(A,B,C) \
207 { \
208  clOsalPrintf("%-*s | ", CL_AMS_COLUMN_1_WIDTH, A); \
209  clOsalPrintf(B, C); \
210  clOsalPrintf("\n"); \
211  if ( debugPrintFP != NULL ) \
212  { \
213  fprintf(debugPrintFP,"%-*s | ", CL_AMS_COLUMN_1_WIDTH, A); \
214  fprintf(debugPrintFP,B, C); \
215  fprintf(debugPrintFP,"\n"); \
216  } \
217 }
218 
219 #define CL_AMS_PRINT_DELIMITER() \
220 { \
221  clOsalPrintf("%s\n", CL_AMS_DELIMITER); \
222  if ( debugPrintFP != NULL ) \
223  { \
224  fprintf(debugPrintFP,"%s\n", CL_AMS_DELIMITER); \
225  } \
226 }
227 
228 #define CL_AMS_PRINT_EMPTY_LINE() \
229 { \
230  clOsalPrintf("\n\n"); \
231  if ( debugPrintFP != NULL ) \
232  { \
233  fprintf(debugPrintFP,"\n\n"); \
234  } \
235 }
236 
237 
238 #define CL_AMS_PRINT_SUMMARY 1
239 #define CL_AMS_PRINT_DETAILS 2
240 
241 #define CL_AMS_PRINT_HEADER(TITLE,FORMAT,STRING) \
242 { \
243  CL_AMS_PRINT_DELIMITER(); \
244  CL_AMS_PRINT_TWO_COL(TITLE, FORMAT, STRING); \
245  CL_AMS_PRINT_DELIMITER(); \
246 }
247 
248 #define CL_AMS_PRINT_OPEN_TAG(tag) \
249 { \
250  fprintf(debugPrintFP, "<%s>\n", tag); \
251 }
252 
253 #define CL_AMS_PRINT_CLOSE_TAG(tag) \
254 { \
255  fprintf(debugPrintFP, "</%s>\n", tag); \
256 }
257 
258 #define CL_AMS_PRINT_TAG_ATTR(tag, s, value) \
259 { \
260  fprintf(debugPrintFP, "<%s value=\""s"\"/>\n", tag, value); \
261 }
262 
263 #define CL_AMS_PRINT_TAG_VALUE(tag, s, value) \
264 { \
265  fprintf(debugPrintFP, "<%s>"s"</%s>\n", tag, value, tag); \
266 }
267 
268 #define CL_AMS_PRINT_OPEN_TAG_ATTR(tag, s, value) \
269 { \
270  fprintf(debugPrintFP, "<%s value=\""s"\">\n", tag, value); \
271 }
272 
273 /******************************************************************************
274  * Strings for AMS Types
275  *****************************************************************************/
276 
277 #define CL_AMS_STRING_BOOLEAN(S) ( (S) ? "True" : "False" )
278 
279 #define CL_AMS_STRING_SERVICE_STATE(S) \
280 ( ((S) == CL_AMS_SERVICE_STATE_RUNNING ) ? "Running" : \
281  ((S) == CL_AMS_SERVICE_STATE_STOPPED) ? "Stopped" : \
282  ((S) == CL_AMS_SERVICE_STATE_STARTINGUP) ? "Starting Up" : \
283  ((S) == CL_AMS_SERVICE_STATE_SHUTTINGDOWN) ? "Shutting Down" : \
284  ((S) == CL_AMS_SERVICE_STATE_UNAVAILABLE) ? "Unavailable" : \
285  ((S) == CL_AMS_SERVICE_STATE_HOT_STANDBY) ? "Hot standby" : \
286  ((S) == CL_AMS_SERVICE_STATE_NONE) ? "None" : \
287  "Unknown" )
288 
289 #define CL_AMS_STRING_INSTANTIATE_MODE(S) \
290 ( ((S)&CL_AMS_INSTANTIATE_MODE_ACTIVE) ? "Active Mode" : \
291  ((S)&CL_AMS_INSTANTIATE_MODE_STANDBY) ? "Standby Mode": \
292  "Unknown" )
293 
294 #define CL_AMS_STRING_A_STATE(S) \
295 ( ((S) == CL_AMS_ADMIN_STATE_UNLOCKED) ? "Unlocked" : \
296  ((S) == CL_AMS_ADMIN_STATE_LOCKED_A) ? "Locked Assignment" : \
297  ((S) == CL_AMS_ADMIN_STATE_LOCKED_I) ? "Locked Instantiation" : \
298  ((S) == CL_AMS_ADMIN_STATE_SHUTTINGDOWN) ? "Shutting Down" : \
299  ((S) == CL_AMS_ADMIN_STATE_NONE) ? "None" : \
300  "Unknown" )
301 
302 #define CL_AMS_STRING_O_STATE(S) \
303 ( ((S) == CL_AMS_OPER_STATE_ENABLED) ? "Enabled" : \
304  ((S) == CL_AMS_OPER_STATE_DISABLED) ? "Disabled" : \
305  ((S) == CL_AMS_OPER_STATE_NONE) ? "None" : \
306  "Unknown" )
307 
308 #define CL_AMS_STRING_P_STATE(S) \
309 ( ((S) == CL_AMS_PRESENCE_STATE_UNINSTANTIATED) ? "Uninstantiated" : \
310  ((S) == CL_AMS_PRESENCE_STATE_INSTANTIATING) ? "Instantiating" : \
311  ((S) == CL_AMS_PRESENCE_STATE_INSTANTIATED) ? "Instantiated" : \
312  ((S) == CL_AMS_PRESENCE_STATE_TERMINATING) ? "Terminating" : \
313  ((S) == CL_AMS_PRESENCE_STATE_RESTARTING) ? "Restarting" : \
314  ((S) == CL_AMS_PRESENCE_STATE_INSTANTIATION_FAILED) ? "Instantiation Failed" : \
315  ((S) == CL_AMS_PRESENCE_STATE_TERMINATION_FAILED) ? "Termination Failed" : \
316  ((S) == CL_AMS_PRESENCE_STATE_FAULT) ? "Fault" : \
317  ((S) == CL_AMS_PRESENCE_STATE_FAULT_WTR) ? "Fault WTR" : \
318  ((S) == CL_AMS_PRESENCE_STATE_FAULT_WTC) ? "Fault WTC" : \
319  ((S) == CL_AMS_PRESENCE_STATE_NONE) ? "None" : \
320  "Unknown" )
321 
322 #define CL_AMS_STRING_R_STATE(S) \
323 ( ((S) == CL_AMS_READINESS_STATE_INSERVICE) ? "In Service" : \
324  ((S) == CL_AMS_READINESS_STATE_STOPPING) ? "Stopping" : \
325  ((S) == CL_AMS_READINESS_STATE_OUTOFSERVICE)? "Out of Service" : \
326  ((S) == CL_AMS_READINESS_STATE_NONE) ? "None" : \
327  "Unknown" )
328 
329 #define CL_AMS_STRING_H_STATE(S) \
330 ( ((ClAmsHAStateT)(S) == CL_AMS_HA_STATE_ACTIVE) ? "Active" : \
331  ((ClAmsHAStateT)(S) == CL_AMS_HA_STATE_STANDBY) ? "Standby" : \
332  ((ClAmsHAStateT)(S) == CL_AMS_HA_STATE_QUIESCED) ? "Quiesced" : \
333  ((ClAmsHAStateT)(S) == CL_AMS_HA_STATE_QUIESCING) ? "Quiescing" : \
334  ((ClAmsHAStateT)(S) == CL_AMS_HA_STATE_NONE) ? "None" : \
335  "Unknown" )
336 
337 #define CL_AMS_STRING_TIMER(S) \
338 ( ((S) == CL_AMS_NODE_TIMER_SUFAILOVER) ? "Node-SUFailover" : \
339  ((S) == CL_AMS_SG_TIMER_INSTANTIATE) ? "SG-Instantiate" : \
340  ((S) == CL_AMS_SG_TIMER_ADJUST) ? "SG-Adjust" : \
341  ((S) == CL_AMS_SG_TIMER_ADJUST_PROBATION) ? "SG-Adjust-Probation" : \
342  ((S) == CL_AMS_SU_TIMER_SURESTART) ? "SU-SURestart" : \
343  ((S) == CL_AMS_SU_TIMER_PROBATION) ? "SU-SUProbation" : \
344  ((S) == CL_AMS_SU_TIMER_COMPRESTART) ? "SU-CompRestart" : \
345  ((S) == CL_AMS_SU_TIMER_ASSIGNMENT) ? "SU-Assignment-Delay" : \
346  ((S) == CL_AMS_COMP_TIMER_INSTANTIATE) ? "Comp-Instantiate" : \
347  ((S) == CL_AMS_COMP_TIMER_INSTANTIATEDELAY) ? "Comp-InstantiateDelay" : \
348  ((S) == CL_AMS_COMP_TIMER_TERMINATE) ? "Comp-Terminate" : \
349  ((S) == CL_AMS_COMP_TIMER_CLEANUP) ? "Comp-Cleanup" : \
350  ((S) == CL_AMS_COMP_TIMER_AMSTART) ? "Comp-AMStart" : \
351  ((S) == CL_AMS_COMP_TIMER_AMSTOP) ? "Comp-AMStop" : \
352  ((S) == CL_AMS_COMP_TIMER_QUIESCINGCOMPLETE) ? "Comp-QuiescingComplete" : \
353  ((S) == CL_AMS_COMP_TIMER_CSISET) ? "Comp-CSISet" : \
354  ((S) == CL_AMS_COMP_TIMER_CSIREMOVE) ? "Comp-CSIRemove" : \
355  ((S) == CL_AMS_COMP_TIMER_PROXIEDCOMPINSTANTIATE)? "Comp-ProxiedCompInstantiate": \
356  ((S) == CL_AMS_COMP_TIMER_PROXIEDCOMPCLEANUP) ? "Comp-ProxiedCompCleanup": \
357  "Unknown" )
358 
359 #define CL_AMS_STRING_NODE_CLASSTYPE(S) \
360 ( ((S) == CL_AMS_NODE_CLASS_A) ? "Class A" : \
361  ((S) == CL_AMS_NODE_CLASS_B) ? "Class B" : \
362  ((S) == CL_AMS_NODE_CLASS_C) ? "Class C" : \
363  ((S) == CL_AMS_NODE_CLASS_D) ? "Class D" : \
364  ((S) == CL_AMS_NODE_CLASS_NONE) ? "None" : \
365  "Unknown" )
366 
367 #define CL_AMS_STRING_NODE_ISCLUSTERMEMBER(S) \
368 ( ((S) == CL_AMS_NODE_IS_CLUSTER_MEMBER) ? "True" : \
369  ((S) == CL_AMS_NODE_IS_LEAVING_CLUSTER) ? "Leaving" : \
370  "False" )
371 
372 #define CL_AMS_STRING_SG_REDUNDANCY_MODEL(S) \
373 ( ((S) == CL_AMS_SG_REDUNDANCY_MODEL_NO_REDUNDANCY) ? "No Redundancy" : \
374  ((S) == CL_AMS_SG_REDUNDANCY_MODEL_TWO_N) ? "2N (1+1)" : \
375  ((S) == CL_AMS_SG_REDUNDANCY_MODEL_M_PLUS_N) ? "M + N" : \
376  ((S) == CL_AMS_SG_REDUNDANCY_MODEL_N_WAY) ? "N-Way" : \
377  ((S) == CL_AMS_SG_REDUNDANCY_MODEL_N_WAY_ACTIVE) ? "N-Way-Active" : \
378  ((S) == CL_AMS_SG_REDUNDANCY_MODEL_CUSTOM) ? "CUSTOM" : \
379  "Unknown" )
380 
381 #define CL_AMS_STRING_SG_LOADING_STRATEGY(S) \
382 ( ((S) == CL_AMS_SG_LOADING_STRATEGY_LEAST_SI_PER_SU) ? "Least SI per SU" : \
383  ((S) == CL_AMS_SG_LOADING_STRATEGY_LEAST_SU_ASSIGNED) ? "Least SU Assigned" : \
384  ((S) == CL_AMS_SG_LOADING_STRATEGY_LEAST_LOAD_PER_SU) ? "Least Load per SU" : \
385  ((S) == CL_AMS_SG_LOADING_STRATEGY_BY_SI_PREFERENCE) ? "By SI Perference" : \
386  ((S) == CL_AMS_SG_LOADING_STRATEGY_USER_DEFINED) ? "User Defined" : \
387  "Unknown" )
388 
389 #define CL_AMS_STRING_RECOVERY(S) \
390 ( ((S) == CL_AMS_RECOVERY_NO_RECOMMENDATION) ? "No Recommendation" : \
391  ((S) == CL_AMS_RECOVERY_COMP_RESTART) ? "Component Restart" : \
392  ((S) == CL_AMS_RECOVERY_COMP_FAILOVER) ? "Component Failover" : \
393  ((S) == CL_AMS_RECOVERY_NODE_SWITCHOVER) ? "Node Switchover" : \
394  ((S) == CL_AMS_RECOVERY_NODE_FAILOVER) ? "Node Failover" : \
395  ((S) == CL_AMS_RECOVERY_NODE_FAILFAST) ? "Node Failfast" : \
396  ((S) == CL_AMS_RECOVERY_APP_RESTART) ? "Application Restart" : \
397  ((S) == CL_AMS_RECOVERY_CLUSTER_RESET) ? "Cluster Restart" : \
398  ((S) == CL_AMS_RECOVERY_INTERNALLY_RECOVERED) ? "Internally Recovered" : \
399  ((S) == CL_AMS_RECOVERY_SU_RESTART) ? "SU Restart" : \
400  ((S) == CL_AMS_RECOVERY_NONE) ? "None" : \
401  ((S) == CL_AMS_EXTERNAL_RECOVERY_RESET) ? "External Component Reset" : \
402  ((S) == CL_AMS_EXTERNAL_RECOVERY_REBOOT) ? "External Component Reboot" : \
403  ((S) == CL_AMS_EXTERNAL_RECOVERY_POWER_ON) ? "External Component PowerOn" : \
404  ((S) == CL_AMS_EXTERNAL_RECOVERY_POWER_OFF) ? "External Component PowerOff" : \
405  ((S) == CL_AMS_RECOVERY_NODE_HALT) ? "Node halt" : \
406  "Unknown" )
407 
408 #define CL_AMS_STRING_COMP_PROPERTY(S) \
409 ( ((S) == CL_AMS_COMP_PROPERTY_SA_AWARE) ? \
410  "SA Aware" : \
411  ((S) == CL_AMS_COMP_PROPERTY_PROXIED_PREINSTANTIABLE) ? \
412  "Proxied Preinstantiable": \
413  ((S) == CL_AMS_COMP_PROPERTY_PROXIED_NON_PREINSTANTIABLE) ? \
414  "Proxied Non Preinstantiable": \
415  ((S) == CL_AMS_COMP_PROPERTY_NON_PROXIED_NON_PREINSTANTIABLE) ? \
416  "Non Proxied Non Preinstantiable": \
417  "Unknown" )
418 
419 #define CL_AMS_STRING_COMP_CAP(S) \
420 ( ((S) == CL_AMS_COMP_CAP_X_ACTIVE_AND_Y_STANDBY) ? "X-Active AND Y-Standby" : \
421  ((S) == CL_AMS_COMP_CAP_X_ACTIVE_OR_Y_STANDBY) ? "X-Active OR Y-Standby" : \
422  ((S) == CL_AMS_COMP_CAP_ONE_ACTIVE_OR_X_STANDBY) ? "1-Active OR Y-Standby" : \
423  ((S) == CL_AMS_COMP_CAP_ONE_ACTIVE_OR_ONE_STANDBY) ? "1-Active OR 1-Standby" : \
424  ((S) == CL_AMS_COMP_CAP_X_ACTIVE) ? "X-Active" : \
425  ((S) == CL_AMS_COMP_CAP_ONE_ACTIVE) ? "1-Active" : \
426  ((S) == CL_AMS_COMP_CAP_NON_PREINSTANTIABLE) ? "Non Preinstantiable" : \
427  "Unknown" )
428 
429 #define CL_AMS_STRING_CSI_FLAGS(S) \
430 ( ((S) & CL_AMS_CSI_FLAG_ADD_ONE) ? "ADD_ONE" : \
431  ((S) & CL_AMS_CSI_FLAG_TARGET_ONE) ? "TARGET_ONE" : \
432  ((S) & CL_AMS_CSI_FLAG_TARGET_ALL) ? "TARGET_ALL" : \
433  "Unknown" )
434 
435 #define CL_AMS_STRING_CSI_TRAN_DESCR(S) \
436 ( ((S) == CL_AMS_CSI_NEW_ASSIGN) ? "NEW_ASSIGN" : \
437  ((S) == CL_AMS_CSI_QUIESCED) ? "CSI_QUIESCED" : \
438  ((S) == CL_AMS_CSI_NOT_QUIESCED) ? "CSI_NOT_QUIESCED" : \
439  ((S) == CL_AMS_CSI_STILL_ACTIVE) ? "CSI_STILL_ACTIVE" : \
440  "Unknown" )
441 
442 #define CL_AMS_STRING_ENTITY_TYPE(S) \
443 ( ((S) == CL_AMS_ENTITY_TYPE_ENTITY ) ? "entity" : \
444  ((S) == CL_AMS_ENTITY_TYPE_NODE) ? "node" : \
445  ((S) == CL_AMS_ENTITY_TYPE_SG) ? "sg" : \
446  ((S) == CL_AMS_ENTITY_TYPE_SU) ? "su" : \
447  ((S) == CL_AMS_ENTITY_TYPE_SI) ? "si" : \
448  ((S) == CL_AMS_ENTITY_TYPE_COMP) ? "comp" : \
449  ((S) == CL_AMS_ENTITY_TYPE_CSI) ? "csi" : \
450  ((S) == CL_AMS_ENTITY_TYPE_CLUSTER) ? "cluster" : \
451  "unknown" )
452 
453 #ifdef __cplusplus
454 }
455 #endif
456 
457 #endif /* _CL_AMS_UTILS_H_ */

Generated on Tue Jan 10 10:29:15 PST 2012 for OpenClovis SDK using Doxygen