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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
/* 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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
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);
}
void saImmOmClassDelete_2_01(void)
{
    const SaImmClassNameT className = (SaImmClassNameT) __FUNCTION__;
    SaImmAttrDefinitionT_2 attr1 =
        {"rdn", SA_IMM_ATTR_SANAMET, SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_RDN, NULL};
    const SaImmAttrDefinitionT_2 *attrDefinitions[] = {&attr1, NULL};

    safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
    safassert(saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_CONFIG, attrDefinitions), SA_AIS_OK);
    rc = saImmOmClassDelete(immOmHandle, className);
    test_validate(rc, SA_AIS_OK);
    safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
void saImmOiClassImplementerSet_01(void)
{
    SaImmOiImplementerNameT implementerName = (SaImmOiImplementerNameT) __FUNCTION__;
    safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
    safassert(config_class_create(immOmHandle), SA_AIS_OK);
    safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK);
    safassert(saImmOiImplementerSet(immOiHandle, implementerName), SA_AIS_OK);
    test_validate(saImmOiClassImplementerSet(immOiHandle, configClassName), SA_AIS_OK);
    safassert(saImmOiClassImplementerRelease(immOiHandle, configClassName), SA_AIS_OK);
    safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK);
    safassert(config_class_delete(immOmHandle), SA_AIS_OK);
    safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
void saImmOiClassImplementerSet_06(void)
{
    const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
    SaImmAdminOwnerHandleT ownerHandle;
    SaImmCcbHandleT ccbHandle;
    const SaNameT rdn = {strlen("Obj1"), "Obj1"};
    const SaNameT* nameValues[] = {&rdn};
    SaImmAttrValuesT_2 v2 = {"rdn",  SA_IMM_ATTR_SANAMET, 1, (void**)nameValues};
    SaUint32T  int1Value1 = 7;
    SaUint32T* int1Values[] = {&int1Value1};
    SaImmAttrValuesT_2 v1 = {"attr1", SA_IMM_ATTR_SAUINT32T, 1, (void**)int1Values};
    const SaImmAttrValuesT_2 * attrValues[] = {&v1, &v2, NULL};

    /* Test interference between saImmOiObjectImplementerSet and saImmOiClassImplementerSet */
    SaImmOiHandleT newhandle;
    SaImmOiImplementerNameT implementerName = (SaImmOiImplementerNameT) __FUNCTION__;
    SaImmOiImplementerNameT implementerName2 = (SaImmOiImplementerNameT) __FILE__;

    safassert(saImmOmInitialize(&immOmHandle, NULL, &immVersion), SA_AIS_OK);
    safassert(saImmOmAdminOwnerInitialize(immOmHandle, adminOwnerName, SA_TRUE, &ownerHandle), SA_AIS_OK);
    safassert(saImmOmCcbInitialize(ownerHandle, 0, &ccbHandle), SA_AIS_OK);
    safassert(config_class_create(immOmHandle), SA_AIS_OK);

    /* Create test object under root */
    safassert(saImmOmCcbObjectCreate_2(ccbHandle, "TestClassConfig", NULL, attrValues), SA_AIS_OK);
    safassert(saImmOmCcbApply(ccbHandle), SA_AIS_OK);

    safassert(saImmOiInitialize_2(&immOiHandle, &immOiCallbacks, &immVersion), SA_AIS_OK);
    safassert(saImmOiImplementerSet(immOiHandle, implementerName), SA_AIS_OK);

    safassert(saImmOiInitialize_2(&newhandle, &immOiCallbacks, &immVersion), SA_AIS_OK);
    safassert(saImmOiImplementerSet(newhandle, implementerName2), SA_AIS_OK);
    safassert(saImmOiObjectImplementerSet(newhandle, &rdn, SA_IMM_ONE), SA_AIS_OK);

    rc = saImmOiClassImplementerSet(immOiHandle, configClassName);

    /* Cleanup */
    safassert(saImmOiObjectImplementerRelease(newhandle, &rdn, SA_IMM_ONE), SA_AIS_OK);
    safassert(saImmOiImplementerClear(newhandle), SA_AIS_OK);
    safassert(saImmOiImplementerClear(immOiHandle), SA_AIS_OK);
    safassert(saImmOiFinalize(newhandle), SA_AIS_OK);
    safassert(saImmOiFinalize(immOiHandle), SA_AIS_OK);

    safassert(saImmOmCcbObjectDelete(ccbHandle, &rdn), SA_AIS_OK);
    safassert(saImmOmCcbApply(ccbHandle), SA_AIS_OK);
    safassert(saImmOmCcbFinalize(ccbHandle), SA_AIS_OK);

    safassert(config_class_delete(immOmHandle), SA_AIS_OK);
    safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
    test_validate(rc, SA_AIS_ERR_EXIST);
}
/* SA_AIS_ERR_NOT_EXIST */
void saImmOmCcbObjectModify_2_05(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};
    SaImmAttrValuesT_2 v2 = {"attr-not-exists", SA_IMM_ATTR_SAUINT32T, 1, (void**)int1Values};
    SaImmAttrModificationT_2 attrMod1 = {SA_IMM_ATTR_VALUES_REPLACE, v1};
    const SaImmAttrModificationT_2 *attrMods1[] = {&attrMod1, NULL};
    SaImmAttrModificationT_2 attrMod2 = {SA_IMM_ATTR_VALUES_REPLACE, v2};
    const SaImmAttrModificationT_2 *attrMods2[] = {&attrMod2, 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(saImmOmCcbInitialize(ownerHandle, SA_IMM_CCB_REGISTERED_OI, &ccbHandle), SA_AIS_OK);

    /*                                                              
    ** The name to which the objectName parameter points is not the name of an
    ** existing object.                                                                
    */
    if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj2, attrMods1)) != SA_AIS_ERR_NOT_EXIST)
        goto done;

    /*                                                              
    ** One or more attribute names specified by the attrMods parameter are not valid
    ** for the object class.                                                                
    */
    if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods2)) != SA_AIS_ERR_NOT_EXIST)
        goto done;

    /*                                                              
    ** There is no registered Object Implementer for the object designated by the name
    ** to which the objectName parameter points, and the CCB has been initialized
    ** with the SA_IMM_CCB_REGISTERED_OI flag set.
    */
    if ((rc = saImmOmCcbObjectModify_2(ccbHandle, &dnObj1, attrMods1)) != SA_AIS_ERR_NOT_EXIST)
        goto done;

done:
    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);
    test_validate(rc, SA_AIS_ERR_NOT_EXIST);
}
void saImmOmSearchInitialize_2_08(void)
{
    SaImmSearchHandleT searchHandle;
    int count=0;

    safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
    do {
	    rc = saImmOmSearchInitialize_2(immOmHandle, NULL, SA_IMM_SUBLEVEL,
		    SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_NO_ATTR, NULL, NULL, &searchHandle);
	    ++count;
    } while (rc == SA_AIS_OK);
    count--; //last one failed
    test_validate(rc, SA_AIS_ERR_NO_RESOURCES);
    safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
Ejemplo n.º 26
0
static PyObject *
immom_saImmOmInitialize(PyObject *self, PyObject *args)
{
    SaAisErrorT rc;
    SaVersionT immVer;

    if (immOmHandle) {
        /* Already Initialized */
        return immom_aisException(SA_AIS_ERR_BAD_OPERATION);
    }
    immVer = immVersion;
    rc = saImmOmInitialize(&immOmHandle, NULL, /*in-out*/&immVer);
    if (rc != SA_AIS_OK) return immom_aisException(rc);
    Py_RETURN_NONE;
}
static void setup(SaImmAdminOwnerNameT admoName)
{
    SaAisErrorT err = SA_AIS_OK;

    SaImmAttrDefinitionT_2 d1 = 
        { "safComp", SA_IMM_ATTR_SANAMET, 
          SA_IMM_ATTR_CONFIG | SA_IMM_ATTR_RDN | SA_IMM_ATTR_INITIALIZED,
          NULL };

    SaImmAttrDefinitionT_2 d2 =
        { "saAmfCompRestartCount", SA_IMM_ATTR_SAINT32T, 
          SA_IMM_ATTR_RUNTIME, NULL };

    /* Note class description not the complete standard class! 
       If the standard class exists we use it, if not we temporarily install
       this dummy class.
    */

    const SaImmAttrDefinitionT_2* attrDefs[4] = {&d1, &d2, 0};


     SaImmAttrValuesT_2 v1=
       { "safComp",  SA_IMM_ATTR_SANAMET, 1, (void**)nameValues };
     
     const SaImmAttrValuesT_2* attrValues[2] = {&v1, 0};


    safassert(saImmOmInitialize(&localImmHandle, NULL, &immVersion), SA_AIS_OK);

    err = saImmOmClassCreate_2(localImmHandle, className, SA_IMM_CLASS_CONFIG, attrDefs);
    if(err == SA_AIS_OK) 
    {
        classCreated = SA_TRUE;
    } else if(err == SA_AIS_ERR_EXIST)
    {
        err = SA_AIS_OK;
    }

    safassert(err, SA_AIS_OK);

    /* Create the test object */

    safassert(saImmOmAdminOwnerInitialize(localImmHandle, admoName, SA_TRUE, &localOwnerHandle), SA_AIS_OK);
    safassert(saImmOmCcbInitialize(localOwnerHandle, 0LL, &localCcbHandle), SA_AIS_OK);
    safassert(saImmOmCcbObjectCreate_2(localCcbHandle, className, NULL, attrValues), SA_AIS_OK);
    safassert(saImmOmCcbApply(localCcbHandle), SA_AIS_OK);
    sleep(1);
}
void saImmOmClassDescriptionGet_2_02(void)
{
    const SaImmClassNameT className = (SaImmClassNameT) __FUNCTION__;
    SaImmAttrDefinitionT_2 attr1 =
        {"rdn", SA_IMM_ATTR_SANAMET, SA_IMM_ATTR_RUNTIME | SA_IMM_ATTR_RDN | SA_IMM_ATTR_CACHED, NULL};
    const SaImmAttrDefinitionT_2 *attrDefinitionsIn[] = {&attr1, NULL};
    SaImmClassCategoryT classCategory;
    SaImmAttrDefinitionT_2** attrDefinitionsOut;

    safassert(saImmOmInitialize(&immOmHandle, &immOmCallbacks, &immVersion), SA_AIS_OK);
    safassert(saImmOmClassCreate_2(immOmHandle, className, SA_IMM_CLASS_RUNTIME, attrDefinitionsIn), SA_AIS_OK);
    rc = saImmOmClassDescriptionGet_2(-1, className, &classCategory, &attrDefinitionsOut);
    test_validate(rc, SA_AIS_ERR_BAD_HANDLE);
    safassert(saImmOmClassDelete(immOmHandle, className), SA_AIS_OK);
    safassert(saImmOmFinalize(immOmHandle), SA_AIS_OK);
}
void saImmOmCcbObjectModify_2_12(void)
{
    const SaImmAdminOwnerNameT adminOwnerName = (SaImmAdminOwnerNameT) __FUNCTION__;
    SaImmAdminOwnerHandleT ownerHandle;
    SaImmCcbHandleT ccbHandle;
    SaImmAccessorHandleT accessorHandle;
    const SaNameT *objectNames[] = {&rootObj, NULL};
    SaStringT strValue = "";
    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};
    const SaImmAttrNameT attributeNames[2] = { "attr4", NULL };
    SaImmAttrValuesT_2 **attributes;
    SaStringT str;

    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);
    safassert(saImmOmCcbApply(ccbHandle), SA_AIS_OK);

    safassert(saImmOmAccessorInitialize(immOmHandle, &accessorHandle), SA_AIS_OK);
    safassert(saImmOmAccessorGet_2(accessorHandle, &dnObj1, attributeNames, &attributes), SA_AIS_OK);

    assert(attributes);
    assert(attributes[0]);

    assert(attributes[0]->attrValuesNumber == 1);
    str = *(SaStringT *)attributes[0]->attrValues[0];

    assert(str);
    assert(strlen(str) == 0);

    safassert(saImmOmAccessorFinalize(accessorHandle), SA_AIS_OK);

    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);
}
Ejemplo n.º 30
0
static void saImmOmLongDn_06(void) {
	SaImmHandleT immHandle;
	SaImmSearchHandleT searchHandle;
	SaAisErrorT rc;
	SaNameT dn;
	SaImmSearchParametersT_2 searchParam;
	SaNameT objectName;
	SaImmAttrValuesT_2 **attributes;
	int i;

	osaf_extended_name_lend(longDn, &dn);
	searchParam.searchOneAttr.attrName = "attr8";
	searchParam.searchOneAttr.attrValueType = SA_IMM_ATTR_SANAMET;
	searchParam.searchOneAttr.attrValue = &dn;

	setupLongDn();

	safassert(saImmOmInitialize(&immHandle, NULL, &immVersion), SA_AIS_OK);

	safassert(saImmOmSearchInitialize_2(immHandle, NULL, SA_IMM_SUBTREE,
			SA_IMM_SEARCH_ONE_ATTR | SA_IMM_SEARCH_GET_ALL_ATTR, &searchParam,
			NULL, &searchHandle), SA_AIS_OK);
	rc = saImmOmSearchNext_2(searchHandle, &objectName, &attributes);
	if(rc == SA_AIS_OK) {
		assert(strcmp(osaf_extended_name_borrow(&objectName), longDn) == 0);
		for(i=0; attributes[i]; i++) {
			if(!strcmp(attributes[i]->attrName, "attr8")) {
				// Must have at least one value
				assert(attributes[i]->attrValuesNumber > 0);
				// Check attribute value
				assert(strcmp(osaf_extended_name_borrow((SaNameT *)(attributes[i]->attrValues[0])), longDn) == 0);
				break;
			}
		}
		// SaNameT attribute is missing
		assert(attributes != NULL);
	}
	safassert(saImmOmSearchFinalize(searchHandle), SA_AIS_OK);

	safassert(saImmOmFinalize(immHandle), SA_AIS_OK);

	test_validate(rc, SA_AIS_OK);

	cleanLongDn();
}