Fix delete of generic neutron network 71/91971/1
authorEric Multanen <eric.w.multanen@intel.com>
Thu, 25 Jul 2019 05:36:13 +0000 (22:36 -0700)
committerEric Multanen <eric.w.multanen@intel.com>
Thu, 25 Jul 2019 05:36:13 +0000 (22:36 -0700)
Delete of Generic Neutron network was not working.
Logic checking for association with vf-module appears to
have been reversed.

Change-Id: If541c1133322f75c70f86cd77d8bccd88b94f356
Issue-ID: SO-2082
Signed-off-by: Eric Multanen <eric.w.multanen@intel.com>
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteNetworkInstance.groovy

index 21f9484..df8735a 100644 (file)
@@ -267,7 +267,7 @@ public class DoDeleteNetworkInstance extends AbstractServiceTaskProcessor {
                                execution.setVariable(Prefix + "queryAAIResponse", l3Network.get())
                                execution.setVariable(Prefix + "isAAIGood", true)
                                if (relationships.isPresent()){
-                                       if(relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()){
+                                       if(!relationships.get().getRelatedAAIUris(AAIObjectType.VF_MODULE).isEmpty()){
                                                execution.setVariable(Prefix + "isVfRelationshipExist", true)
                                                isVfRelationshipExist = true
                                                String relationshipMessage = "AAI Query Success Response but 'vf-module' relationship exist, not allowed to delete: network Id: " + networkId