api module¶
This module is part of the nmeta suite running on top of Ryu SDN controller to provide network identity and flow metadata. It provides methods for RESTful API connectivity.
-
class
api.
Api
(_nmeta, _config, _wsgi)¶ Bases:
object
This class is instantiated by nmeta.py and provides methods for RESTful API connectivity.
-
IP_PATTERN
= '\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$){4}\\b'¶
-
url_data_size_rows
= '/nmeta/measurement/tablesize/rows/'¶
-
url_flowtable
= '/nmeta/flowtable/'¶
-
url_flowtable_augmented
= '/nmeta/flowtable/augmented/'¶
-
url_flowtable_by_ip
= '/nmeta/flowtable/{ip}'¶
-
url_identity_ip
= '/nmeta/identity/ip/'¶
-
url_identity_mac
= '/nmeta/identity/mac/'¶
-
url_identity_nic_table
= '/nmeta/identity/nictable/'¶
-
url_identity_service
= '/nmeta/identity/service/'¶
-
url_identity_system_table
= '/nmeta/identity/systemtable/'¶
-
url_measure_event_rates
= '/nmeta/measurement/eventrates/'¶
-
url_measure_pkt_time
= '/nmeta/measurement/metrics/packet_time/'¶
-
-
exception
api.
NotFoundError
(msg=None, **kwargs)¶ Bases:
ryu.exception.RyuException
-
message
= 'Error occurred talking to function <TBD>'¶
-
-
class
api.
RESTAPIController
(req, link, data, **config)¶ Bases:
ryu.app.wsgi.ControllerBase
This class is used to control REST API access to the nmeta data and control functions
-
get_data_structure_size_rows
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
get_event_rates
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
get_id_ip
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
get_id_mac
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
get_id_service
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
get_packet_time
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
list_flow_table
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
list_flow_table_augmented
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
list_flow_table_by_IP
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
list_identity_nic_table
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
list_identity_system_table
(*args, **kwargs)¶ Run a REST command and return appropriate response
-
-
api.
rest_command
(func)¶ REST API command template