use of org.openkilda.wfm.topology.network.controller.isl.IslFsm.IslFsmContext in project open-kilda by telstra.
the class NetworkIslService method islDefaultRuleDeleted.
/**
* Process removed isl rule notification.
* @param reference isl reference
* @param payload target endpoint
*/
public void islDefaultRuleDeleted(IslReference reference, RemoveIslDefaultRulesResult payload) {
log.debug("ISL service received isl rule removed for {} (on {})", reference, reference.getSource());
IslFsm controller = this.controller.get(reference);
if (controller == null) {
log.info("Got clean up resources notification for not existing ISL {}", reference);
return;
}
IslFsmContext context;
if (payload.isSuccess()) {
context = IslFsmContext.builder(carrier, reference.getSource()).removedRulesEndpoint(Endpoint.of(payload.getSrcSwitch(), payload.getSrcPort())).build();
controllerExecutor.fire(controller, IslFsmEvent.ISL_RULE_REMOVED, context);
} else {
context = IslFsmContext.builder(carrier, reference.getSource()).build();
controllerExecutor.fire(controller, IslFsmEvent.ISL_RULE_TIMEOUT, context);
}
removeIfCompleted(reference, controller);
}
use of org.openkilda.wfm.topology.network.controller.isl.IslFsm.IslFsmContext in project open-kilda by telstra.
the class NetworkIslService method bfdPropertiesUpdate.
/**
* Process enable/disable BFD requests.
*/
public void bfdPropertiesUpdate(IslReference reference) {
log.debug("ISL service receive BFD properties update notification for {}", reference);
IslFsmContext context = IslFsmContext.builder(carrier, reference.getSource()).build();
controllerExecutor.fire(locateController(reference), IslFsmEvent.BFD_PROPERTIES_UPDATE, context);
}
use of org.openkilda.wfm.topology.network.controller.isl.IslFsm.IslFsmContext in project open-kilda by telstra.
the class NetworkIslService method remove.
/**
* Remove isl by request.
*/
public void remove(IslReference reference) {
log.debug("ISL service receive remove for {}", reference);
IslFsm islFsm = controller.get(reference);
if (islFsm == null) {
log.info("Got DELETE request for not existing ISL {}", reference);
return;
}
IslFsmContext context = IslFsmContext.builder(carrier, reference.getSource()).build();
controllerExecutor.fire(islFsm, IslFsmEvent.ISL_REMOVE, context);
removeIfCompleted(reference, islFsm);
}
use of org.openkilda.wfm.topology.network.controller.isl.IslFsm.IslFsmContext in project open-kilda by telstra.
the class NetworkIslService method roundTripStatusNotification.
/**
* Handle round trip status notification.
*/
public void roundTripStatusNotification(IslReference reference, RoundTripStatus status) {
log.debug("ISL service receive ROUND TRIP STATUS for {} (on {})", reference, status.getEndpoint());
IslFsm islFsm = this.controller.get(reference);
if (islFsm == null) {
log.debug("Ignore ROUND TRIP STATUS for for {} - ISL not found", reference);
return;
}
IslFsmContext context = IslFsmContext.builder(carrier, status.getEndpoint()).roundTripStatus(status).build();
controllerExecutor.fire(islFsm, IslFsmEvent.ROUND_TRIP_STATUS, context);
}
use of org.openkilda.wfm.topology.network.controller.isl.IslFsm.IslFsmContext in project open-kilda by telstra.
the class NetworkIslService method islDefaultRuleInstalled.
/**
* Process installed isl rule notification.
* @param reference isl reference
* @param payload response payload
*/
public void islDefaultRuleInstalled(IslReference reference, InstallIslDefaultRulesResult payload) {
log.debug("ISL service received isl rule installed for {} (on {})", reference, reference.getSource());
IslFsm islFsm = locateController(reference);
IslFsmContext context;
if (payload.isSuccess()) {
context = IslFsmContext.builder(carrier, reference.getSource()).installedRulesEndpoint(Endpoint.of(payload.getSrcSwitch(), payload.getSrcPort())).build();
controllerExecutor.fire(islFsm, IslFsmEvent.ISL_RULE_INSTALLED, context);
} else {
context = IslFsmContext.builder(carrier, reference.getSource()).build();
controllerExecutor.fire(islFsm, IslFsmEvent.ISL_RULE_TIMEOUT, context);
}
}
Aggregations