Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To connect to a server agent you must issue the following HTTP post request:

curl -X POST --data 'connect' --header "Content-Type: application/json" http://serverIp/metron/server_connect

To disconnect from a server agent you must issue the following HTTP post request:

curl -X POST --data 'disconnect' --header "Content-Type: application/json" http://serverIp/metron/server_disconnect

Controller Configuration

The server device driver can monitor/modify the controller's information on a server on the fly.

To get the associated controller of a certain server, one could issue the following HTTP GET command:

curl -X GET --header "Content-Type: application/json" http://serverIp/metron/controllers

A similar result could be achieved using the ONOS CLI as follows:

onos:device-controllers rest:serverIp:serverPort

To set a (set of) controller(s) to a certain server, one could issue the following HTTP POST command:

curl -X POST --data '{"controllers":[{"ip":"192.168.125.7","port":80,"type":"tcp"},{"ip":"192.168.125.8","port":80,"type":"tcp"}]}' --header "Content-Type: application/json" http://serverIp/metron/controllers

A similar result could be achieved using the ONOS CLI as follows:

onos:device-controllers rest:serverIp:serverPort tcp:192.168.125.7:80 tcp:192.168.125.8:80

Finally, to delete a (set of) controller(s) from a server, one could issue the following an HTTP DELETE command :

...

curl -X DELETE --data '{"controllers":[{"ip":"192.168.125.7","port":80,"type":"tcp"},{"ip":"192.168.125.8","port":80,"type":"tcp"}]}' --header "Content-Type: application/json" http://serverIp/metron/controllers

A similar result could be achieved using the ONOS CLI to the resource 'delete_controllers' or an ONOS CLI command as follows:

onos:device-setcontrollers --remove rest:serverIp:serverPort tcp:192.168.125.7:80 tcp:192.168.125.8:80

Server System Operations

The driver supports a system-related operation which returns the time of the server as follows:

curl -X GET --header "Content-Type: application/json" http://serverIp/metron/server_time

A similar result could be achieved using the ONOS CLI as follows:

onos:device-time rest:serverIp:serverPort

A reboot operation is also offered by this ONOS behavior, but the server driver does not implement it.

...

To delete multiple rules at once, you should append a comma-separated rule IDs as follows:

HTTP DELETE: http://serverIp/metron/rules_delete/54043196136729470,54043196136729471

NIC Table Statistics

To retrieve statistics related to a server's NIC tables, the server device driver needs to hit the following path:

HTTP GET: http://serverIp/metron/rules_table_stats

NIC Port Administration

To enable a NIC port, the server device driver needs to issue the following HTTP post command to a server:

curl -X POST --data '{"port":0, "portStatus":"enable"}' --header "Content-Type: application/json" http://serverIp/metron/nic_ports

A similar result could be achieved using the ONOS CLI as follows:

onos:portstate rest:serverIp:serverPort nicID enable


Similarly, to disable a NIC port, the server device driver needs to issue the following HTTP post command to a server:

curl -X POST --data '{"port":0, "portStatus":"disable"}' --header "Content-Type: application/json" http://serverIp/metron/nic_ports

A similar result could be achieved using the ONOS CLI as follows:

onos:portstate rest:serverIp:serverPort nicID disable

NIC Queue Configuration

The server device driver can also provide NIC queue configuration information through the following HTTP GET command:

curl -X GET --header "Content-Type: application/json" http://serverIp/metron/nic_queues

This ONOS behavior also offers two additional methods, i.e., add/delete queue, but the server driver does not implement these methods.

...