osaf/libs/agents/saf/imma/imma_om_api.c | 36 +++++++++++++--
osaf/libs/common/immsv/include/immpbe_dump.hh | 2 +-
osaf/libs/saf/include/Makefile.am | 3 +-
osaf/libs/saf/include/saImmOm_A_2_12.h | 2 +
osaf/libs/saf/include/saImmOm_A_2_13.h | 60 +++++++++++++++++++++++++++
osaf/libs/saf/libSaImm/Makefile.am | 2 +-
6 files changed, 97 insertions(+), 8 deletions(-)
IMM API support for reference integrity (NO_DANGLING flag)
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
@@ -4158,7 +4158,7 @@ SaAisErrorT saImmOmClassCreate_2(SaImmHa
for (i = 0; attr != 0; attr = attrDefinitions[++i]) {
if (attr->attrName == NULL) {
TRACE("NULL attrName , not allowed.");
- TRACE_LEAVE();
+ TRACE_LEAVE();
return SA_AIS_ERR_INVALID_PARAM;
}
@@ -4166,21 +4166,47 @@ SaAisErrorT saImmOmClassCreate_2(SaImmHa
if(((attr->attrValueType != SA_IMM_ATTR_SANAMET ) &&
(attr->attrValueType !=
SA_IMM_ATTR_SASTRINGT))) {
TRACE("ERR_INVALID_PARAM: RDN '%s' must be of
type SaNameT or SaStringT", attr->attrName);
- TRACE_LEAVE();
+ TRACE_LEAVE();
return SA_AIS_ERR_INVALID_PARAM;
}
if(attr->attrFlags & SA_IMM_ATTR_MULTI_VALUE) {
TRACE("ERR_INVALID_PARAM: RDN '%s' can not be
multivalued", attr->attrName);
TRACE_LEAVE();
- return SA_AIS_ERR_INVALID_PARAM;
- }
+ return SA_AIS_ERR_INVALID_PARAM;
+ }
+
+ if(attr->attrFlags & SA_IMM_ATTR_NO_DANGLING) {
+ TRACE("ERR_INVALID_PARAM: RDN '%s' can not have
NO_DANGLING flag", attr->attrName);
+ TRACE_LEAVE();
+ return SA_AIS_ERR_INVALID_PARAM;
+ }
+ }
+
+ if(attr->attrFlags & SA_IMM_ATTR_NO_DANGLING) {
+ if(classCategory == SA_IMM_CLASS_RUNTIME) {
+ TRACE("ERR_INVALID_PARAM: NO_DANGLING attribute
'%s' cannot be defined for runtime class", attr->attrName);
+ TRACE_LEAVE();
+ return SA_AIS_ERR_INVALID_PARAM;
+ }
+
+ if(attr->attrValueType != SA_IMM_ATTR_SANAMET) {
+ TRACE("ERR_INVALID_PARAM: Attribute '%s' is
flagged NO_DANGLING, must be of type SaNameT", attr->attrName);
+ TRACE_LEAVE();
+ return SA_AIS_ERR_INVALID_PARAM;
+ }
+
+ if(attr->attrFlags & SA_IMM_ATTR_RUNTIME) {
+ TRACE("ERR_INVALID_PARAM: Runtime attribute
'%s' cannot have NO_DANGLING flag", attr->attrName);
+ TRACE_LEAVE();
+ return SA_AIS_ERR_INVALID_PARAM;
+ }
}
}
if (cb->is_immnd_up == false) {
TRACE_2("ERR_TRY_AGAIN: IMMND is DOWN");
- TRACE_LEAVE();
+ TRACE_LEAVE();
return SA_AIS_ERR_TRY_AGAIN;
}
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 12
+#define MINOR_VERSION 13
/* 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
@@ -35,6 +35,7 @@ include_HEADERS = \
saSmf.h \
saImmOi_A_2_11.h \
saImmOm_A_2_11.h \
- saImmOm_A_2_12.h
+ saImmOm_A_2_12.h \
+ saImmOm_A_2_13.h
diff --git a/osaf/libs/saf/include/saImmOm_A_2_12.h
b/osaf/libs/saf/include/saImmOm_A_2_12.h
--- a/osaf/libs/saf/include/saImmOm_A_2_12.h
+++ b/osaf/libs/saf/include/saImmOm_A_2_12.h
@@ -73,4 +73,6 @@ extern "C" {
}
#endif
+#include <saImmOm_A_2_13.h>
+
#endif /* _SA_IMM_OM_A_2_12_H */
diff --git a/osaf/libs/saf/include/saImmOm_A_2_13.h
b/osaf/libs/saf/include/saImmOm_A_2_13.h
new file mode 100644
--- /dev/null
+++ b/osaf/libs/saf/include/saImmOm_A_2_13.h
@@ -0,0 +1,60 @@
+/* -*- OpenSAF -*-
+ *
+ * (C) Copyright 2013 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_13_H
+#define _SA_IMM_OM_A_2_13_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
+ Not yet supported. * /
+#define SA_IMM_ATTR_NOTIFY 0x0000000002000000 / * See:
http://devel.opensaf.org/ticket/2883
+ Not yet supported. * /
+ */
+#define SA_IMM_ATTR_NO_DANGLING 0x0000000004000000 /* See:
https://sourceforge.net/p/opensaf/tickets/49/ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SA_IMM_OM_A_2_13_H */
diff --git a/osaf/libs/saf/libSaImm/Makefile.am
b/osaf/libs/saf/libSaImm/Makefile.am
--- a/osaf/libs/saf/libSaImm/Makefile.am
+++ b/osaf/libs/saf/libSaImm/Makefile.am
@@ -21,7 +21,7 @@ MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = libSaImmOi.map libSaImmOm.map
OILIB_VERSION = 0:3:0
-OMLIB_VERSION = 0:3:0
+OMLIB_VERSION = 0:4:0
SUBDIRS = pkgconfig
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel