public class HwvtepPhysicalSwitchRemoveCommand extends AbstractTransactionCommand {
- public HwvtepPhysicalSwitchRemoveCommand(HwvtepConnectionInstance key, TableUpdates updates, DatabaseSchema dbSchema) {
+ public HwvtepPhysicalSwitchRemoveCommand(HwvtepConnectionInstance key, TableUpdates updates,
+ DatabaseSchema dbSchema) {
super(key, updates, dbSchema);
}
public void execute(ReadWriteTransaction transaction) {
Collection<PhysicalSwitch> deletedPSRows =
TyperUtils.extractRowsRemoved(PhysicalSwitch.class, getUpdates(), getDbSchema()).values();
- for (PhysicalSwitch pSwitch : deletedPSRows) {
+ for (PhysicalSwitch phySwitch : deletedPSRows) {
InstanceIdentifier<Node> nodeIid = HwvtepSouthboundMapper.createInstanceIdentifier(
- getOvsdbConnectionInstance(), pSwitch);
+ getOvsdbConnectionInstance(), phySwitch);
InstanceIdentifier<Switches> switchIid = getOvsdbConnectionInstance().getInstanceIdentifier()
.augmentation(HwvtepGlobalAugmentation.class)
.child(Switches.class, new SwitchesKey(new HwvtepPhysicalSwitchRef(nodeIid)));
// TODO handle removal of reference to managed switch from model
transaction.delete(LogicalDatastoreType.OPERATIONAL, nodeIid);
transaction.delete(LogicalDatastoreType.OPERATIONAL, switchIid);
- getOvsdbConnectionInstance().getDeviceInfo().removePhysicalSwitch(pSwitch.getUuid());
+ getDeviceInfo().clearDeviceOperData(Node.class, switchIid);
}
}
-
}