osaf/services/saf/amf/amfd/sg.cc | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
amfd disallows changing saAmfSGMaxStandbySIsperSU while the SG is UNLOCKED
A check is performed in the code to disallow it.
Code needs to be added to handle the modification.
diff --git a/osaf/services/saf/amf/amfd/sg.cc b/osaf/services/saf/amf/amfd/sg.cc
--- a/osaf/services/saf/amf/amfd/sg.cc
+++ b/osaf/services/saf/amf/amfd/sg.cc
@@ -722,6 +722,24 @@ static SaAisErrorT ccb_completed_modify_
goto done;
}
}
+ } else if (!strcmp(attribute->attrName,
"saAmfSGMaxStandbySIsperSU")) {
+ if (value_is_deleted == true)
+ continue;
+ uint32_t max_standby_sis =
*static_cast<SaUint32T *>(value);
+
+ if (sg->sg_redundancy_model !=
SA_AMF_NPM_REDUNDANCY_MODEL) {
+ report_ccb_validation_error(opdata,
+ "%s: saAmfSGMaxStandbySIsperSU
for non-N+M model cannot"
+ " be modified when SG is
unlocked", __FUNCTION__);
+ rc = SA_AIS_ERR_BAD_OPERATION;
+ goto done;
+ } else if (max_standby_sis <
sg->saAmfSGMaxStandbySIsperSU) {
+ report_ccb_validation_error(opdata,
+ "%s: Cannot decrease
saAmfSGMaxStandbySIsperSU while SG"
+ " is unlocked ", __FUNCTION__);
+ rc = SA_AIS_ERR_BAD_OPERATION;
+ goto done;
+ }
} else {
report_ccb_validation_error(opdata,
"%s: Attribute '%s' cannot be modified
when SG is unlocked",
@@ -1076,6 +1094,11 @@ static void ccb_apply_modify_hdlr(CcbUti
}
}
}
+ } else if (!strcmp(attribute->attrName,
"saAmfSGMaxStandbySIsperSU")) {
+ if (value_is_deleted)
+ sg->saAmfSGMaxStandbySIsperSU = -1;
+ else
+ sg->saAmfSGMaxStandbySIsperSU =
*static_cast<SaUint32T *>(value);
} else {
osafassert(0);
}
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel