This patch is bypassing a combination of SU in unlocked state, node in unlocked
state and SG in unlocked state and adding into Amf DB(while adding in single
CCB).
So, ideally, any one of the SU, SG and Node should be in locked-in state when
SU is being added dynamically(adding in single CCB).
The following extra modification is required:
} else {
SaAmfAdminStateT admin_state;
(void) immutil_getAttr("saAmfNodeAdminState",
tmp->param.create.attrValues, 0,
&admin_state);
if (admin_state != SA_AMF_ADMIN_LOCKED_INSTANTIATION) {
TRACE("Create '%s', configured node '%s' is not
locked instantiation",
su_dn->value, node_name.value);
return false;
}
Thanks
-Nagu
> -----Original Message-----
> From: Gary Lee [mailto:[email protected]]
> Sent: 25 August 2015 11:54
> To: Nagendra Kumar; [email protected]; Praveen Malviya;
> [email protected]
> Cc: [email protected]
> Subject: [PATCH 1 of 4] amfd: allow SU to be created [#1458]
>
> osaf/services/saf/amf/amfd/su.cc | 26 ++++++++++++++------------
> 1 files changed, 14 insertions(+), 12 deletions(-)
>
>
> allow SU to be created on a non-existent node, as long as that node is also
> created in the same CCB
>
> 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
> @@ -1482,18 +1482,20 @@
>
> const AVD_AVND *node = avd_node_get(&node_name);
> if (node == NULL) {
> - // node must exist in the current model, not created in the
> same CCB
> - amflog(SA_LOG_SEV_WARNING,
> - "Create '%s', configured with a non existing node
> (%s)",
> - su_dn->value, node_name.value);
> - return false;
> - }
> -
> - // configured with a node DN, accept only locked-in state
> - if (node->saAmfNodeAdminState !=
> SA_AMF_ADMIN_LOCKED_INSTANTIATION) {
> - TRACE("Create '%s', configured node '%s' is not locked
> instantiation",
> - su_dn->value, node_name.value);
> - return false;
> + if (opdata == NULL || ccbutil_getCcbOpDataByDN(opdata-
> >ccbId, &node_name) == NULL) {
> + // node must exist in the current model, or created in
> the same CCB
> + amflog(SA_LOG_SEV_WARNING,
> + "Create '%s', configured with a non existing
> node (%s)",
> + su_dn->value, node_name.value);
> + return false;
> + }
> + } else {
> + // configured with a node DN, accept only locked-in state
> + if (node->saAmfNodeAdminState !=
> SA_AMF_ADMIN_LOCKED_INSTANTIATION) {
> + TRACE("Create '%s', configured node '%s' is not locked
> instantiation",
> + su_dn->value, node_name.value);
> + return false;
> + }
> }
>
> return true;
------------------------------------------------------------------------------
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel