osaf/services/saf/amf/amfd/include/proc.h | 5 ----- osaf/services/saf/amf/amfd/include/sg.h | 14 ++++++++++++-- osaf/services/saf/amf/amfd/sg_2n_fsm.cc | 22 +--------------------- osaf/services/saf/amf/amfd/sg_nored_fsm.cc | 22 +--------------------- osaf/services/saf/amf/amfd/sg_npm_fsm.cc | 22 +--------------------- osaf/services/saf/amf/amfd/sg_nway_fsm.cc | 19 +------------------ osaf/services/saf/amf/amfd/sg_nwayact_fsm.cc | 22 +--------------------- 7 files changed, 17 insertions(+), 109 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 @@ -61,7 +61,6 @@ uint32_t avd_sg_2n_susi_sucss_func(AVD_C 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); uint32_t avd_sg_2n_su_admin_fail(AVD_CL_CB *cb, AVD_SU *su, AVD_AVND *avnd); -uint32_t avd_sg_2n_si_admin_down(AVD_CL_CB *cb, AVD_SI *si); uint32_t avd_sg_2n_sg_admin_down(AVD_CL_CB *cb, AVD_SG *sg); void avd_sg_2n_init(AVD_SG *sg); @@ -75,7 +74,6 @@ uint32_t avd_sg_nway_susi_sucss_func(AVD 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); uint32_t avd_sg_nway_su_admin_fail(AVD_CL_CB *cb, AVD_SU *su, AVD_AVND *avnd); -uint32_t avd_sg_nway_si_admin_down(AVD_CL_CB *cb, AVD_SI *si); uint32_t avd_sg_nway_sg_admin_down(AVD_CL_CB *cb, AVD_SG *sg); void avd_sg_nway_init(AVD_SG *sg); @@ -88,7 +86,6 @@ uint32_t avd_sg_npm_susi_sucss_func(AVD_ 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); uint32_t avd_sg_npm_su_admin_fail(AVD_CL_CB *cb, AVD_SU *su, AVD_AVND *avnd); -uint32_t avd_sg_npm_si_admin_down(AVD_CL_CB *cb, AVD_SI *si); uint32_t avd_sg_npm_sg_admin_down(AVD_CL_CB *cb, AVD_SG *sg); void avd_sg_npm_init(AVD_SG *sg); @@ -100,7 +97,6 @@ uint32_t avd_sg_nored_susi_sucss_func(AV 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); uint32_t avd_sg_nored_su_admin_fail(AVD_CL_CB *cb, AVD_SU *su, AVD_AVND *avnd); -uint32_t avd_sg_nored_si_admin_down(AVD_CL_CB *cb, AVD_SI *si); uint32_t avd_sg_nored_sg_admin_down(AVD_CL_CB *cb, AVD_SG *sg); void avd_sg_nored_init(AVD_SG *sg); @@ -113,7 +109,6 @@ uint32_t avd_sg_nacvred_susi_sucss_func( 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); uint32_t avd_sg_nacvred_su_admin_fail(AVD_CL_CB *cb, AVD_SU *su, AVD_AVND *avnd); -uint32_t avd_sg_nacvred_si_admin_down(AVD_CL_CB *cb, AVD_SI *si); uint32_t avd_sg_nacvred_sg_admin_down(AVD_CL_CB *cb, AVD_SG *sg); 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 @@ -237,8 +237,13 @@ public: */ virtual uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si) = 0; - // Handle SI admin op LOCK/SHUTDOWN - uint32_t (*si_admin_down)(AVD_CL_CB *cb, AVD_SI *si); + /** + * Handle SI admin op LOCK/SHUTDOWN + * @param cb + * @param si + * @return + */ + virtual uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si) = 0; // Handle SI admin op SWAP SaAisErrorT (*si_swap)(AVD_SI *si, SaInvocationT invocation); @@ -281,6 +286,7 @@ public: void node_fail(AVD_CL_CB*, AVD_SU*); uint32_t realign(AVD_CL_CB *cb, AVD_SG *sg); uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si); + uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si); }; /** @@ -292,6 +298,7 @@ public: void node_fail(AVD_CL_CB*, AVD_SU*); uint32_t realign(AVD_CL_CB *cb, AVD_SG *sg); uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si); + uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si); }; /** @@ -303,6 +310,7 @@ public: void node_fail(AVD_CL_CB*, AVD_SU*); uint32_t realign(AVD_CL_CB *cb, AVD_SG *sg); uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si); + uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si); }; /** @@ -314,6 +322,7 @@ public: void node_fail(AVD_CL_CB*, AVD_SU*); uint32_t realign(AVD_CL_CB *cb, AVD_SG *sg); uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si); + uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si); }; /** @@ -325,6 +334,7 @@ public: void node_fail(AVD_CL_CB*, AVD_SU*); uint32_t realign(AVD_CL_CB *cb, AVD_SG *sg); uint32_t si_assign(AVD_CL_CB *cb, AVD_SI *si); + uint32_t si_admin_down(AVD_CL_CB *cb, AVD_SI *si); }; 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 @@ -3763,26 +3763,7 @@ done: return rc; } -/***************************************************************************** - * Function: avd_sg_2n_si_admin_down - * - * Purpose: This function is called when SIs admin state is changed to - * LOCK or shutdown. The functionality will be as described in - * the SG design FSM. - * - * Input: cb - the AVD control block - * si - The SI pointer. - * - * - * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE. - * - * NOTES: This is a 2N redundancy model specific function. - * - * - **************************************************************************/ - -uint32_t avd_sg_2n_si_admin_down(AVD_CL_CB *cb, AVD_SI *si) -{ +uint32_t SG_2N::si_admin_down(AVD_CL_CB *cb, AVD_SI *si) { AVD_SU_SI_REL *a_susi = NULL, *s_susi = NULL; uint32_t rc = NCSCC_RC_FAILURE; @@ -4111,7 +4092,6 @@ AVD_SU *get_other_su_from_oper_list(AVD_ */ void avd_sg_2n_init(AVD_SG *sg) { - sg->si_admin_down = avd_sg_2n_si_admin_down; sg->si_swap = avd_sg_2n_siswap_func; sg->sg_admin_down = avd_sg_2n_sg_admin_down; sg->su_insvc = avd_sg_2n_su_insvc_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 @@ -1176,26 +1176,7 @@ uint32_t avd_sg_nored_su_admin_fail(AVD_ return NCSCC_RC_SUCCESS; } -/***************************************************************************** - * Function: avd_sg_nored_si_admin_down - * - * Purpose: This function is called when SIs admin state is changed to - * LOCK or shutdown. The functionality will be as described in - * the SG design FSM. - * - * Input: cb - the AVD control block - * si - The SI pointer. - * - * - * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE. - * - * NOTES: This is a No redundancy model specific function. - * - * - **************************************************************************/ - -uint32_t avd_sg_nored_si_admin_down(AVD_CL_CB *cb, AVD_SI *si) -{ +uint32_t SG_NORED::si_admin_down(AVD_CL_CB *cb, AVD_SI *si) { TRACE_ENTER2("%u", si->sg_of_si->sg_fsm_state); if ((cb->init_state != AVD_APP_STATE) && (si->sg_of_si->sg_ncs_spec == false)) { @@ -1377,7 +1358,6 @@ uint32_t avd_sg_nored_sg_admin_down(AVD_ */ void avd_sg_nored_init(AVD_SG *sg) { - sg->si_admin_down = avd_sg_nored_si_admin_down; sg->sg_admin_down = avd_sg_nored_sg_admin_down; sg->su_insvc = avd_sg_nored_su_insvc_func; sg->su_fault = avd_sg_nored_su_fault_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 @@ -4331,26 +4331,7 @@ uint32_t avd_sg_npm_su_admin_fail(AVD_CL return NCSCC_RC_SUCCESS; } -/***************************************************************************** - * Function: avd_sg_npm_si_admin_down - * - * Purpose: This function is called when SIs admin state is changed to - * LOCK or shutdown. The functionality will be as described in - * the SG design FSM. - * - * Input: cb - the AVD control block - * si - The SI pointer. - * - * - * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE. - * - * NOTES: This is a N+M redundancy model specific function. - * - * - **************************************************************************/ - -uint32_t avd_sg_npm_si_admin_down(AVD_CL_CB *cb, AVD_SI *si) -{ +uint32_t SG_NPM::si_admin_down(AVD_CL_CB *cb, AVD_SI *si) { AVD_SU_SI_REL *a_susi; TRACE_ENTER2("%u", si->sg_of_si->sg_fsm_state); @@ -4557,7 +4538,6 @@ uint32_t avd_sg_npm_sg_admin_down(AVD_CL */ void avd_sg_npm_init(AVD_SG *sg) { - sg->si_admin_down = avd_sg_npm_si_admin_down; sg->sg_admin_down = avd_sg_npm_sg_admin_down; sg->su_insvc = avd_sg_npm_su_insvc_func; sg->su_fault = avd_sg_npm_su_fault_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 @@ -717,23 +717,7 @@ done: return rc; } -/***************************************************************************** - * Function: avd_sg_nway_si_admin_down - * - * Purpose: This function is called when SIs admin state is changed to - * LOCK or shutdown. The functionality will be as described in - * the SG design FSM. - * - * Input: cb - the AVD control block - * si - The SI pointer. - * - * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE. - * - * Notes: This is a N-Way redundancy model specific function. - * - **************************************************************************/ -uint32_t avd_sg_nway_si_admin_down(AVD_CL_CB *cb, AVD_SI *si) -{ +uint32_t SG_NWAY::si_admin_down(AVD_CL_CB *cb, AVD_SI *si) { AVD_SU_SI_REL *curr_susi = 0; uint32_t rc = NCSCC_RC_SUCCESS; @@ -3640,7 +3624,6 @@ void avd_sg_nway_node_fail_sg_realign(AV */ void avd_sg_nway_init(AVD_SG *sg) { - sg->si_admin_down = avd_sg_nway_si_admin_down; sg->sg_admin_down = avd_sg_nway_sg_admin_down; sg->su_insvc = avd_sg_nway_su_insvc_func; sg->su_fault = avd_sg_nway_su_fault_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 @@ -1702,26 +1702,7 @@ uint32_t avd_sg_nacvred_su_admin_fail(AV return NCSCC_RC_SUCCESS; } -/***************************************************************************** - * Function: avd_sg_nacvred_si_admin_down - * - * Purpose: This function is called when SIs admin state is changed to - * LOCK or shutdown. The functionality will be as described in - * the SG design FSM. - * - * Input: cb - the AVD control block - * si - The SI pointer. - * - * - * Returns: NCSCC_RC_SUCCESS/NCSCC_RC_FAILURE. - * - * NOTES: This is a N-way active redundancy model specific function. - * - * - **************************************************************************/ - -uint32_t avd_sg_nacvred_si_admin_down(AVD_CL_CB *cb, AVD_SI *si) -{ +uint32_t SG_NACV::si_admin_down(AVD_CL_CB *cb, AVD_SI *si) { AVD_SU_SI_REL *i_susi; TRACE_ENTER2("%u", si->sg_of_si->sg_fsm_state); @@ -2100,7 +2081,6 @@ done: */ void avd_sg_nacv_init(AVD_SG *sg) { - sg->si_admin_down = avd_sg_nacvred_si_admin_down; sg->sg_admin_down = avd_sg_nacvred_sg_admin_down; sg->su_insvc = avd_sg_nacvred_su_insvc_func; sg->su_fault = avd_sg_nacvred_su_fault_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