Comments inline.

On 09/18/2015 09:11 AM, Hung Nguyen wrote:
>   opensaf.spec.in                               |   1 +
>   osaf/libs/agents/saf/imma/imma_cb.h           |   1 +
>   osaf/libs/agents/saf/imma/imma_def.h          |   2 +-
>   osaf/libs/agents/saf/imma/imma_oi_api.c       |   3 +
>   osaf/libs/agents/saf/imma/imma_om_api.c       |  12 ++++
>   osaf/libs/common/immsv/immpbe_dump.cc         |   3 +-
>   osaf/libs/common/immsv/include/immpbe_dump.hh |   2 +-
>   osaf/libs/saf/include/Makefile.am             |   3 +-
>   osaf/libs/saf/include/saImmOm_A_2_15.h        |   2 +
>   osaf/libs/saf/include/saImmOm_A_2_16.h        |  67 
> +++++++++++++++++++++++++++
>   10 files changed, 92 insertions(+), 4 deletions(-)
>
>
> SA_IMM_ATTR_DEFAULT_REMOVED flag is supported in version A.02.16 or higher.
>
> diff --git a/opensaf.spec.in b/opensaf.spec.in
> --- a/opensaf.spec.in
> +++ b/opensaf.spec.in
> @@ -1473,6 +1473,7 @@ fi
>   %{_includedir}/saImmOm_A_2_14.h
>   %{_includedir}/saImmOi_A_2_15.h
>   %{_includedir}/saImmOm_A_2_15.h
> +%{_includedir}/saImmOm_A_2_16.h
>   
>   #TODO: Is it going out of the main opensaf repo?
>   %files samples
> diff --git a/osaf/libs/agents/saf/imma/imma_cb.h 
> b/osaf/libs/agents/saf/imma/imma_cb.h
> --- a/osaf/libs/agents/saf/imma/imma_cb.h
> +++ b/osaf/libs/agents/saf/imma/imma_cb.h
> @@ -64,6 +64,7 @@ typedef struct imma_client_node {
>       bool isImmA2e;       /* Version A.02.14 */
>       bool isImmA2f;       /* Version A.02.15 */
>       bool isImmA2fCbk;    /* Version A.02.15 callback*/
> +     bool isImmA216;      /* Version A.02.16 */
Lets stick to the precedent hex local naming here, removing ambiguity by 
prefixing with 'x':

                bool isImmA2x10    /* Version A.02.16 */

Reason is both continuity with the preceding pattern and the leading '2' 
before '16' resulting in '216' makes it confusing.
>       bool isApplier; /* True => This is an Applier-OI */
>       bool isAug;     /* True => handle internal to OI augmented CCB */
>       bool isBusy;    /* True => handle is locked by a thread until a 
> function execution is done */
> diff --git a/osaf/libs/agents/saf/imma/imma_def.h 
> b/osaf/libs/agents/saf/imma/imma_def.h
> --- a/osaf/libs/agents/saf/imma/imma_def.h
> +++ b/osaf/libs/agents/saf/imma/imma_def.h
> @@ -22,7 +22,7 @@
>   /* Macros for Validating Version */
>   #define IMMA_RELEASE_CODE 'A'
>   #define IMMA_MAJOR_VERSION 0x02
> -#define IMMA_MINOR_VERSION 0x0f
> +#define IMMA_MINOR_VERSION 0x10
>   
>   #define IMMSV_WAIT_TIME  1000 /* Default MDS wait time in 10ms units =>10 
> sec*/
>   
> diff --git a/osaf/libs/agents/saf/imma/imma_oi_api.c 
> b/osaf/libs/agents/saf/imma/imma_oi_api.c
> --- a/osaf/libs/agents/saf/imma/imma_oi_api.c
> +++ b/osaf/libs/agents/saf/imma/imma_oi_api.c
> @@ -170,6 +170,9 @@ SaAisErrorT initialize_common(SaImmOiHan
>                                       cl_node->isImmA2e = true;
>                                       if(requested_version.minorVersion >= 
> 0x0f) {
>                                               cl_node->isImmA2f = true;
> +                                             if 
> (requested_version.minorVersion >= 0x10) {
> +                                                     cl_node->isImmA216 = 
> true;
cl_node->isImmA2x10 = true;
> +                                             }
>                                       }
>                               }
>                       }
> diff --git a/osaf/libs/agents/saf/imma/imma_om_api.c 
> b/osaf/libs/agents/saf/imma/imma_om_api.c
> --- a/osaf/libs/agents/saf/imma/imma_om_api.c
> +++ b/osaf/libs/agents/saf/imma/imma_om_api.c
> @@ -132,6 +132,9 @@ SaAisErrorT saImmOmInitialize_o2(SaImmHa
>                       cl_node->isImmA2e = true;
>                       if(requested_version.minorVersion >= 0x0f) {
>                               cl_node->isImmA2f = true;
> +                             if (requested_version.minorVersion >= 0x10) {
> +                                     cl_node->isImmA216 = true;
cl_node->isImmA2x10 = true;
> +                             }
>                       }
>               }
>       }
> @@ -186,6 +189,9 @@ SaAisErrorT saImmOmInitialize(SaImmHandl
>                                       cl_node->isImmA2e = true;
>                                       if(requested_version.minorVersion >= 
> 0x0f) {
>                                               cl_node->isImmA2f = true;
> +                                             if 
> (requested_version.minorVersion >= 0x10) {
> +                                                     cl_node->isImmA216 = 
> true;
cl_node->isImmA2x10 = true;

> +                                             }
>                                       }
>                               }
>                       }
> @@ -4754,6 +4760,12 @@ SaAisErrorT saImmOmClassCreate_2(SaImmHa
>                       goto mds_send_fail;
>               }
>   
> +             if ((attr->attrFlags & SA_IMM_ATTR_DEFAULT_REMOVED) && 
> !(cl_node->isImmA216)) {
> +                     TRACE_2("SA_IMM_ATTR_DEFAULT_REMOVED flag is supported 
> in version A.02.16 or higher");
> +                     rc = SA_AIS_ERR_VERSION;
> +                     goto mds_send_fail;
> +             }
> +
>               IMMSV_ATTR_DEF_LIST *p =        /*alloc-2 */
>                   malloc(sizeof(IMMSV_ATTR_DEF_LIST));
>               memset(p, 0, sizeof(IMMSV_ATTR_DEF_LIST));
> diff --git a/osaf/libs/common/immsv/immpbe_dump.cc 
> b/osaf/libs/common/immsv/immpbe_dump.cc
> --- a/osaf/libs/common/immsv/immpbe_dump.cc
> +++ b/osaf/libs/common/immsv/immpbe_dump.cc
> @@ -3236,7 +3236,8 @@ static int pbeAuditAttributeFlags(sqlite
>                                               | SA_IMM_ATTR_NO_DUPLICATES
>                                               | SA_IMM_ATTR_NOTIFY
>                                               | SA_IMM_ATTR_NO_DANGLING
> -                                             | SA_IMM_ATTR_DN;
> +                                             | SA_IMM_ATTR_DN
> +                                             | SA_IMM_ATTR_DEFAULT_REMOVED;
>       const char *sql = "select class_name, attr_name, attr_flags "
>                       "from attr_def, classes "
>                       "where (attr_flags & ~%lu) != 0 "
> diff --git a/osaf/libs/common/immsv/include/immpbe_dump.hh 
> b/osaf/libs/common/immsv/include/immpbe_dump.hh
> --- a/osaf/libs/common/immsv/include/immpbe_dump.hh
> +++ b/osaf/libs/common/immsv/include/immpbe_dump.hh
> @@ -31,7 +31,7 @@
>   
>   #define RELEASE_CODE 'A'
>   #define MAJOR_VERSION 2
> -#define MINOR_VERSION 15
> +#define MINOR_VERSION 16
>   
>   /* Prototypes */
>   typedef std::map<std::string, SaImmAttrFlagsT> AttrMap;
> diff --git a/osaf/libs/saf/include/Makefile.am 
> b/osaf/libs/saf/include/Makefile.am
> --- a/osaf/libs/saf/include/Makefile.am
> +++ b/osaf/libs/saf/include/Makefile.am
> @@ -41,6 +41,7 @@ include_HEADERS = \
>       saImmOm_A_2_13.h \
>       saImmOm_A_2_14.h \
>       saImmOi_A_2_15.h \
> -     saImmOm_A_2_15.h
> +     saImmOm_A_2_15.h \
> +     saImmOm_A_2_16.h
>   
>   
> diff --git a/osaf/libs/saf/include/saImmOm_A_2_15.h 
> b/osaf/libs/saf/include/saImmOm_A_2_15.h
> --- a/osaf/libs/saf/include/saImmOm_A_2_15.h
> +++ b/osaf/libs/saf/include/saImmOm_A_2_15.h
> @@ -165,4 +165,6 @@ extern "C" {
>   }
>   #endif
>   
> +#include <saImmOm_A_2_16.h>
> +
>   #endif   /* _SA_IMM_OM_A_2_15_H */
> diff --git a/osaf/libs/saf/include/saImmOm_A_2_16.h 
> b/osaf/libs/saf/include/saImmOm_A_2_16.h
> new file mode 100644
> --- /dev/null
> +++ b/osaf/libs/saf/include/saImmOm_A_2_16.h
> @@ -0,0 +1,67 @@
> +/*      -*- OpenSAF  -*-
> + *
> + * (C) Copyright 2015 The OpenSAF Foundation
> + *
> + * This program is distributed in the hope that it will be useful, but
> + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
> + * or FITNESS FOR A PARTICULAR PURPOSE. This file and program are licensed
> + * under the GNU Lesser General Public License Version 2.1, February 1999.
> + * The complete license can be accessed from the following location:
> + * http://opensource.org/licenses/lgpl-license.php
> + * See the Copying file included with the OpenSAF distribution for full
> + * licensing terms.
> + *
> + * Author(s): Ericsson AB
> + */
> +
> +/*
> + * DESCRIPTION:
> + *   This file provides the suggested additions to the C language binding for
> + *   the Service Availability(TM) Forum Information Model Management Service 
> (IMM).
> + *   It contains only the prototypes and type definitions that are part of 
> this
> + *   proposed addition.
> + *   These additions are currently NON STANDARD. But the intention is to get 
> these
> + *   additions approved formally by SAF in the future.
> + *
> + *   For detailed explanation of the new API, see 
> osaf/services/saf/immsv/README.
> + */
> +
> +
> +#ifndef _SA_IMM_OM_A_2_16_H
> +#define _SA_IMM_OM_A_2_16_H
> +
> +#ifdef  __cplusplus
> +extern "C" {
> +#endif
> +
> +
> +     /* 4.2.5 SaImmAttrFlagsT */
> +     /*
> +#define SA_IMM_ATTR_MULTI_VALUE   0x00000001
> +#define SA_IMM_ATTR_RDN           0x00000002
> +#define SA_IMM_ATTR_CONFIG        0x00000100
> +#define SA_IMM_ATTR_WRITABLE      0x00000200
> +#define SA_IMM_ATTR_INITIALIZED   0x00000400
> +#define SA_IMM_ATTR_RUNTIME       0x00010000
> +#define SA_IMM_ATTR_PERSISTENT    0x00020000
> +#define SA_IMM_ATTR_CACHED        0x00040000
> +#define SA_IMM_ATTR_NO_DUPLICATES     0x0000000001000000 / * See: 
> http://devel.opensaf.org/ticket/1545
> +                                                      Supported in OpenSaf 
> 4.3 * /
> +#define SA_IMM_ATTR_NOTIFY            0x0000000002000000 / * See: 
> http://devel.opensaf.org/ticket/2883
> +                                                      Supported in OpenSaf 
> 4.3 * /
> +#define SA_IMM_ATTR_NO_DANGLING       0x0000000004000000    / * See: 
> https://sourceforge.net/p/opensaf/tickets/49/
> +                                                         Supported in 
> OpenSaf 4.4 * /
> +
> +#define SA_IMM_ATTR_DN                0x0000000008000000    / * See: 
> https://sourceforge.net/p/opensaf/tickets/643
> +                                                         Supported in 
> OpenSaf 4.6 * /
> +     */
> +#define SA_IMM_ATTR_DEFAULT_REMOVED   0x0000000010000000    /* See: 
> https://sourceforge.net/p/opensaf/tickets/1471
> +                                                         Supported in 
> OpenSaf 4.7 */
> +
> +
> +
> +#ifdef  __cplusplus
> +}
> +#endif
> +
> +#endif   /* _SA_IMM_OM_A_2_16_H */


------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to