Ack with minor comment: In first page, do we need to update " Release 4.7 Programmer's Reference October 2015"?
Thanks, Minh On 07/04/16 16:12, praveen malviya wrote: > Hi All, > > Please find attached AMF PR doc updated for #1533. > Only one minor change is done in section 2.2.10.1 Scope of Admin > operation on Nodegroup: > > Earlier text was: > "Delete CCB operation is allowed on node group in LOCKED or UNLOCKED > admin state and ..........." > > Now since nodegroup can be deleted in lock-in state: > "Delete CCB operation is allowed on node group in LOCKED, UNLOCKED and > LOCK-IN admin state and ........." > > > Thanks, > Praveen > > On 01-Mar-16 6:17 PM, Hans Nordebäck wrote: >> 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); >> ------------------------------------------------------------------------------ _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel