osaf/services/saf/amf/amfd/include/proc.h    |  10 ---------
 osaf/services/saf/amf/amfd/include/sg.h      |  24 ++++++++++++++++++--
 osaf/services/saf/amf/amfd/sg_2n_fsm.cc      |  31 +--------------------------
 osaf/services/saf/amf/amfd/sg_nored_fsm.cc   |  31 +--------------------------
 osaf/services/saf/amf/amfd/sg_npm_fsm.cc     |  30 +-------------------------
 osaf/services/saf/amf/amfd/sg_nway_fsm.cc    |  27 +----------------------
 osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc |  31 +--------------------------
 7 files changed, 31 insertions(+), 153 deletions(-)


diff --git a/osaf/services/saf/amf/amfd/include/proc.h 
b/osaf/services/saf/amf/amfd/include/proc.h
--- a/osaf/services/saf/amf/amfd/include/proc.h
+++ b/osaf/services/saf/amf/amfd/include/proc.h
@@ -53,38 +53,28 @@ uint32_t avd_sg_susi_mod_snd_honouring_s
 uint32_t avd_sg_su_si_del_snd(AVD_CL_CB *cb, AVD_SU *su);
 
 /* The following are for 2N redundancy model */
-uint32_t avd_sg_2n_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                        AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 uint32_t avd_sg_2n_susi_fail_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
                                        AVSV_SUSI_ACT act, SaAmfHAStateT state);
 void avd_sg_2n_init(AVD_SG *sg);
 
 /* The following are for N-Way redundancy model */
 uint32_t avd_sg_nway_si_assign(AVD_CL_CB *, AVD_SG *);
-uint32_t avd_sg_nway_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                          AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 uint32_t avd_sg_nway_susi_fail_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
                                          AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 void avd_sg_nway_init(AVD_SG *sg);
 
 /* The following are for N+M redundancy model */
-uint32_t avd_sg_npm_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                         AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 uint32_t avd_sg_npm_susi_fail_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
                                         AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 void avd_sg_npm_init(AVD_SG *sg);
 
 /* The following are for No redundancy model */
-uint32_t avd_sg_nored_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                           AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 uint32_t avd_sg_nored_susi_fail_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
                                           AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 void avd_sg_nored_init(AVD_SG *sg);
 
 /* The following are for N-way Active redundancy model */
 AVD_SU *avd_sg_nacvred_su_chose_asgn(AVD_CL_CB *cb, AVD_SG *sg);
-uint32_t avd_sg_nacvred_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, 
AVD_SU_SI_REL *susi,
-                                             AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 uint32_t avd_sg_nacvred_susi_fail_func(AVD_CL_CB *cb, AVD_SU *su, 
AVD_SU_SI_REL *susi,
                                             AVSV_SUSI_ACT act, SaAmfHAStateT 
state);
 void avd_sg_nacv_init(AVD_SG *sg);
diff --git a/osaf/services/saf/amf/amfd/include/sg.h 
b/osaf/services/saf/amf/amfd/include/sg.h
--- a/osaf/services/saf/amf/amfd/include/sg.h
+++ b/osaf/services/saf/amf/amfd/include/sg.h
@@ -288,9 +288,17 @@ public:
        virtual uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su,
                        struct avd_avnd_tag *avnd) = 0;
 
-       // Handle successful SUSI assignment
-       uint32_t (*susi_success)(AVD_CL_CB *cb, AVD_SU *su,
-                       struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
+       /**
+        * Handle successful SUSI assignment
+        * @param cb
+        * @param su
+        * @param susi
+        * @param act
+        * @param state
+        * @return
+        */
+       virtual uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+                       struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state) = 0;
 
        // Handle failed SUSI assignment
        uint32_t (*susi_failed)(AVD_CL_CB *cb, AVD_SU *su,
@@ -319,6 +327,8 @@ public:
        uint32_t su_insvc(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_fault(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su, struct avd_avnd_tag 
*avnd);
+       uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
 };
 
 /**
@@ -335,6 +345,8 @@ public:
        uint32_t su_insvc(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_fault(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su, struct avd_avnd_tag 
*avnd);
+       uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
 };
 
 /**
@@ -351,6 +363,8 @@ public:
        uint32_t su_insvc(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_fault(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su, struct avd_avnd_tag 
*avnd);
+       uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
 };
 
 /**
@@ -367,6 +381,8 @@ public:
        uint32_t su_insvc(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_fault(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su, struct avd_avnd_tag 
*avnd);
+       uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
 };
 
 /**
@@ -383,6 +399,8 @@ public:
        uint32_t su_insvc(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_fault(AVD_CL_CB *cb, AVD_SU *su);
        uint32_t su_admin_down(AVD_CL_CB *cb, AVD_SU *su, struct avd_avnd_tag 
*avnd);
+       uint32_t susi_success(AVD_CL_CB *cb, AVD_SU *su,
+               struct avd_su_si_rel_tag *susi, AVSV_SUSI_ACT act, 
SaAmfHAStateT state);
 };
 
 
diff --git a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_2n_fsm.cc
@@ -2348,34 +2348,8 @@ done:
        return rc;
 }
 
-/*****************************************************************************
- * Function: avd_sg_2n_susi_sucss_func
- *
- * Purpose:  This function is called when a SU SI ack function is
- * received from the AVND with success value. The SG FSM for 2N redundancy
- * model will be run. The SUSI fsm state will
- * be changed to assigned or it will freed for the SU SI. 
- * 
- *
- * Input: cb - the AVD control block
- *        su - In case of entire SU related operation the SU for
- *               which the ack is received.
- *        susi - The pointer to the service unit service instance relationship.
- *        act  - The action received in the ack message.
- *        state - The HA state in the message.
- * 
- *        
- *
- * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
- *
- * NOTES: This is a 2N redundancy model specific function.
- *
- * 
- **************************************************************************/
-
-uint32_t avd_sg_2n_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                                                  
AVSV_SUSI_ACT act, SaAmfHAStateT state)
-{
+uint32_t SG_2N::susi_success(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL *susi,
+                                                                  
AVSV_SUSI_ACT act, SaAmfHAStateT state) {
 
        AVD_SU_SI_REL *s_susi, *n_susi;
        AVD_SU *i_su, *a_su;
@@ -4002,7 +3976,6 @@ AVD_SU *get_other_su_from_oper_list(AVD_
  */
 void avd_sg_2n_init(AVD_SG *sg)
 {
-       sg->susi_success = avd_sg_2n_susi_sucss_func;
        sg->susi_failed = avd_sg_2n_susi_fail_func;
 }
 
diff --git a/osaf/services/saf/amf/amfd/sg_nored_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_nored_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_nored_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_nored_fsm.cc
@@ -352,34 +352,8 @@ uint32_t SG_NORED::su_insvc(AVD_CL_CB *c
 
 }
 
-/*****************************************************************************
- * Function: avd_sg_nored_susi_sucss_func
- *
- * Purpose:  This function is called when a SU SI ack function is
- * received from the AVND with success value. The SG FSM for No redundancy
- * model will be run. The SUSI fsm state will
- * be changed to assigned or it will freed for the SU SI. 
- * 
- *
- * Input: cb - the AVD control block
- *        su - In case of entire SU related operation the SU for
- *               which the ack is received.
- *        susi - The pointer to the service unit service instance relationship.
- *        act  - The action received in the ack message.
- *        state - The HA state in the message.
- * 
- *        
- *
- * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
- *
- * NOTES: This is a No redundancy model specific function.
- *
- * 
- **************************************************************************/
-
-uint32_t avd_sg_nored_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi,
-                                  AVSV_SUSI_ACT act, SaAmfHAStateT state)
-{
+uint32_t SG_NORED::susi_success(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL *susi,
+                                  AVSV_SUSI_ACT act, SaAmfHAStateT state) {
        AVD_SI *l_si;
        bool flag;
        AVD_AVND *su_node_ptr = NULL;
@@ -1279,7 +1253,6 @@ uint32_t SG_NORED::sg_admin_down(AVD_CL_
  */
 void avd_sg_nored_init(AVD_SG *sg)
 {
-       sg->susi_success = avd_sg_nored_susi_sucss_func;
        sg->susi_failed = avd_sg_nored_susi_fail_func;
 }
 
diff --git a/osaf/services/saf/amf/amfd/sg_npm_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_npm_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_npm_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_npm_fsm.cc
@@ -2792,33 +2792,8 @@ static uint32_t avd_sg_npm_susi_sucss_si
        return NCSCC_RC_SUCCESS;
 }
 
-/*****************************************************************************
- * Function: avd_sg_npm_susi_sucss_func
- *
- * Purpose:  This function is called when a SU SI ack function is
- * received from the AVND with success value. The SG FSM for N+M redundancy
- * model will be run. The SUSI fsm state will
- * be changed to assigned or it will freed for the SU SI. 
- * 
- *
- * Input: cb - the AVD control block
- *        su - In case of entire SU related operation the SU for
- *               which the ack is received.
- *        susi - The pointer to the service unit service instance relationship.
- *        act  - The action received in the ack message.
- *        state - The HA state in the message.
- * 
- *        
- *
- * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
- *
- * NOTES: This is a N+M redundancy model specific function.
- *
- * 
- **************************************************************************/
-
-uint32_t avd_sg_npm_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL 
*susi, AVSV_SUSI_ACT act, SaAmfHAStateT state)
-{
+uint32_t SG_NPM::susi_success(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL *susi,
+               AVSV_SUSI_ACT act, SaAmfHAStateT state) {
        AVD_SU_SI_REL *o_susi;
 
        TRACE_ENTER2("%u", su->sg_of_su->sg_fsm_state);
@@ -4459,7 +4434,6 @@ uint32_t SG_NPM::sg_admin_down(AVD_CL_CB
  */
 void avd_sg_npm_init(AVD_SG *sg)
 {
-       sg->susi_success = avd_sg_npm_susi_sucss_func;
        sg->susi_failed = avd_sg_npm_susi_fail_func;
 }
 
diff --git a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_nway_fsm.cc
@@ -252,30 +252,8 @@ done:
        return rc;
 }
 
-/*****************************************************************************
- * Function: avd_sg_nway_susi_sucss_func
- *
- * Purpose:  This function is called when a SU SI ack function is
- * received from the AVND with success value. The SG FSM for N-Way redundancy
- * model will be run. The SUSI fsm state will
- * be changed to assigned or it will freed for the SU SI. 
- * 
- *
- * Input: cb - the AVD control block
- *        su - In case of entire SU related operation the SU for
- *               which the ack is received.
- *        susi - The pointer to the service unit service instance relationship.
- *        act  - The action received in the ack message.
- *        state - The HA state in the message.
- *
- * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
- *
- * Notes: This is a N-Way redundancy model specific function.
- * 
- **************************************************************************/
-uint32_t avd_sg_nway_susi_sucss_func(AVD_CL_CB *cb,
-                                 AVD_SU *su, AVD_SU_SI_REL *susi, 
AVSV_SUSI_ACT act, SaAmfHAStateT state)
-{
+uint32_t SG_NWAY::susi_success(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL *susi,
+               AVSV_SUSI_ACT act, SaAmfHAStateT state) {
        uint32_t rc = NCSCC_RC_SUCCESS;
 
        TRACE_ENTER2("sg_fsm_state :%u action:%u state:%u", 
su->sg_of_su->sg_fsm_state, act, state);
@@ -3557,7 +3535,6 @@ void avd_sg_nway_node_fail_sg_realign(AV
  */
 void avd_sg_nway_init(AVD_SG *sg)
 {
-       sg->susi_success = avd_sg_nway_susi_sucss_func;
        sg->susi_failed = avd_sg_nway_susi_fail_func;
 }
 
diff --git a/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc 
b/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
--- a/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
+++ b/osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc
@@ -538,34 +538,8 @@ uint32_t SG_NACV::su_insvc(AVD_CL_CB *cb
 
 }
 
-/*****************************************************************************
- * Function: avd_sg_nacvred_susi_sucss_func
- *
- * Purpose:  This function is called when a SU SI ack function is
- * received from the AVND with success value. The SG FSM for N-way active 
redundancy
- * model will be run. The SUSI fsm state will
- * be changed to assigned or it will freed for the SU SI. 
- * 
- *
- * Input: cb - the AVD control block
- *        su - In case of entire SU related operation the SU for
- *               which the ack is received.
- *        susi - The pointer to the service unit service instance relationship.
- *        act  - The action received in the ack message.
- *        state - The HA state in the message.
- * 
- *        
- *
- * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE.
- *
- * NOTES: This is a N-way active redundancy model specific function.
- *
- * 
- **************************************************************************/
-
-uint32_t avd_sg_nacvred_susi_sucss_func(AVD_CL_CB *cb, AVD_SU *su, 
AVD_SU_SI_REL *susi,
-                                    AVSV_SUSI_ACT act, SaAmfHAStateT state)
-{
+uint32_t SG_NACV::susi_success(AVD_CL_CB *cb, AVD_SU *su, AVD_SU_SI_REL *susi,
+                                    AVSV_SUSI_ACT act, SaAmfHAStateT state) {
        bool flag;
        AVD_AVND *su_node_ptr = NULL;
        AVD_SU_SI_REL *tmp_susi;
@@ -2002,7 +1976,6 @@ done:
  */
 void avd_sg_nacv_init(AVD_SG *sg)
 {
-       sg->susi_success = avd_sg_nacvred_susi_sucss_func;
        sg->susi_failed = avd_sg_nacvred_susi_fail_func;
 }
 

------------------------------------------------------------------------------
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

Reply via email to