Open Kilda Java Documentation
org.openkilda.northbound.controller.FlowController Class Reference

Public Member Functions

ResponseEntity< FlowPayloadcreateFlow (@RequestBody FlowPayload flow)
 
ResponseEntity< FlowPayloadgetFlow (@PathVariable(name="flow-id") String flowId)
 
ResponseEntity< FlowPayloaddeleteFlow (@PathVariable(name="flow-id") String flowId)
 
ResponseEntity< FlowPayloadupdateFlow ( @PathVariable(name="flow-id") String flowId, @RequestBody FlowPayload flow)
 
ResponseEntity< List< FlowPayload > > getFlows ()
 
ResponseEntity< List< FlowPayload > > deleteFlows ( @RequestHeader(value=EXTRA_AUTH, defaultValue="0") long extraAuth)
 
ResponseEntity< FlowIdStatusPayloadstatusFlow (@PathVariable(name="flow-id") String flowId)
 
ResponseEntity< FlowPathPayloadpathFlow (@PathVariable(name="flow-id") String flowId)
 
BatchResults pushFlows ( @RequestBody List< FlowInfoData > externalFlows, @ApiParam(value="default: false. If true, this will propagate rules to the switches.", required=false) @RequestParam(value="propagate", required=false) Optional< Boolean > propagate, @ApiParam(value="default: false. If true, will wait until poll timeout for validation.", required=false) @RequestParam("verify") Optional< Boolean > verify)
 
BatchResults unpushFlows ( @RequestBody List< FlowInfoData > externalFlows, @ApiParam(value="default: false. If true, this will propagate rules to the switches.", required=false) @RequestParam(value="propagate", required=false) Optional< Boolean > propagate, @ApiParam(value="default: false. If true, will wait until poll timeout for validation.", required=false) @RequestParam(value="verify", required=false) Optional< Boolean > verify)
 
FlowReroutePayload rerouteFlow (@PathVariable("flow_id") String flowId)
 
FlowReroutePayload syncFlow (@PathVariable("flow_id") String flowId)
 
ResponseEntity< List< FlowValidationDto > > validateFlow (@PathVariable("flow_id") String flowId)
 
VerificationOutput verifyFlow ( @RequestBody VerificationInput payload, @PathVariable("flow_id") String flowId)
 
FlowCacheSyncResults syncFlowCache ()
 
FlowCacheSyncResults invalidateFlowCache ()
 
FlowCacheSyncResults refreshFlowCache ()
 

Detailed Description

REST Controller for flow requests.

Definition at line 79 of file FlowController.java.

Member Function Documentation

◆ createFlow()

ResponseEntity<FlowPayload> org.openkilda.northbound.controller.FlowController.createFlow ( @RequestBody FlowPayload  flow)

Creates new flow.

Parameters
flowflow
Returns
flow

Definition at line 103 of file FlowController.java.

◆ deleteFlow()

ResponseEntity<FlowPayload> org.openkilda.northbound.controller.FlowController.deleteFlow ( @PathVariable(name="flow-id") String  flowId)

Deletes flow.

Parameters
flowIdflow id
Returns
flow

Definition at line 135 of file FlowController.java.

◆ deleteFlows()

ResponseEntity<List<FlowPayload> > org.openkilda.northbound.controller.FlowController.deleteFlows ( @RequestHeader(value=EXTRA_AUTH, defaultValue="0") long  extraAuth)

Delete all flows.

Returns
list of flows that have been deleted

Definition at line 189 of file FlowController.java.

◆ getFlow()

ResponseEntity<FlowPayload> org.openkilda.northbound.controller.FlowController.getFlow ( @PathVariable(name="flow-id") String  flowId)

Gets flow.

Parameters
flowIdflow id
Returns
flow

Definition at line 119 of file FlowController.java.

◆ getFlows()

ResponseEntity<List<FlowPayload> > org.openkilda.northbound.controller.FlowController.getFlows ( )

Dumps all flows. Dumps all flows with specific status if specified.

Returns
list of flow

Definition at line 170 of file FlowController.java.

◆ invalidateFlowCache()

FlowCacheSyncResults org.openkilda.northbound.controller.FlowController.invalidateFlowCache ( )

Invalidate (purge) the flow cache and initialize it with DB data.

Returns
a response of the invalidate operation

Definition at line 391 of file FlowController.java.

◆ pathFlow()

ResponseEntity<FlowPathPayload> org.openkilda.northbound.controller.FlowController.pathFlow ( @PathVariable(name="flow-id") String  flowId)

Gets flow path.

Parameters
flowIdflow id
Returns
list of flow

Definition at line 231 of file FlowController.java.

◆ pushFlows()

BatchResults org.openkilda.northbound.controller.FlowController.pushFlows ( @RequestBody List< FlowInfoData externalFlows,
@ApiParam(value="default: false. If true, this will propagate rules to the switches.", required=false) @RequestParam(value="propagate", required=false) Optional< Boolean >  propagate,
@ApiParam(value="default: false. If true, will wait until poll timeout for validation.", required=false) @RequestParam("verify") Optional< Boolean >  verify 
)

Push flows to kilda ... this can be used to get flows into kilda without kilda creating them itself. Kilda won't expect to create them .. it may (and should) validate them at some stage.

Parameters
externalFlowsa list of flows to push to kilda for it to absorb without expectation of creating the flow rules
Returns
list of flow

Definition at line 251 of file FlowController.java.

◆ refreshFlowCache()

FlowCacheSyncResults org.openkilda.northbound.controller.FlowController.refreshFlowCache ( )

Refresh (synchronize) the flow cache with DB data.

Returns
a detailed response of the refresh operation (added, deleted, modified, unchanged flows)

Definition at line 403 of file FlowController.java.

◆ rerouteFlow()

FlowReroutePayload org.openkilda.northbound.controller.FlowController.rerouteFlow ( @PathVariable("flow_id") String  flowId)

Initiates flow rerouting if any shorter paths are available.

Parameters
flowIdid of flow to be rerouted.
Returns
flow payload with updated path.

Definition at line 302 of file FlowController.java.

◆ statusFlow()

ResponseEntity<FlowIdStatusPayload> org.openkilda.northbound.controller.FlowController.statusFlow ( @PathVariable(name="flow-id") String  flowId)

Gets flow status.

Parameters
flowIdflow id
Returns
list of flow

Definition at line 216 of file FlowController.java.

◆ syncFlow()

FlowReroutePayload org.openkilda.northbound.controller.FlowController.syncFlow ( @PathVariable("flow_id") String  flowId)

Initiates flow synchronization (reinstalling). In other words it means flow update with newly generated rules.

Parameters
flowIdid of flow to be rerouted.
Returns
flow payload with updated path.

Definition at line 318 of file FlowController.java.

◆ syncFlowCache()

FlowCacheSyncResults org.openkilda.northbound.controller.FlowController.syncFlowCache ( )

Make sure any Flow caches are in sync with the DB. This is primarily a janitor primitive.

Returns
a detailed response of the sync operation (added, deleted, modified, unchanged flows)

Definition at line 379 of file FlowController.java.

◆ unpushFlows()

BatchResults org.openkilda.northbound.controller.FlowController.unpushFlows ( @RequestBody List< FlowInfoData externalFlows,
@ApiParam(value="default: false. If true, this will propagate rules to the switches.", required=false) @RequestParam(value="propagate", required=false) Optional< Boolean >  propagate,
@ApiParam(value="default: false. If true, will wait until poll timeout for validation.", required=false) @RequestParam(value="verify", required=false) Optional< Boolean >  verify 
)

Unpush flows to kilda ... essentially the opposite of push.

Parameters
externalFlowsa list of flows to unpush without propagation to Floodlight
Returns
list of flow

Definition at line 278 of file FlowController.java.

◆ updateFlow()

ResponseEntity<FlowPayload> org.openkilda.northbound.controller.FlowController.updateFlow ( @PathVariable(name="flow-id") String  flowId,
@RequestBody FlowPayload  flow 
)

Updates existing flow.

Parameters
flowflow
flowIdflow id
Returns
flow

Definition at line 153 of file FlowController.java.

◆ validateFlow()

ResponseEntity<List<FlowValidationDto> > org.openkilda.northbound.controller.FlowController.validateFlow ( @PathVariable("flow_id") String  flowId)

Compares the Flow from the DB to what is on each switch.

Parameters
flowIdid of flow to be rerouted.
Returns
flow payload with updated path.

Definition at line 333 of file FlowController.java.

◆ verifyFlow()

VerificationOutput org.openkilda.northbound.controller.FlowController.verifyFlow ( @RequestBody VerificationInput  payload,
@PathVariable("flow_id") String  flowId 
)

Verify flow integrity by sending "ping" package over flow path.

Definition at line 361 of file FlowController.java.


The documentation for this class was generated from the following file: