csle_ryu.monitor package

Submodules

csle_ryu.monitor.flow_and_port_stats_monitor module

class csle_ryu.monitor.flow_and_port_stats_monitor.FlowAndPortStatsMonitor(*args, **kwargs)[source]

Bases: ryu.base.app_manager.RyuApp

Contains general functionality to monitor of flow and port statistics

OFP_VERSIONS = [4]

A list of supported OpenFlow versions for this RyuApp. The default is all versions supported by the framework.

Examples:

OFP_VERSIONS = [ofproto_v1_0.OFP_VERSION,
                ofproto_v1_2.OFP_VERSION]

If multiple Ryu applications are loaded in the system, the intersection of their OFP_VERSIONS is used.

class csle_ryu.monitor.flow_and_port_stats_monitor.NorthBoundRestAPIController(req, link, data, **config)[source]

Bases: ryu.app.wsgi.ControllerBase

Controller class for the Northbound REST API that accepts HTTP requests.

Example requests:

curl -X GET http://15.12.252.3:8080/cslenorthboundapi/producer/status curl -X PUT -d ‘{“bootstrap.servers”: “15.12.253.253”, “time_step_len_seconds”: 30}’ http://15.12.252.3:8080/cslenorthboundapi/producer/start curl -X POST http://15.12.252.3:8080/cslenorthboundapi/producer/stop

producer_status(req, **kwargs)[source]

Gets the status of the Kafka producer

Parameters
  • req – the REST API request

  • kwargs – the WSGI arguments

Returns

the REST API response

start_producer(req, **kwargs)[source]

Starts the Kafka producer that sends flow and port statistics

Parameters
  • req – the REST API request

  • kwargs – WSGI arguments

Returns

the REST API response

stop_producer(req, **kwargs)[source]

Stops the Kafka producer that sends flow and port statistics

Parameters
  • req – the REST API request

  • kwargs – WSGI arguments

Returns

The REST response

Module contents