Ack(Reviewed).

Thanks
-Nagu
> -----Original Message-----
> From: Hans Feldt [mailto:[email protected]]
> Sent: 10 April 2014 18:24
> To: [email protected]; Praveen Malviya; Nagendra Kumar
> Cc: [email protected]
> Subject: [PATCH 3 of 6] amfd: add SU susi manipulation methods [#713]
> 
>  osaf/services/saf/amf/amfd/include/su.h |   3 +
>  osaf/services/saf/amf/amfd/su.cc        |  55
> +++++++++++++++++++++++++++++++++
>  2 files changed, 58 insertions(+), 0 deletions(-)
> 
> 
> same functionality as function avd_sg_su_asgn_del_util but split into three
> SU methods instead.
> 
> diff --git a/osaf/services/saf/amf/amfd/include/su.h
> b/osaf/services/saf/amf/amfd/include/su.h
> --- a/osaf/services/saf/amf/amfd/include/su.h
> +++ b/osaf/services/saf/amf/amfd/include/su.h
> @@ -111,6 +111,9 @@ class AVD_SU {
>       AVD_SU *su_list_su_type_next;
> 
>       void oper_state_set(SaAmfOperationalStateT state);
> +     void delete_all_susis(void);
> +     void set_all_susis_assigned_quiesced(void);
> +     void set_all_susis_assigned(void);
>  };
> 
>  typedef struct {
> diff --git a/osaf/services/saf/amf/amfd/su.cc
> b/osaf/services/saf/amf/amfd/su.cc
> --- a/osaf/services/saf/amf/amfd/su.cc
> +++ b/osaf/services/saf/amf/amfd/su.cc
> @@ -1680,3 +1680,58 @@ void su_nd_attribute_update(const AVD_SU
> 
>       TRACE_LEAVE();
>  }
> +
> +/**
> + * Delete all SUSIs assigned to the SU.
> + *
> + */
> +void AVD_SU::delete_all_susis(void) {
> +     TRACE_ENTER2("'%s'", this->name.value);
> +
> +     while (this->list_of_susi != NULL) {
> +             avd_compcsi_delete(avd_cb, this->list_of_susi, false);
> +             m_AVD_SU_SI_TRG_DEL(avd_cb, this->list_of_susi);
> +     }
> +
> +     this->saAmfSUNumCurrStandbySIs = 0;
> +     this->saAmfSUNumCurrActiveSIs = 0;
> +     m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb, this,
> AVSV_CKPT_AVD_SU_CONFIG);
> +
> +     TRACE_LEAVE();
> +}
> +
> +void AVD_SU::set_all_susis_assigned_quiesced(void) {
> +     AVD_SU_SI_REL *susi = this->list_of_susi;
> +
> +     TRACE_ENTER2("'%s'", this->name.value);
> +
> +     for (; susi != NULL; susi = susi->su_next) {
> +             if (susi->fsm != AVD_SU_SI_STATE_UNASGN) {
> +                     susi->state = SA_AMF_HA_QUIESCED;
> +                     susi->fsm = AVD_SU_SI_STATE_ASGND;
> +                     m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb,
> susi, AVSV_CKPT_AVD_SI_ASS);
> +                     avd_gen_su_ha_state_changed_ntf(avd_cb, susi);
> +                     avd_susi_update_assignment_counters(susi,
> AVSV_SUSI_ACT_MOD,
> +                                     SA_AMF_HA_QUIESCING,
> SA_AMF_HA_QUIESCED);
> +                     avd_pg_susi_chg_prc(avd_cb, susi);
> +             }
> +     }
> +
> +     TRACE_LEAVE();
> +}
> +
> +void AVD_SU::set_all_susis_assigned(void) {
> +     AVD_SU_SI_REL *susi = this->list_of_susi;
> +
> +     TRACE_ENTER2("'%s'", this->name.value);
> +
> +     for (; susi != NULL; susi = susi->su_next) {
> +             if (susi->fsm != AVD_SU_SI_STATE_UNASGN) {
> +                     susi->fsm = AVD_SU_SI_STATE_ASGND;
> +                     m_AVSV_SEND_CKPT_UPDT_ASYNC_UPDT(avd_cb,
> susi, AVSV_CKPT_AVD_SI_ASS);
> +                     avd_pg_susi_chg_prc(avd_cb, susi);
> +             }
> +     }
> +
> +     TRACE_LEAVE();
> +}

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to