aboutsummaryrefslogtreecommitdiffstats
path: root/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-04-21 16:14:18 -0400
committerDan Timoney <dtimoney@att.com>2017-04-21 16:14:18 -0400
commit328d71305e529887d78bec5d028d54feaea737c1 (patch)
tree9c571511c9c7f402a84cac82cc41cee9f4e091cc /resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
parentec0f99bdd24468c1f662d6fcf6e2ca29b678da73 (diff)
[SDNC-5] Rebase SDN-C adaptors
Apply latest bug fixes, enhancements and port to OpenDaylight Boron. Change-Id: Ia7d29986eb12f98edbf075dae3cc9343af6791b6 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java')
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
index 2babeeb..2018d96 100644
--- a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
@@ -3,7 +3,7 @@
* openECOMP : SDN-C
* ================================================================================
* Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -66,11 +66,18 @@ public class OneMVrfCheck implements EquipmentCheck {
if (ai.resourceShareGroupList.contains(vrfName))
return true;
+ String resourceUnionId = serviceData.serviceInstanceId + '/' + serviceData.endPointPosition;
+
// Check if there is already another multicast VRF for the same VPN
VpnParam vpnp = VrfUtil.parseVrfInstanceName(vrfName);
r = resourceManager.getResource("MVRF", equipData.equipmentId);
- if (r != null && r.allocationItems != null)
+ if (r != null && r.allocationItems != null) {
for (AllocationItem ai : r.allocationItems) {
+
+ // Skip the allocation item for the current service instance, if there, in case it is a change order
+ if (ai.resourceUnionId.equals(resourceUnionId))
+ continue;
+
if (ai.resourceShareGroupList != null && ai.resourceShareGroupList.size() > 0) {
String vrfName2 = ai.resourceShareGroupList.iterator().next();
VpnParam vpnp2 = VrfUtil.parseVrfInstanceName(vrfName2);
@@ -82,6 +89,7 @@ public class OneMVrfCheck implements EquipmentCheck {
}
}
}
+ }
return true;
}