Hi Hung,
Reviewed the patch.
Ack.
/Neel.
On Wednesday 06 April 2016 04:10 PM, Hung Nguyen wrote:
> osaf/libs/common/immsv/include/immutil.h | 6 ++++++
> osaf/tools/safimm/src/immutil.c | 15 +++++++++++++++
> samples/immsv/immutils/immutil.c | 15 +++++++++++++++
> samples/immsv/immutils/immutil.h | 6 ++++++
> 4 files changed, 42 insertions(+), 0 deletions(-)
>
>
> Add immutil for saImmOmCcbObjectRead().
>
> diff --git a/osaf/libs/common/immsv/include/immutil.h
> b/osaf/libs/common/immsv/include/immutil.h
> --- a/osaf/libs/common/immsv/include/immutil.h
> +++ b/osaf/libs/common/immsv/include/immutil.h
> @@ -685,6 +685,12 @@ extern SaAisErrorT immutil_getAttr(const
> const char
> *objectName);
>
> /**
> + * Wrapper for saImmOmCcbObjectRead
> + */
> + extern SaAisErrorT immutil_saImmOmCcbObjectRead(SaImmCcbHandleT
> ccbHandle, SaConstStringT objectName,
> +
> const SaImmAttrNameT *attributeNames,
> SaImmAttrValuesT_2 ***attributes);
> +
> +/**
> * Wrapper for saImmOmClassDescriptionGet_2
> */
> extern SaAisErrorT immutil_saImmOmClassDescriptionGet_2(SaImmHandleT
> immHandle,
> diff --git a/osaf/tools/safimm/src/immutil.c b/osaf/tools/safimm/src/immutil.c
> --- a/osaf/tools/safimm/src/immutil.c
> +++ b/osaf/tools/safimm/src/immutil.c
> @@ -1879,6 +1879,21 @@ SaAisErrorT immutil_saImmOmCcbObjectDele
> return rc;
> }
>
> +SaAisErrorT immutil_saImmOmCcbObjectRead(SaImmCcbHandleT ccbHandle,
> SaConstStringT objectName,
> +
> const SaImmAttrNameT *attributeNames, SaImmAttrValuesT_2 ***attributes) {
> + SaAisErrorT rc = saImmOmCcbObjectRead(ccbHandle, objectName,
> attributeNames, attributes);
> + unsigned int nTries = 1;
> + while (rc == SA_AIS_ERR_TRY_AGAIN && nTries <
> immutilWrapperProfile.nTries) {
> + usleep(immutilWrapperProfile.retryInterval * 1000);
> + rc = saImmOmCcbObjectRead(ccbHandle, objectName,
> attributeNames, attributes);
> + nTries++;
> + }
> + if (rc != SA_AIS_OK && rc != SA_AIS_ERR_NOT_EXIST
> + && immutilWrapperProfile.errorsAreFatal)
> + immutilError("saImmOmCcbObjectRead FAILED, rc = %d", (int) rc);
> + return rc;
> +}
> +
> SaAisErrorT immutil_saImmOmClassDescriptionGet_2(SaImmHandleT immHandle,
> const SaImmClassNameT
> className,
> SaImmClassCategoryT *
> classCategory,
> diff --git a/samples/immsv/immutils/immutil.c
> b/samples/immsv/immutils/immutil.c
> --- a/samples/immsv/immutils/immutil.c
> +++ b/samples/immsv/immutils/immutil.c
> @@ -1879,6 +1879,21 @@ SaAisErrorT immutil_saImmOmCcbObjectDele
> return rc;
> }
>
> +SaAisErrorT immutil_saImmOmCcbObjectRead(SaImmCcbHandleT ccbHandle,
> SaConstStringT objectName,
> +
> const SaImmAttrNameT *attributeNames, SaImmAttrValuesT_2 ***attributes) {
> + SaAisErrorT rc = saImmOmCcbObjectRead(ccbHandle, objectName,
> attributeNames, attributes);
> + unsigned int nTries = 1;
> + while (rc == SA_AIS_ERR_TRY_AGAIN && nTries <
> immutilWrapperProfile.nTries) {
> + usleep(immutilWrapperProfile.retryInterval * 1000);
> + rc = saImmOmCcbObjectRead(ccbHandle, objectName,
> attributeNames, attributes);
> + nTries++;
> + }
> + if (rc != SA_AIS_OK && rc != SA_AIS_ERR_NOT_EXIST
> + && immutilWrapperProfile.errorsAreFatal)
> + immutilError("saImmOmCcbObjectRead FAILED, rc = %d", (int) rc);
> + return rc;
> +}
> +
> SaAisErrorT immutil_saImmOmClassDescriptionGet_2(SaImmHandleT immHandle,
> const SaImmClassNameT
> className,
> SaImmClassCategoryT *
> classCategory,
> diff --git a/samples/immsv/immutils/immutil.h
> b/samples/immsv/immutils/immutil.h
> --- a/samples/immsv/immutils/immutil.h
> +++ b/samples/immsv/immutils/immutil.h
> @@ -685,6 +685,12 @@ extern SaAisErrorT immutil_getAttr(const
> const char
> *objectName);
>
> /**
> + * Wrapper for saImmOmCcbObjectRead
> + */
> + extern SaAisErrorT immutil_saImmOmCcbObjectRead(SaImmCcbHandleT
> ccbHandle, SaConstStringT objectName,
> +
> const SaImmAttrNameT *attributeNames,
> SaImmAttrValuesT_2 ***attributes);
> +
> +/**
> * Wrapper for saImmOmClassDescriptionGet_2
> */
> extern SaAisErrorT immutil_saImmOmClassDescriptionGet_2(SaImmHandleT
> immHandle,
------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel