osaf/services/saf/amf/amfd/include/ntf.h | 1 +
osaf/services/saf/amf/amfd/ntf.cc | 11 ++++++++++-
2 files changed, 11 insertions(+), 1 deletions(-)
Now AMF includes old state also while generating notifications for change in
admin state, operational state, presence state, HA state and assignment state
of applicable AMF entities.
See #106 for sample notifications.
diff --git a/osaf/services/saf/amf/amfd/include/ntf.h
b/osaf/services/saf/amf/amfd/include/ntf.h
--- a/osaf/services/saf/amf/amfd/include/ntf.h
+++ b/osaf/services/saf/amf/amfd/include/ntf.h
@@ -85,6 +85,7 @@ uint32_t sendStateChangeNotificationAvd(
SaUint16T minorId,
uint32_t sourceIndicator,
SaUint16T stateId,
+ SaUint16T oldState,
SaUint16T newState,
NCSCONTEXT add_info,
int type); /* add_info 0 --> no,
1--> node_name, 2--> si_name*/
diff --git a/osaf/services/saf/amf/amfd/ntf.cc
b/osaf/services/saf/amf/amfd/ntf.cc
--- a/osaf/services/saf/amf/amfd/ntf.cc
+++ b/osaf/services/saf/amf/amfd/ntf.cc
@@ -217,6 +217,7 @@ void avd_send_admin_state_chg_ntf(const
minor_id,
SA_NTF_MANAGEMENT_OPERATION,
SA_AMF_ADMIN_STATE,
+ old_state,
new_state,
NULL,
0);
@@ -252,6 +253,7 @@ void avd_send_oper_chg_ntf(const SaNameT
minor_id,
SA_NTF_OBJECT_OPERATION,
SA_AMF_OP_STATE,
+ old_state,
new_state,
NULL,
0);
@@ -286,6 +288,7 @@ void avd_send_su_pres_state_chg_ntf(cons
SA_AMF_NTFID_SU_PRESENCE_STATE,
SA_NTF_OBJECT_OPERATION,
SA_AMF_PRESENCE_STATE,
+ old_state,
new_state,
NULL,
0);
@@ -324,6 +327,7 @@ void avd_send_su_ha_state_chg_ntf(const
SA_AMF_NTFID_SU_SI_HA_STATE,
SA_NTF_OBJECT_OPERATION,
SA_AMF_HA_STATE,
+ old_state,
new_state,
(NCSCONTEXT)si_name,
2 /* Si_name */);
@@ -360,6 +364,7 @@ void avd_send_su_ha_readiness_state_chg_
SA_AMF_NTFID_SU_SI_HA_READINESS_STATE,
SA_NTF_OBJECT_OPERATION,
SA_AMF_HA_READINESS_STATE,
+ old_state,
new_state,
(NCSCONTEXT)si_name,
2 /* Si_name */);
@@ -394,6 +399,7 @@ void avd_send_si_assigned_ntf(const SaNa
SA_AMF_NTFID_SI_ASSIGNMENT_STATE,
SA_NTF_OBJECT_OPERATION,
SA_AMF_ASSIGNMENT_STATE,
+ old_state,
new_state,
NULL,
0);
@@ -430,6 +436,7 @@ void avd_send_comp_proxy_status_proxied_
SA_AMF_NTFID_COMP_PROXY_STATUS,
SA_NTF_OBJECT_OPERATION,
SA_AMF_PROXY_STATUS,
+ old_status,
new_status,
NULL,
0);
@@ -620,6 +627,7 @@ uint32_t sendStateChangeNotificationAvd(
SaUint16T minorId,
uint32_t sourceIndicator,
SaUint16T stateId,
+ SaUint16T oldstate,
SaUint16T newState,
NCSCONTEXT add_info,
int type)
@@ -677,7 +685,8 @@ uint32_t sendStateChangeNotificationAvd(
*(myStateNotification.sourceIndicator) =
static_cast<SaNtfSourceIndicatorT>(sourceIndicator);
myStateNotification.changedStates->stateId = stateId;
- myStateNotification.changedStates->oldStatePresent = SA_FALSE;
+ myStateNotification.changedStates->oldStatePresent = SA_TRUE;
+ myStateNotification.changedStates->oldState = oldstate;
myStateNotification.changedStates->newState = newState;
status = saNtfNotificationSend(myStateNotification.notificationHandle);
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel