osaf/services/saf/amf/amfd/include/app.h | 6 ++-- osaf/services/saf/amf/amfd/include/sg.h | 31 ++++++++++++++-------------- osaf/services/saf/amf/amfd/include/si.h | 14 ++++++------ osaf/services/saf/amf/amfd/include/si_dep.h | 22 ++++++++++---------- osaf/services/saf/amf/amfd/include/susi.h | 2 +- 5 files changed, 38 insertions(+), 37 deletions(-)
Convert all references to avd_si_tag. diff --git a/osaf/services/saf/amf/amfd/include/app.h b/osaf/services/saf/amf/amfd/include/app.h --- a/osaf/services/saf/amf/amfd/include/app.h +++ b/osaf/services/saf/amf/amfd/include/app.h @@ -39,15 +39,15 @@ typedef struct avd_app_tag { SaAmfAdminStateT saAmfApplicationAdminState; SaUint32T saAmfApplicationCurrNumSGs; struct avd_sg_tag *list_of_sg; - struct avd_si_tag *list_of_si; + AVD_SI *list_of_si; struct avd_app_tag *app_type_list_app_next; struct avd_app_type_tag *app_type; } AVD_APP; extern AmfDb<std::string, AVD_APP> *app_db; -extern void avd_app_add_si(AVD_APP *app, struct avd_si_tag *si); -extern void avd_app_remove_si(AVD_APP *app, struct avd_si_tag *si); +extern void avd_app_add_si(AVD_APP *app, AVD_SI *si); +extern void avd_app_remove_si(AVD_APP *app, AVD_SI *si); extern void avd_app_add_sg(AVD_APP *app, struct avd_sg_tag *sg); extern void avd_app_remove_sg(AVD_APP *app, struct avd_sg_tag *sg); extern SaAisErrorT avd_app_config_get(void); 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 @@ -44,6 +44,7 @@ #include "db_template.h" class AVD_SU; +class AVD_SI; /* The valid SG FSM states. */ typedef enum { @@ -161,11 +162,11 @@ typedef struct avd_sg_tag { * Checkpointing - Updated independently. */ - struct avd_si_tag *admin_si; /* Applicable when sg_fsm_state has - * AVD_SG_FSM_SI_OPER.It will contain - * the SI undergoing admin - * operation. - */ + AVD_SI *admin_si; /* Applicable when sg_fsm_state has + * AVD_SG_FSM_SI_OPER.It will contain + * the SI undergoing admin + * operation. + */ AVD_SG_OPER su_oper_list; /* The list of SUs that have operations * happening on them used in parallel @@ -181,10 +182,10 @@ typedef struct avd_sg_tag { * group in the descending order of * the rank. */ - struct avd_si_tag *list_of_si; /* the list of service instances in - * this group in the descending order - * of the rank. - */ + AVD_SI *list_of_si; /* the list of service instances in + * this group in the descending order + * of the rank. + */ struct avd_sg_tag *sg_list_sg_type_next; struct avd_amf_sg_type_tag *sg_type; @@ -195,7 +196,7 @@ typedef struct avd_sg_tag { in Nway, N+M and Nway-Act Red models.*/ AVD_SU *max_assigned_su; AVD_SU *min_assigned_su; - struct avd_si_tag *si_tobe_redistributed; + AVD_SI *si_tobe_redistributed; uint32_t try_inst_counter; /* It should be used when amfd try to send instantiate command to amfnd in a loop for all those SUs hosted on a particular @@ -212,13 +213,13 @@ typedef struct avd_sg_tag { uint32_t (*realign)(AVD_CL_CB *cb, struct avd_sg_tag *sg); // Handle new SI or admin op UNLOCK of SI - uint32_t (*si_func)(AVD_CL_CB *cb, struct avd_si_tag *si); + uint32_t (*si_func)(AVD_CL_CB *cb, AVD_SI *si); // Handle SI admin op LOCK/SHUTDOWN - uint32_t (*si_admin_down)(AVD_CL_CB *cb, struct avd_si_tag *si); + uint32_t (*si_admin_down)(AVD_CL_CB *cb, AVD_SI *si); // Handle SI admin op SWAP - SaAisErrorT (*si_swap)(struct avd_si_tag *si, SaInvocationT invocation); + SaAisErrorT (*si_swap)(AVD_SI *si, SaInvocationT invocation); // Handle SG admin op LOCK/SHUTDOWN uint32_t (*sg_admin_down)(AVD_CL_CB *cb, struct avd_sg_tag *sg); @@ -319,8 +320,8 @@ extern AVD_SG *avd_sg_new(const SaNameT extern void avd_sg_delete(AVD_SG *sg); extern void avd_sg_db_add(AVD_SG *sg); extern void avd_sg_db_remove(AVD_SG *sg); -extern void avd_sg_add_si(AVD_SG *sg, struct avd_si_tag *si); -extern void avd_sg_remove_si(AVD_SG *sg, struct avd_si_tag *si); +extern void avd_sg_add_si(AVD_SG *sg, AVD_SI *si); +extern void avd_sg_remove_si(AVD_SG *sg, AVD_SI *si); extern SaAisErrorT avd_sg_config_get(const SaNameT *app_dn, struct avd_app_tag *app); extern void avd_sg_add_su(AVD_SU *su); extern void avd_sg_remove_su(AVD_SU *su); diff --git a/osaf/services/saf/amf/amfd/include/si.h b/osaf/services/saf/amf/amfd/include/si.h --- a/osaf/services/saf/amf/amfd/include/si.h +++ b/osaf/services/saf/amf/amfd/include/si.h @@ -67,8 +67,8 @@ typedef struct avd_sirankedsu { * This data structure lives in the AvD and reflects data points * associated with the Service Instance (SI) on the AvD. */ -typedef struct avd_si_tag { - +class AVD_SI { +public: SaNameT name; /******************** B.04 model *************************************************/ @@ -92,22 +92,22 @@ typedef struct avd_si_tag { struct avd_sg_tag *sg_of_si; /* the service group of this SI */ struct avd_csi_tag *list_of_csi; /* The list of CSIs in the SI */ - struct avd_si_tag *sg_list_of_si_next; /* next SI in the SG list of SIs */ + AVD_SI *sg_list_of_si_next; /* next SI in the SG list of SIs */ struct avd_su_si_rel_tag *list_of_sisu; /* the list of su si relationship elements */ AVD_SI_DEP_STATE si_dep_state; /* SI-SI dep state of this SI */ struct avd_spons_si_tag *spons_si_list; uint32_t num_dependents; /* number of dependent SIs */ uint32_t tol_timer_count; struct avd_amf_svc_type_tag *svc_type; - struct avd_si_tag *si_list_svc_type_next; + AVD_SI *si_list_svc_type_next; struct avd_app_tag *app; - struct avd_si_tag *si_list_app_next; + AVD_SI *si_list_app_next; struct avd_sus_per_si_rank_tag *list_of_sus_per_si_rank; avd_sirankedsu_t *rankedsu_list_head; SaInvocationT invocation; uint32_t alarm_sent; /* SI unassigned alarm has been sent */ -} AVD_SI; +}; typedef struct avd_amf_svc_type_tag { @@ -115,7 +115,7 @@ typedef struct avd_amf_svc_type_tag { SaNameT name; char **saAmfSvcDefActiveWeight; char **saAmfSvcDefStandbyWeight; - struct avd_si_tag *list_of_si; + AVD_SI *list_of_si; } AVD_SVC_TYPE; diff --git a/osaf/services/saf/amf/amfd/include/si_dep.h b/osaf/services/saf/amf/amfd/include/si_dep.h --- a/osaf/services/saf/amf/amfd/include/si_dep.h +++ b/osaf/services/saf/amf/amfd/include/si_dep.h @@ -79,7 +79,7 @@ typedef struct avd_si_si_dep { /* Spons-SI node of the spons-list in SI struct */ typedef struct avd_spons_si_tag { - struct avd_si_tag *si; + AVD_SI *si; AVD_SI_SI_DEP *sidep_rec; struct avd_spons_si_tag *next; } AVD_SPONS_SI_NODE; @@ -94,22 +94,22 @@ uint32_t sidep_del_row(AVD_CL_CB *cb, AV void avd_sidep_tol_tmr_evh(AVD_CL_CB *cb, struct avd_evt_tag *evt); void avd_sidep_assign_evh(AVD_CL_CB *cb, struct avd_evt_tag *evt); void avd_sidep_unassign_evh(AVD_CL_CB *cb, struct avd_evt_tag *evt); -void sidep_si_screen_si_dependencies(struct avd_si_tag *si); +void sidep_si_screen_si_dependencies(AVD_SI *si); void avd_sidep_update_si_dep_state_for_all_sis(struct avd_sg_tag *sg); -void sidep_stop_tol_timer(AVD_CL_CB *cb, struct avd_si_tag *si); +void sidep_stop_tol_timer(AVD_CL_CB *cb, AVD_SI *si); extern SaAisErrorT avd_sidep_config_get(void); extern void avd_sidep_constructor(void); -extern void avd_sidep_reset_dependents_depstate_in_sufault(struct avd_si_tag *si); -extern void avd_sidep_si_dep_state_set(struct avd_si_tag *si, AVD_SI_DEP_STATE state); +extern void avd_sidep_reset_dependents_depstate_in_sufault(AVD_SI *si); +extern void avd_sidep_si_dep_state_set(AVD_SI *si, AVD_SI_DEP_STATE state); extern bool avd_sidep_is_su_failover_possible(AVD_SU *su); -extern bool avd_sidep_is_si_failover_possible(struct avd_si_tag *si, AVD_SU *su); +extern bool avd_sidep_is_si_failover_possible(AVD_SI *si, AVD_SU *su); extern void avd_sidep_update_depstate_su_rolefailover(AVD_SU *su); -extern void avd_sidep_update_depstate_si_failover(struct avd_si_tag *si, AVD_SU *su); +extern void avd_sidep_update_depstate_si_failover(AVD_SI *si, AVD_SU *su); extern bool avd_sidep_si_dependency_exists_within_su(const AVD_SU *su); -extern void avd_sidep_send_active_to_dependents(const struct avd_si_tag *si); -extern bool avd_sidep_quiesced_done_for_all_dependents(const struct avd_si_tag *si, const AVD_SU *su); -extern void sidep_take_action_on_dependents(struct avd_si_tag *si); -extern bool avd_sidep_sponsors_assignment_states(struct avd_si_tag *si); +extern void avd_sidep_send_active_to_dependents(const AVD_SI *si); +extern bool avd_sidep_quiesced_done_for_all_dependents(const AVD_SI *si, const AVD_SU *su); +extern void sidep_take_action_on_dependents(AVD_SI *si); +extern bool avd_sidep_sponsors_assignment_states(AVD_SI *si); extern void sidep_si_take_action(AVD_SI *si); extern void sidep_update_si_self_dep_state(AVD_SI *si); extern void sidep_update_dependents_states(AVD_SI *si); diff --git a/osaf/services/saf/amf/amfd/include/susi.h b/osaf/services/saf/amf/amfd/include/susi.h --- a/osaf/services/saf/amf/amfd/include/susi.h +++ b/osaf/services/saf/amf/amfd/include/susi.h @@ -88,7 +88,7 @@ typedef struct avd_sus_per_si_rank_tag { NCS_PATRICIA_NODE tree_node; /* key will be the SI name and Rank */ AVD_SUS_PER_SI_RANK_INDX indx; /* Table index */ SaNameT su_name; /* name of the SU as SaNameT */ - struct avd_si_tag *sus_per_si_rank_on_si; + AVD_SI *sus_per_si_rank_on_si; struct avd_sus_per_si_rank_tag *sus_per_si_rank_list_si_next; } AVD_SUS_PER_SI_RANK; ------------------------------------------------------------------------------ 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