AMFD allows deletion of nodeswbundle object if SU is in locked_in state.

Patch allows deletion of nodeswbundle when SG or Node is in locked_in state.
---
 src/amf/amfd/nodeswbundle.cc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/amf/amfd/nodeswbundle.cc b/src/amf/amfd/nodeswbundle.cc
index ed0c0b9..d1b6866 100644
--- a/src/amf/amfd/nodeswbundle.cc
+++ b/src/amf/amfd/nodeswbundle.cc
@@ -87,12 +87,16 @@ static int is_swbdl_delete_ok_for_node(const std::string 
&bundle_dn_to_delete,
       if (bundle_dn_to_delete.compare(Amf::to_string(&bundle_dn)) == 0) {
         if (su->su_on_node->node_state == AVD_AVND_STATE_ABSENT ||
             (!su->sg_of_su->sg_ncs_spec &&
-             (comp->su->saAmfSUAdminState ==
-              SA_AMF_ADMIN_LOCKED_INSTANTIATION))) {
+             ((comp->su->saAmfSUAdminState ==
+              SA_AMF_ADMIN_LOCKED_INSTANTIATION) ||
+              (comp->su->sg_of_su->saAmfSGAdminState ==
+              SA_AMF_ADMIN_LOCKED_INSTANTIATION) ||
+              (comp->su->su_on_node->saAmfNodeAdminState ==
+              SA_AMF_ADMIN_LOCKED_INSTANTIATION)))) {
           continue;
         } else {
           report_ccb_validation_error(
-              opdata, "'%s' admin state is not locked instantiaion",
+              opdata, "'%s', None of SG, SU or Node is in LOCK_IN state.",
               su->name.c_str());
           return 0;
         }
-- 
1.9.1


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to