本文整理汇总了C++中saImmOmInitialize函数的典型用法代码示例。如果您正苦于以下问题:C++ saImmOmInitialize函数的具体用法?C++ saImmOmInitialize怎么用?C++ saImmOmInitialize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了saImmOmInitialize函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: saImmOmCcbObjectDelete_02
void saImmOmCcbObjectDelete_02(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT *objectNames[] = {&parentName, NULL};
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_class_create(immOmHandle), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &parentName), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
/* invalid ccbHandle */
if ((rc = saImmOmCcbObjectDelete(-1, &dnObj1)) != SA_AIS_ERR_BAD_HANDLE)
goto done;
/* already finalized ccbHandle */
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
rc = saImmOmCcbObjectDelete(ccbHandle, &dnObj1);
done:
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(config_class_delete(immOmHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:30,代码来源:test_saImmOmCcbObjectDelete.c
示例2: saImmOmCcbObjectModify_2_11
void saImmOmCcbObjectModify_2_11(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT *objectNames[] = {&rootObj, NULL};
SaStringT strValue = "Sch\001\002ne";
SaStringT* strValues[] = {&strValue};
SaImmAttrValuesT_2 v1 = {"attr4", SA_IMM_ATTR_SASTRINGT, 1, (void**)strValues};
SaImmAttrModificationT_2 attrMod = {SA_IMM_ATTR_VALUES_REPLACE, v1};
const SaImmAttrModificationT_2 *attrMods[] = {&attrMod, NULL};
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods), SA_AIS_OK);
test_validate(saImmOmCcbApply(ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:27,代码来源:test_saImmOmCcbObjectModify_2.c
示例3: setupLongDn
static void setupLongDn(void) {
SaImmHandleT immHandle;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
SaNameT dn;
const SaImmAdminOwnerNameT ownerName = (const SaImmAdminOwnerNameT)__FUNCTION__;
SaImmAttrValueT attrValues[1] = { &dn };
SaImmAttrModificationT_2 attrMod = { SA_IMM_ATTR_VALUES_REPLACE,
{ "attr8", SA_IMM_ATTR_SANAMET, 1, attrValues }};
const SaImmAttrModificationT_2 *attrMods[2] = { &attrMod, NULL };
osaf_extended_name_lend(longDn, &dn);
safassert(saImmOmInitialize(&immHandle, NULL, &immVersion), SA_AIS_OK);
config_class_create(immHandle);
safassert(saImmOmAdminOwnerInitialize(immHandle, ownerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(object_create(immHandle, ownerHandle, configClassName, &dn, NULL, NULL), SA_AIS_OK);
// Change SaNameT attribute for testing
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbObjectModify_2(ccbHandle, &dn, attrMods), SA_AIS_OK);
safassert(saImmOmCcbApply(ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immHandle), SA_AIS_OK);
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:28,代码来源:test_saImmOmLongDn.c
示例4: saImmOmCcbObjectModify_2_14
void saImmOmCcbObjectModify_2_14(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT *objectNames[] = {&rootObj, NULL};
SaAnyT anyValue = { 0, (SaUint8T *)"" };
SaAnyT* anyValues[] = { &anyValue, &anyValue, &anyValue };
SaImmAttrValuesT_2 any5 = {"attr5", SA_IMM_ATTR_SAANYT, 1, (void **)anyValues};
SaImmAttrValuesT_2 any6 = {"attr6", SA_IMM_ATTR_SAANYT, 3, (void **)anyValues};
SaImmAttrValuesT_2 any7 = {"attr7", SA_IMM_ATTR_SAANYT, 3, (void **)anyValues};
SaImmAttrModificationT_2 attrMod5 = {SA_IMM_ATTR_VALUES_REPLACE, any5};
SaImmAttrModificationT_2 attrMod6 = {SA_IMM_ATTR_VALUES_REPLACE, any6};
SaImmAttrModificationT_2 attrMod7 = {SA_IMM_ATTR_VALUES_REPLACE, any7};
const SaImmAttrModificationT_2 *attrMods[] = {&attrMod5, &attrMod6, &attrMod7, NULL};
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods), SA_AIS_ERR_INVALID_PARAM);
/* If we come here, then the test is successful */
test_validate(SA_AIS_OK, SA_AIS_OK);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:33,代码来源:test_saImmOmCcbObjectModify_2.c
示例5: saImmOmLongDn_05
static void saImmOmLongDn_05(void) {
SaImmHandleT immHandle;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
SaAisErrorT rc;
SaNameT dn;
const SaImmAdminOwnerNameT ownerName = (const SaImmAdminOwnerNameT)__FUNCTION__;
safassert(saImmOmInitialize(&immHandle, NULL, &immVersion), SA_AIS_OK);
config_class_create(immHandle);
safassert(saImmOmAdminOwnerInitialize(immHandle, ownerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
osaf_extended_name_lend(longDn, &dn);
safassert(object_create(immHandle, ownerHandle, configClassName, &dn, NULL, NULL), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
rc = saImmOmCcbObjectDelete(ccbHandle, &dn);
saImmOmCcbApply(ccbHandle);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
config_class_delete(immHandle);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:30,代码来源:test_saImmOmLongDn.c
示例6: saImmOmCcbObjectModify_2_18
void saImmOmCcbObjectModify_2_18(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT obj1 = { strlen("id=1"), "id=1" };
const SaNameT obj2 = { strlen("id=2"), "id=2" };
const SaNameT* attrValues[] = { &obj1 };
SaImmAttrValuesT_2 v1 = { "attr1", SA_IMM_ATTR_SANAMET, 1, (void**)attrValues };
SaImmAttrModificationT_2 attrMod = { SA_IMM_ATTR_VALUES_REPLACE, v1 };
const SaImmAttrModificationT_2 *attrMods[] = { &attrMod, NULL };
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(nodangling_class_create(immOmHandle), SA_AIS_OK);
safassert(object_create(immOmHandle, ownerHandle, nodanglingClassName, &obj1, NULL, NULL), SA_AIS_OK);
safassert(object_create(immOmHandle, ownerHandle, nodanglingClassName, &obj2, NULL, NULL), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(object_delete_2(ccbHandle, &obj1, 1), SA_AIS_OK);
rc = saImmOmCcbObjectModify_2(ccbHandle, &obj2, attrMods);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
safassert(object_delete(ownerHandle, &obj2, 1), SA_AIS_OK);
safassert(object_delete(ownerHandle, &obj1, 1), SA_AIS_OK);
safassert(nodangling_class_delete(immOmHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_OPERATION);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:31,代码来源:test_saImmOmCcbObjectModify_2.c
示例7: saImmOmCcbObjectModify_2_02
void saImmOmCcbObjectModify_2_02(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT *objectNames[] = {&rootObj, NULL};
SaUint32T int1Value1 = __LINE__;
SaUint32T* int1Values[] = {&int1Value1};
SaImmAttrValuesT_2 v1 = {"attr1", SA_IMM_ATTR_SAUINT32T, 1, (void**)int1Values};
SaImmAttrModificationT_2 attrMod = {SA_IMM_ATTR_VALUES_REPLACE, v1};
const SaImmAttrModificationT_2 *attrMods[] = {&attrMod, NULL};
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK);
/* invalid handle */
if ((rc = saImmOmCcbObjectModify_2(-1, &dnObj1, attrMods)) != SA_AIS_ERR_BAD_HANDLE)
goto done;
/* already finalized handle */
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods);
done:
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:33,代码来源:test_saImmOmCcbObjectModify_2.c
示例8: saImmOmLongDn_03
static void saImmOmLongDn_03(void) {
SaImmHandleT immHandle;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
SaAisErrorT rc;
SaNameT dn;
const SaImmAdminOwnerNameT ownerName = (const SaImmAdminOwnerNameT)__FUNCTION__;
SaImmAttrValueT rdnVal[1] = { (SaImmAttrValueT)&dn };
SaImmAttrValuesT_2 attrValue = { "rdn", SA_IMM_ATTR_SANAMET, 1, rdnVal };
const SaImmAttrValuesT_2 *attrValues[2] = { &attrValue, NULL };
safassert(saImmOmInitialize(&immHandle, NULL, &immVersion), SA_AIS_OK);
config_class_create(immHandle);
osaf_extended_name_lend(longDn, &dn);
safassert(saImmOmAdminOwnerInitialize(immHandle, ownerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
rc = saImmOmCcbObjectCreate_2(ccbHandle, configClassName, NULL, attrValues);
saImmOmCcbApply(ccbHandle);
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
safassert(object_delete(ownerHandle, &dn, 1), SA_AIS_OK);
config_class_delete(immHandle);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_OK);
}
开发者ID:indonexia2004,项目名称:opensaf-indo,代码行数:32,代码来源:test_saImmOmLongDn.c
示例9: saImmOmSearchInitialize_2_10
void saImmOmSearchInitialize_2_10(void)
{
SaImmSearchHandleT searchHandle;
char *value;
char *env;
int i;
env = value = getenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE");
if(!value)
value = "100";
setenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE", "200", 1); /* Increase number of open search handles to 200 */
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
setenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE", value, 1); /* Reset to default value */
if(!env)
unsetenv("IMMA_MAX_OPEN_SEARCHES_PER_HANDLE");
for(i=0; i<200; i++)
safassert(saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_SUBTREE,
SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle), SA_AIS_OK);
rc = saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_SUBTREE, /* Test maxSearchHandle + 1 */
SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle);
test_validate(rc, SA_AIS_ERR_NO_RESOURCES);
safassert(saImmOmSearchFinalize(searchHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:27,代码来源:test_saImmOmSearchInitialize_2.c
示例10: saImmOmAdminOwnerFinalize_03
void saImmOmAdminOwnerFinalize_03(void)
{
/* test release on finalize after someone else has done clear and set */
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
const SaImmAdminOwnerNameT adminOwnerName2 = (SaImmAdminOwnerNameT) "RudeGuyAdminOwner";
SaImmAdminOwnerHandleT ownerHandle;
SaImmAdminOwnerHandleT rudeGuyHandle;
const SaNameT *objectNames[] = {&rootObj, NULL};
/* setup */
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
/* rude guy interferes */
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName2, SA_TRUE, &rudeGuyHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerClear(immOmHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(rudeGuyHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
/* Now test finalizing the original users handle. */
test_validate(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
/* Cleanup */
safassert(saImmOmAdminOwnerFinalize(rudeGuyHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:26,代码来源:test_saImmOmAdminOwnerFinalize.c
示例11: saImmOmCcbFinalize_02
void saImmOmCcbFinalize_02(void)
{
const SaImmAdminOwnerNameT adminOwnerName =
(SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT parentName = {strlen("opensafImm=opensafImm,safApp=safImmService"), "opensafImm=opensafImm,safApp=safImmService"};
const SaNameT *objectNames[] = {&parentName, NULL};
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion),
SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName,
SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE),
SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
/* invalid handle */
if ((rc = saImmOmCcbFinalize(-1)) != SA_AIS_ERR_BAD_HANDLE)
goto done;
/* already finalized handle */
safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);
rc = saImmOmCcbFinalize(ccbHandle);
done:
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:30,代码来源:test_saImmOmCcbFinalize.c
示例12: saImmOmCcbObjectDelete_05
void saImmOmCcbObjectDelete_05(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle1;
SaImmCcbHandleT ccbHandle2;
const SaNameT *objectNames[] = {&parentName, NULL};
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_class_create(immOmHandle), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &parentName), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle1), SA_AIS_OK);
safassert(saImmOmCcbObjectDelete(ccbHandle1, &dnObj1), SA_AIS_OK);
/*
** At least one of the targeted objects is already the target of an
** administrative operation or of a change request in another CCB.
*/
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle2), SA_AIS_OK);
rc = saImmOmCcbObjectDelete(ccbHandle2, &dnObj1);
safassert(saImmOmCcbFinalize(ccbHandle1), SA_AIS_OK);
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(config_class_delete(immOmHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_BUSY);
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:31,代码来源:test_saImmOmCcbObjectDelete.c
示例13: saImmOmCcbObjectModify_2_03
/* SA_AIS_ERR_INVALID_PARAM */
void saImmOmCcbObjectModify_2_03(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
SaImmCcbHandleT ccbHandle;
const SaNameT *objectNames[] = {&rootObj, NULL};
SaUint32T int1Value1 = __LINE__;
SaUint32T* int1Values[] = {&int1Value1};
const SaNameT rdn = {sizeof("Obj2"), "Obj2"};
const SaNameT* nameValues[] = {&rdn, NULL};
SaImmAttrValuesT_2 v1 = {"attr2", SA_IMM_ATTR_SAUINT32T, 1, (void**)int1Values};
SaImmAttrValuesT_2 v3 = {"attr1", SA_IMM_ATTR_SAINT32T, 1, (void**)int1Values};
SaImmAttrValuesT_2 v4 = {"rdn", SA_IMM_ATTR_SANAMET, 1, (void**)nameValues};
SaImmAttrModificationT_2 attrMod1 = {SA_IMM_ATTR_VALUES_REPLACE, v1};
const SaImmAttrModificationT_2 *attrMods1[] = {&attrMod1, NULL};
SaImmAttrModificationT_2 attrMod3 = {SA_IMM_ATTR_VALUES_REPLACE, v3};
const SaImmAttrModificationT_2 *attrMods3[] = {&attrMod3, NULL};
SaImmAttrModificationT_2 attrMod4 = {SA_IMM_ATTR_VALUES_REPLACE, v4};
const SaImmAttrModificationT_2 *attrMods4[] = {&attrMod4, NULL};
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, objectNames, SA_IMM_ONE), SA_AIS_OK);
safassert(config_object_create(immOmHandle, ownerHandle, &rootObj), SA_AIS_OK);
safassert(saImmOmAdminOwnerSet(ownerHandle, dnObjs, SA_IMM_ONE), SA_AIS_OK);
safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
/* runtime attributes */
if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods1)) != SA_AIS_ERR_INVALID_PARAM)
goto done;
#if 0
A.02.01 spec bug. Fixed in A.03.01
/* attributes that are not defined for the specified class */
if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods2)) != SA_AIS_ERR_INVALID_PARAM)
goto done;
#endif
/* attributes with values that do not match the defined value type for the attribute */
if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods3)) != SA_AIS_ERR_INVALID_PARAM)
goto done;
/* a new value for the RDN attribute */
if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods4)) != SA_AIS_ERR_INVALID_PARAM)
goto done;
/* attributes that cannot be modified */
/* multiple values or additional values for a single-valued attribute */
done:
safassert(config_object_delete(immOmHandle, ownerHandle), SA_AIS_OK);
safassert(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:59,代码来源:test_saImmOmCcbObjectModify_2.c
示例14: saImmOmClassDelete_2_04
void saImmOmClassDelete_2_04(void)
{
const SaImmClassNameT className = (SaImmClassNameT) ""; /* The empty classname */
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
rc = saImmOmClassDelete(immOmHandle, className);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:9,代码来源:test_saImmOmClassDelete.c
示例15: saImmOmClassDelete_2_03
void saImmOmClassDelete_2_03(void)
{
const SaImmClassNameT className = (SaImmClassNameT) __FUNCTION__;
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
rc = saImmOmClassDelete(immOmHandle, className);
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:9,代码来源:test_saImmOmClassDelete.c
示例16: saImmOmAdminOwnerFinalize_01
void saImmOmAdminOwnerFinalize_01(void)
{
const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
SaImmAdminOwnerHandleT ownerHandle;
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
test_validate(saImmOmAdminOwnerFinalize(ownerHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:10,代码来源:test_saImmOmAdminOwnerFinalize.c
示例17: saImmOmSearchInitialize_2_04
void saImmOmSearchInitialize_2_04(void)
{
SaImmSearchHandleT searchHandle;
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
rc = saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_ONE,
SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle);
test_validate(rc, SA_AIS_ERR_INVALID_PARAM);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:10,代码来源:test_saImmOmSearchInitialize_2.c
示例18: saImmOmSearchInitialize_2_02
void saImmOmSearchInitialize_2_02(void)
{
SaImmSearchHandleT searchHandle;
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
rc = saImmOmSearchInitialize_2(-1, NULL, SA_IMM_SUBTREE,
SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle);
test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:helioloureiro,项目名称:opensaf-fork,代码行数:10,代码来源:test_saImmOmSearchInitialize_2.c
示例19: saImmOmClassDescriptionGet_2_03
void saImmOmClassDescriptionGet_2_03(void)
{
const SaImmClassNameT className = (SaImmClassNameT) __FUNCTION__;
SaImmClassCategoryT classCategory;
SaImmAttrDefinitionT_2** attrDefinitionsOut;
safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
rc = saImmOmClassDescriptionGet_2(immOmHandle, className, &classCategory, &attrDefinitionsOut);
test_validate(rc, SA_AIS_ERR_NOT_EXIST);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:11,代码来源:test_saImmOmClassDescriptionGet_2.c
示例20: saImmOiClassImplementerSet_03
void saImmOiClassImplementerSet_03(void)
{
SaImmOiImplementerNameT implementerName = (SaImmOiImplementerNameT) __FUNCTION__;
safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK);
safassert(saImmOiImplementerSet(immOiHandle, implementerName), SA_AIS_OK);
safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
safassert(runtime_class_create(immOmHandle), SA_AIS_OK);
test_validate(saImmOiClassImplementerSet(immOiHandle, runtimeClassName), SA_AIS_ERR_BAD_OPERATION);
safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK);
safassert(runtime_class_delete(immOmHandle), SA_AIS_OK);
safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
开发者ID:kenzaburo,项目名称:OpenSaf-FrameWork,代码行数:13,代码来源:test_saImmOiClassImplementerSet.c
注:本文中的saImmOmInitialize函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论