Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

I have used the REST Interface in the past, and this was on the Hydrogen, but i don't think much has changed. Below is the data i send via POST to http://d4fapp:8086/rest/app/df/netnodes

{"label":"switch1","id":"00:00:00:00:00:00:00:01","type":"OF","mgmtAddr":"10.125.136.91","mgmtPort":"3366","sdnNodeMode":"sdnenablednative","healthCheckFrequency":"10","trafficPortsStr":"TP1:1:0:north::TP2:2:0:south","protectedLinksStr":"PL1:1:2:"}

The important thing you need to check is that the "id" is correct and pointed to the correct switch. In this example it was DPID of 1. Next to check the trafficPortstr the 1 and 2 related to the port number. same with protectedLinkStr.

I used this site to build most of the JSON formatted data. https://wiki.opendaylight.org/view/Defense4All:REST#Add_NetNode

If i find some time this weekeend i do a write up with some examples using mininet.

I have used the REST Interface in the past, and this was on the Hydrogen, but i don't think much has changed. Below is the data i send via POST to http://d4fapp:8086/rest/app/df/netnodes

{"label":"switch1","id":"00:00:00:00:00:00:00:01","type":"OF","mgmtAddr":"10.125.136.91","mgmtPort":"3366","sdnNodeMode":"sdnenablednative","healthCheckFrequency":"10","trafficPortsStr":"TP1:1:0:north::TP2:2:0:south","protectedLinksStr":"PL1:1:2:"}

The important thing you need to check is that the "id" is correct and pointed to the correct switch. In this example it was DPID of 1. Next to check the trafficPortstr the 1 and 2 related to the port number. same with protectedLinkStr.

Below is the data for the PN node and POST to http://10.125.136.87:8086/rest/app/df/pns

{"label":"WebServer","ipVersion":"IPV4","dstAddr":"10.0.0.1","dstAddrPrefixLen":"32","protectionSLA":"","mitigationConfirmation":"false","detectorLabel":"of_rate_based_detector","ofBasedDetection":"true","symmetricDvsn":"true","mitigationScope":"ATTACKED","thresholdStr":"17:0:0.0:0.0:true:INBOUND::6:0:25389.31:314.92477:true:INBOUND::1:0:0.0:0.0:true:INBOUND::0:0:0.0:0.0:true:INBOUND","netNodeLabels":["switch1"]}

I used this site to build most of the JSON formatted data. https://wiki.opendaylight.org/view/Defense4All:REST#Add_NetNode

If i find some time this weekeend i do a write up with some examples using mininet.