Ack with:
Amf PR doc update for SU creation in locked state and deletion in unlocked 
state if sg/node admin state is locked-in or node is absent.

Thanks
-Nagu

> -----Original Message-----
> From: Hans Feldt [mailto:hans.fe...@ericsson.com]
> Sent: 04 July 2014 15:41
> To: Praveen Malviya
> Cc: opensaf-devel@lists.sourceforge.net
> Subject: [devel] [PATCH 1 of 1] amfd: allow deletion of UNLOCKED SUs [#911]
> 
>  osaf/services/saf/amf/amfd/su.cc |  19 ++++++++++++++++---
>  1 files changed, 16 insertions(+), 3 deletions(-)
> 
> 
> 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
> @@ -1361,9 +1361,21 @@ static SaAisErrorT su_ccb_completed_dele
>       su = su_db->find(Amf::to_string(&opdata->objectName));
>       osafassert(su != NULL);
> 
> -     if (is_app_su && (su->saAmfSUAdminState !=
> SA_AMF_ADMIN_LOCKED_INSTANTIATION)) {
> -             report_ccb_validation_error(opdata, "Admin state is not
> locked instantiation required for deletion");
> -             goto done;
> +     if (is_app_su) {
> +             if (su->su_on_node->node_state ==
> AVD_AVND_STATE_ABSENT)
> +                     goto done_ok;
> +
> +             if (su->su_on_node->saAmfNodeAdminState ==
> SA_AMF_ADMIN_LOCKED_INSTANTIATION)
> +                     goto done_ok;
> +
> +             if (su->sg_of_su->saAmfSGAdminState ==
> SA_AMF_ADMIN_LOCKED_INSTANTIATION)
> +                     goto done_ok;
> +
> +             if (su->saAmfSUAdminState !=
> SA_AMF_ADMIN_LOCKED_INSTANTIATION) {
> +                     report_ccb_validation_error(opdata,
> +                             "Admin state is not locked instantiation
> required for deletion");
> +                     goto done;
> +             }
>       }
> 
>       if (!is_app_su && (su->su_on_node->node_state !=
> AVD_AVND_STATE_ABSENT)) {
> @@ -1371,6 +1383,7 @@ static SaAisErrorT su_ccb_completed_dele
>               goto done;
>       }
> 
> +done_ok:
>       rc = SA_AIS_OK;
>       opdata->userData = su;
> 
> 
> ------------------------------------------------------------------------------
> Open source business process management suite built on Java and Eclipse
> Turn processes into business applications with Bonita BPM Community Edition
> Quickly connect people, data, and systems into organized workflows
> Winner of BOSSIE, CODIE, OW2 and Gartner awards
> http://p.sf.net/sfu/Bonitasoft
> _______________________________________________
> Opensaf-devel mailing list
> Opensaf-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/opensaf-devel

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to