Re: [devel] [PATCH 1 of 3] amfd: move svctype and svctypecstype declarations to separate files [#713]

2014-06-16 Thread Nagendra Kumar
Ack

Thanks
-Nagu

 -Original Message-
 From: Gary Lee [mailto:gary@dektech.com.au]
 Sent: 13 June 2014 11:19
 To: hans.fe...@ericsson.com; hans.nordeb...@ericsson.com; Nagendra
 Kumar; Praveen Malviya
 Cc: opensaf-devel@lists.sourceforge.net
 Subject: [PATCH 1 of 3] amfd: move svctype and svctypecstype declarations to
 separate files [#713]
 
  osaf/services/saf/amf/amfd/include/si.h|  34 +--
  osaf/services/saf/amf/amfd/include/svctype.h   |  38
 ++
  osaf/services/saf/amf/amfd/include/svctypecstype.h |  35
 
  3 files changed, 75 insertions(+), 32 deletions(-)
 
 
 Move declarations relating to svctype and svctypecstype from si.h to
 their own header files.
 
 diff --git a/osaf/services/saf/amf/amfd/include/si.h
 b/osaf/services/saf/amf/amfd/include/si.h
 --- a/osaf/services/saf/amf/amfd/include/si.h
 +++ b/osaf/services/saf/amf/amfd/include/si.h
 @@ -36,11 +36,12 @@
 
  #include saAmf.h
  #include saImm.h
 -#include ncspatricia.h
  #include app.h
  #include sg.h
  #include su.h
  #include sg.h
 +#include svctype.h
 +#include svctypecstype.h
  #include amf_defs.h
  #include ckpt_msg.h
  #include vector
 @@ -132,30 +133,7 @@ private:
   AVD_SI operator=(const AVD_SI);
  };
 
 -typedef struct avd_amf_svc_type_tag {
 -
 - NCS_PATRICIA_NODE tree_node;/* key will be svc type name
 */
 - SaNameT name;
 - char **saAmfSvcDefActiveWeight;
 - char **saAmfSvcDefStandbyWeight;
 - AVD_SI *list_of_si;
 -
 -} AVD_SVC_TYPE;
 -
 -typedef struct {
 - SaNameT name;
 - SaUint32T saAmfSvctMaxNumCSIs;
 -
 - SaUint32T curr_num_csis;
 -
 - struct avd_amf_svc_type_tag *cs_type_on_svc_type;
 - struct avd_svc_type_cs_type_tag *cs_type_list_svc_type_next;
 -
 -} AVD_SVC_TYPE_CS_TYPE;
 -
  extern AmfDbstd::string, AVD_SI *si_db;
 -extern AmfDbstd::string, AVD_SVC_TYPE_CS_TYPE *svctypecstypes_db;
 -extern AmfDbstd::string, AVD_SVC_TYPE *svctype_db;
  #define AVD_SI_NULL ((AVD_SI *)0)
  #define m_AVD_SI_ACTV_MAX_SU(l_si) (l_si)-saAmfSIPrefActiveAssignments
  #define m_AVD_SI_ACTV_CURR_SU(l_si) (l_si)-
 saAmfSINumCurrActiveAssignments
 @@ -172,14 +150,6 @@ extern AVD_SI *avd_si_get(const SaNameT
  extern SaAisErrorT avd_si_config_get(struct avd_app_tag *app);
  extern void avd_si_constructor(void);
 
 -extern SaAisErrorT avd_svctype_config_get(void);
 -extern void avd_svctype_add_si(AVD_SI *si);
 -extern void avd_svctype_remove_si(AVD_SI *si);
 -extern void avd_svctype_constructor(void);
 -
 -extern SaAisErrorT avd_svctypecstypes_config_get(SaNameT *svctype_name);
 -extern void avd_svctypecstypes_constructor(void);
 -
  extern void avd_si_assignments_delete(AVD_CL_CB *cb, AVD_SI *si);
 
  #endif
 diff --git a/osaf/services/saf/amf/amfd/include/svctype.h
 b/osaf/services/saf/amf/amfd/include/svctype.h
 new file mode 100644
 --- /dev/null
 +++ b/osaf/services/saf/amf/amfd/include/svctype.h
 @@ -0,0 +1,38 @@
 +/*  -*- OpenSAF  -*-
 + *
 + * (C) Copyright 2014 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.
 + *
 + */
 +
 +#ifndef SVCTYPE_H
 +#define SVCTYPE_H
 +
 +#include ncspatricia.h
 +
 +typedef struct avd_amf_svc_type_tag {
 +
 + NCS_PATRICIA_NODE tree_node;/* key will be svc type name
 */
 + SaNameT name;
 + char **saAmfSvcDefActiveWeight;
 + char **saAmfSvcDefStandbyWeight;
 + AVD_SI *list_of_si;
 +
 +} AVD_SVC_TYPE;
 +
 +SaAisErrorT avd_svctype_config_get(void);
 +void avd_svctype_add_si(AVD_SI *si);
 +void avd_svctype_remove_si(AVD_SI *si);
 +void avd_svctype_constructor(void);
 +
 +extern AmfDbstd::string, AVD_SVC_TYPE *svctype_db;
 +
 +#endif
 diff --git a/osaf/services/saf/amf/amfd/include/svctypecstype.h
 b/osaf/services/saf/amf/amfd/include/svctypecstype.h
 new file mode 100644
 --- /dev/null
 +++ b/osaf/services/saf/amf/amfd/include/svctypecstype.h
 @@ -0,0 +1,35 @@
 +/*  -*- OpenSAF  -*-
 + *
 + * (C) Copyright 2014 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.
 

Re: [devel] [PATCH 1 of 3] amfd: move svctype and svctypecstype declarations to separate files [#713]

2014-06-16 Thread Hans Nordebäck
ack, minor comment, the Makefile.am should be updated with the new 
header files. /Regards HansN
On 06/13/14 07:48, Gary Lee wrote:
   osaf/services/saf/amf/amfd/include/si.h|  34 +--
   osaf/services/saf/amf/amfd/include/svctype.h   |  38 
 ++
   osaf/services/saf/amf/amfd/include/svctypecstype.h |  35 
 
   3 files changed, 75 insertions(+), 32 deletions(-)


 Move declarations relating to svctype and svctypecstype from si.h to
 their own header files.

 diff --git a/osaf/services/saf/amf/amfd/include/si.h 
 b/osaf/services/saf/amf/amfd/include/si.h
 --- a/osaf/services/saf/amf/amfd/include/si.h
 +++ b/osaf/services/saf/amf/amfd/include/si.h
 @@ -36,11 +36,12 @@
   
   #include saAmf.h
   #include saImm.h
 -#include ncspatricia.h
   #include app.h
   #include sg.h
   #include su.h
   #include sg.h
 +#include svctype.h
 +#include svctypecstype.h
   #include amf_defs.h
   #include ckpt_msg.h
   #include vector
 @@ -132,30 +133,7 @@ private:
   AVD_SI operator=(const AVD_SI);
   };
   
 -typedef struct avd_amf_svc_type_tag {
 -
 - NCS_PATRICIA_NODE tree_node;/* key will be svc type name */
 - SaNameT name;
 - char **saAmfSvcDefActiveWeight;
 - char **saAmfSvcDefStandbyWeight;
 - AVD_SI *list_of_si;
 -
 -} AVD_SVC_TYPE;
 -
 -typedef struct {
 - SaNameT name;
 - SaUint32T saAmfSvctMaxNumCSIs;
 -
 - SaUint32T curr_num_csis;
 -
 - struct avd_amf_svc_type_tag *cs_type_on_svc_type;
 - struct avd_svc_type_cs_type_tag *cs_type_list_svc_type_next;
 -
 -} AVD_SVC_TYPE_CS_TYPE;
 -
   extern AmfDbstd::string, AVD_SI *si_db;
 -extern AmfDbstd::string, AVD_SVC_TYPE_CS_TYPE *svctypecstypes_db;
 -extern AmfDbstd::string, AVD_SVC_TYPE *svctype_db;
   #define AVD_SI_NULL ((AVD_SI *)0)
   #define m_AVD_SI_ACTV_MAX_SU(l_si) (l_si)-saAmfSIPrefActiveAssignments
   #define m_AVD_SI_ACTV_CURR_SU(l_si) (l_si)-saAmfSINumCurrActiveAssignments
 @@ -172,14 +150,6 @@ extern AVD_SI *avd_si_get(const SaNameT
   extern SaAisErrorT avd_si_config_get(struct avd_app_tag *app);
   extern void avd_si_constructor(void);
   
 -extern SaAisErrorT avd_svctype_config_get(void);
 -extern void avd_svctype_add_si(AVD_SI *si);
 -extern void avd_svctype_remove_si(AVD_SI *si);
 -extern void avd_svctype_constructor(void);
 -
 -extern SaAisErrorT avd_svctypecstypes_config_get(SaNameT *svctype_name);
 -extern void avd_svctypecstypes_constructor(void);
 -
   extern void avd_si_assignments_delete(AVD_CL_CB *cb, AVD_SI *si);
   
   #endif
 diff --git a/osaf/services/saf/amf/amfd/include/svctype.h 
 b/osaf/services/saf/amf/amfd/include/svctype.h
 new file mode 100644
 --- /dev/null
 +++ b/osaf/services/saf/amf/amfd/include/svctype.h
 @@ -0,0 +1,38 @@
 +/*  -*- OpenSAF  -*-
 + *
 + * (C) Copyright 2014 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.
 + *
 + */
 +
 +#ifndef SVCTYPE_H
 +#define SVCTYPE_H
 +
 +#include ncspatricia.h
 +
 +typedef struct avd_amf_svc_type_tag {
 +
 + NCS_PATRICIA_NODE tree_node;/* key will be svc type name */
 + SaNameT name;
 + char **saAmfSvcDefActiveWeight;
 + char **saAmfSvcDefStandbyWeight;
 + AVD_SI *list_of_si;
 +
 +} AVD_SVC_TYPE;
 +
 +SaAisErrorT avd_svctype_config_get(void);
 +void avd_svctype_add_si(AVD_SI *si);
 +void avd_svctype_remove_si(AVD_SI *si);
 +void avd_svctype_constructor(void);
 +
 +extern AmfDbstd::string, AVD_SVC_TYPE *svctype_db;
 +
 +#endif
 diff --git a/osaf/services/saf/amf/amfd/include/svctypecstype.h 
 b/osaf/services/saf/amf/amfd/include/svctypecstype.h
 new file mode 100644
 --- /dev/null
 +++ b/osaf/services/saf/amf/amfd/include/svctypecstype.h
 @@ -0,0 +1,35 @@
 +/*  -*- OpenSAF  -*-
 + *
 + * (C) Copyright 2014 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.
 + *
 + */
 +
 +#ifndef SVCTYPECSTYPE_H
 +#define SVCTYPECSTYPE_H
 +
 +typedef struct {
 + SaNameT name;
 + SaUint32T saAmfSvctMaxNumCSIs;
 +
 + SaUint32T curr_num_csis;
 +
 + struct 

Re: [devel] [PATCH 1 of 3] amfd: move svctype and svctypecstype declarations to separate files [#713]

2014-06-16 Thread Gary Lee
Thanks Hans. I'll add svctype.h and svctypecstype.h to include/Makefile.am

Thanks
Gary

On 16/06/14 18:36, Hans Nordebäck wrote:
 ack, minor comment, the Makefile.am should be updated with the new 
 header files. /Regards HansN
 On 06/13/14 07:48, Gary Lee wrote:
 osaf/services/saf/amf/amfd/include/si.h|  34 
 +--
   osaf/services/saf/amf/amfd/include/svctype.h   |  38 
 ++
   osaf/services/saf/amf/amfd/include/svctypecstype.h |  35 
 
   3 files changed, 75 insertions(+), 32 deletions(-)


 Move declarations relating to svctype and svctypecstype from si.h to
 their own header files.



--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing  Easy Data Exploration
http://p.sf.net/sfu/hpccsystems
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel