summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
71aa0aa)
- When the service/interface is deleted, the 7.1
port-mapping data is not updated and still shows the
supporting ODUCn/OTUCn interfaces.
- Add code to update data for the supporting
interfaces, after deletion.
JIRA: TRNSPRTPCE-608
Change-Id: Ie0af185285f645c2d52d88699ba538bdf207a66b
Signed-off-by: Balagangadhar Bathula <bb4341@att.com>
(cherry picked from commit
a2c0845af51f68102d9f32df83cdfa93fbf9bb35)
import org.opendaylight.transportpce.common.Timeouts;
import org.opendaylight.transportpce.common.device.DeviceTransaction;
import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
import org.opendaylight.transportpce.common.Timeouts;
import org.opendaylight.transportpce.common.device.DeviceTransaction;
import org.opendaylight.transportpce.common.device.DeviceTransactionManager;
+import org.opendaylight.transportpce.common.mapping.PortMapping;
+import org.opendaylight.transportpce.common.mapping.PortMappingVersion710;
+import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.portmapping.rev220114.mapping.Mapping;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.pack.Ports;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.pack.PortsKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.packs.CircuitPacks;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.pack.Ports;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.pack.PortsKey;
import org.opendaylight.yang.gen.v1.http.org.openroadm.device.rev200529.circuit.packs.CircuitPacks;
private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmInterfacesImpl710.class);
private final DeviceTransactionManager deviceTransactionManager;
private static final Logger LOG = LoggerFactory.getLogger(OpenRoadmInterfacesImpl710.class);
private final DeviceTransactionManager deviceTransactionManager;
+ private final PortMapping portMapping;
+ private final PortMappingVersion710 portMapping710;
- public OpenRoadmInterfacesImpl710(DeviceTransactionManager deviceTransactionManager) {
+ public OpenRoadmInterfacesImpl710(DeviceTransactionManager deviceTransactionManager,
+ PortMapping portMapping, PortMappingVersion710 portMapping710) {
this.deviceTransactionManager = deviceTransactionManager;
this.deviceTransactionManager = deviceTransactionManager;
+ this.portMapping = portMapping;
+ this.portMapping710 = portMapping710;
}
public void postInterface(String nodeId, InterfaceBuilder ifBuilder) throws OpenRoadmInterfaceException {
}
public void postInterface(String nodeId, InterfaceBuilder ifBuilder) throws OpenRoadmInterfaceException {
if (intf2Delete.getName().contains(StringConstants.CLIENT_TOKEN) || intf2Delete.getName().contains(
StringConstants.NETWORK_TOKEN)) {
postEquipmentState(nodeId, intf2Delete.getSupportingCircuitPackName(), false);
if (intf2Delete.getName().contains(StringConstants.CLIENT_TOKEN) || intf2Delete.getName().contains(
StringConstants.NETWORK_TOKEN)) {
postEquipmentState(nodeId, intf2Delete.getSupportingCircuitPackName(), false);
+ // Here we update the port-mapping data after the interface delete
+ Mapping oldMapping = this.portMapping.getMapping(
+ nodeId, intf2Delete.getSupportingCircuitPackName(), intf2Delete.getSupportingPort());
+ this.portMapping.deleteMapping(nodeId, oldMapping.getLogicalConnectionPoint());
+ this.portMapping710.updateMapping(nodeId, oldMapping);
<bean id="openRoadmInterfaces710" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl710" >
<argument ref="deviceTransactionManager" />
<bean id="openRoadmInterfaces710" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl710" >
<argument ref="deviceTransactionManager" />
+ <argument ref="portMapping" />
+ <argument ref="portMapping710" />
</bean>
<bean id="openRoadmInterfaces" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl" >
</bean>
<bean id="openRoadmInterfaces" class="org.opendaylight.transportpce.common.openroadminterfaces.OpenRoadmInterfacesImpl" >
OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221 = new OpenRoadmInterfacesImpl221(
deviceTransactionManager, portMapping, portMapping.getPortMappingVersion221());
OpenRoadmInterfacesImpl710 openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(
OpenRoadmInterfacesImpl221 openRoadmInterfacesImpl221 = new OpenRoadmInterfacesImpl221(
deviceTransactionManager, portMapping, portMapping.getPortMappingVersion221());
OpenRoadmInterfacesImpl710 openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(
- deviceTransactionManager);
+ deviceTransactionManager, portMapping, portMapping.getPortMappingVersion710());
return new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils, openRoadmInterfacesImpl121,
openRoadmInterfacesImpl221, openRoadmInterfacesImpl710);
}
return new OpenRoadmInterfacesImpl(deviceTransactionManager, mappingUtils, openRoadmInterfacesImpl121,
openRoadmInterfacesImpl221, openRoadmInterfacesImpl710);
}
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
- this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager);
+ this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
- this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager);
+ this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
- this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager);
+ this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
this.openRoadmInterfacesImpl121 = new OpenRoadmInterfacesImpl121(deviceTransactionManager);
this.openRoadmInterfacesImpl22 = new OpenRoadmInterfacesImpl221(deviceTransactionManager, this.portMapping,
this.portMappingVersion22);
- this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager);
+ this.openRoadmInterfacesImpl710 = new OpenRoadmInterfacesImpl710(deviceTransactionManager, this.portMapping,
+ this.portMappingVersion710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);
this.openRoadmInterfaces = new OpenRoadmInterfacesImpl((this.deviceTransactionManager),
this.mappingUtils,this.openRoadmInterfacesImpl121,this.openRoadmInterfacesImpl22,
this.openRoadmInterfacesImpl710);