ack, code review only/Thanks HansN On 01/20/2016 11:00 AM, praveen.malv...@oracle.com wrote: > osaf/services/saf/amf/amfd/include/node.h | 3 +++ > osaf/services/saf/amf/amfd/node.cc | 8 ++++---- > osaf/services/saf/amf/amfd/nodegroup.cc | 20 +++----------------- > 3 files changed, 10 insertions(+), 21 deletions(-) > > > diff --git a/osaf/services/saf/amf/amfd/include/node.h > b/osaf/services/saf/amf/amfd/include/node.h > --- a/osaf/services/saf/amf/amfd/include/node.h > +++ b/osaf/services/saf/amf/amfd/include/node.h > @@ -144,6 +144,9 @@ class AVD_AVND { > bool clm_change_start_preceded; /* to indicate there was CLM start cbk > before CLM completed cb. */ > bool recvr_fail_sw; /* to indicate there was node reboot because of node > failover/switchover.*/ > AVD_AMF_NG *admin_ng; /* points to the nodegroup on which admin operation > is going on.*/ > + > + //Member functions. > + void node_sus_termstate_set(bool term_state) const; > private: > void initialize(); > // disallow copy and assign > diff --git a/osaf/services/saf/amf/amfd/node.cc > b/osaf/services/saf/amf/amfd/node.cc > --- a/osaf/services/saf/amf/amfd/node.cc > +++ b/osaf/services/saf/amf/amfd/node.cc > @@ -1151,9 +1151,9 @@ void avd_node_admin_lock_unlock_shutdown > * > * @param node > */ > -static void node_sus_termstate_set(AVD_AVND *node, bool term_state) > +void AVD_AVND::node_sus_termstate_set(bool term_state) const > { > - for (const auto& su : node->list_of_su) { > + for (const auto& su : list_of_su) { > if (su->saAmfSUPreInstantiable == true) > su->set_term_state(term_state); > } > @@ -1326,7 +1326,7 @@ static void node_admin_op_cb(SaImmOiHand > goto done; > } > > - node_sus_termstate_set(node, true); > + node->node_sus_termstate_set(true); > node_admin_state_set(node, SA_AMF_ADMIN_LOCKED_INSTANTIATION); > > if (node->node_info.member == false) { > @@ -1374,7 +1374,7 @@ static void node_admin_op_cb(SaImmOiHand > goto done; > } > > - node_sus_termstate_set(node, false); > + node->node_sus_termstate_set(false); > node_admin_state_set(node, SA_AMF_ADMIN_LOCKED); > > if (node->node_info.member == false) { > diff --git a/osaf/services/saf/amf/amfd/nodegroup.cc > b/osaf/services/saf/amf/amfd/nodegroup.cc > --- a/osaf/services/saf/amf/amfd/nodegroup.cc > +++ b/osaf/services/saf/amf/amfd/nodegroup.cc > @@ -29,7 +29,6 @@ static AVD_AMF_NG *ng_create(SaNameT *dn > //TODO: Make below function members. > static void ng_admin_unlock_inst(AVD_AMF_NG *ng); > static void ng_unlock(AVD_AMF_NG *ng); > -static void node_sus_termstate_set(AVD_AVND *node, bool term_state); > > /** > * Lookup object in db using dn > @@ -601,7 +600,7 @@ static void ng_ccb_apply_delete_hdlr(Ccb > if ((node->saAmfNodeAdminState == > SA_AMF_ADMIN_LOCKED_INSTANTIATION) || > (any_ng_in_locked_in_state(node) == > true)) > continue; > - node_sus_termstate_set(node, false); > + node->node_sus_termstate_set(false); > } > //Instantiate SUs on nodes of NG. AMFD takes care of assignment > after instantiation. > ng_admin_unlock_inst(ng); > @@ -932,19 +931,6 @@ static void ng_unlock(AVD_AMF_NG *ng) > } > > /** > - * Set term_state for all pre-inst SUs hosted on the specified node > - * > - * @param node > - */ > -static void node_sus_termstate_set(AVD_AVND *node, bool term_state) > -{ > - for (const auto& su : node->list_of_su) { > - if (su->saAmfSUPreInstantiable == true) > - su->set_term_state(term_state); > - } > -} > - > -/** > * perform unlock-instantiation on NG with honoring saAmfSURank. > * > * @param cb > @@ -1079,7 +1065,7 @@ static void ng_admin_op_cb(SaImmOiHandle > node->admin_ng = ng; > if (node->saAmfNodeAdminState != SA_AMF_ADMIN_LOCKED) > continue; > - node_sus_termstate_set(node, true); > + node->node_sus_termstate_set(true); > node_admin_state_set(node, > SA_AMF_ADMIN_LOCKED_INSTANTIATION); > } > for (std::set<std::string>::const_iterator iter = > ng->saAmfNGNodeList.begin(); > @@ -1150,7 +1136,7 @@ static void ng_admin_op_cb(SaImmOiHandle > node->admin_ng = ng; > if (node->saAmfNodeAdminState != > SA_AMF_ADMIN_LOCKED_INSTANTIATION) > continue; > - node_sus_termstate_set(node, false); > + node->node_sus_termstate_set(false); > node_admin_state_set(node, SA_AMF_ADMIN_LOCKED); > } > ng_admin_unlock_inst(ng);
------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel