Unable to delete ovs bridge through OVSDB northbound API

asked 2016-01-06 18:14:37 -0700

Harold gravatar image

updated 2016-01-06 18:24:28 -0700

Hi, I managed to add and edit ovs bridge through OVSDB northbound API using "POST" "PUT" method in curl/Postman but DELETE method doesn't work. curl/Postman returns 400 Bad Request and message "Delete Operation Failed" and Malformed JSON: Unexpected 'D'. Any way to work it out?? I'm stuck. I'm using mininet and ODL lithium (distribution-karaf-0.3.1-Lithium-SR1) installed on separate servers(both Ubuntu14.04). (ODL:192.168.3.31, mininet: 192.168.3.34)

Here's POST request and output (in curl ) which worked without problem.

Request:

curl -X POST -v -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" \ http://192.168.3.31:8282/ovsdb/nb/v3/...vSwitch/table/Bridge/row \
-d '{"parent
uuid":"75ace604-91e9-4c5e-87ab-26e5dae193a5", "row":{ "Bridge":{ "name":"br_test-0" } } }'

Output:

  • About to connect() to 192.168.3.31 port 8282 (#0)
  • Trying 192.168.3.31...
  • Connected to 192.168.3.31 (192.168.3.31) port 8282 (#0)
  • Server auth using Basic with user 'admin'> POST /ovsdb/nb/v3/node/OVS%7C192.168.3.34:40623/database/Open_vSwitch/table/Bridge/row HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.29.0 > Host: 192.168.3.31:8282 > Content-Type: application/json > Accept: application/json > Content-Length: 98 >
  • upload completely sent off: 98 out of 98 bytes < HTTP/1.1 201 Created < Server: Apache-Coyote/1.1 < Set-Cookie: JSESSIONIDSSO=42449B6E0324A44677CE9985401DE459; Path=/ < Set-Cookie: JSESSIONID=A1939A2627C4A01991E8E96E0BDC74E9; Path=/ < Content-Type: application/json < Transfer-Encoding: chunked < Date: Thu, 07 Jan 2016 01:41:29 GMT <
  • Connection #0 to host 192.168.3.31 left intact

{"name":"brtest-0","uuid":["uuid","724d573d-874c-4c6a-b95d-309e99da98c5"]}

Here's DELETE request and output (in curl ) which does not allow me to delete bridge.

Request:

curl -X DELETE -v -u admin:admin -H "Content-Type: application/json" -H "Accept: application/json" \ http://192.168.3.31:8282/ovsdb/nb/v3/...vSwitch/table/Bridge/row/724d573d-874c-4c6a-b95d-309e99da98c5 \ -d '{"parentuuid":"75ace604-91e9-4c5e-87ab-26e5dae193a5", "row":{ "Bridge":{ "name":"br_test-0" } } }'

Output:

  • About to connect() to 192.168.3.31 port 8282 (#0)
  • Trying 192.168.3.31...
  • Connected to 192.168.3.31 (192.168.3.31) port 8282 (#0)
  • Server auth using Basic with user 'admin' > DELETE /ovsdb/nb/v3/node/OVS%7C192.168.3.34:40623/database/Open_vSwitch/table/Bridge/row/724d573d-874c-4c6a-b95d-309e99da98c5 HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.29.0 > Host: 192.168.3.31:8282 > Content-Type: application/json > Accept: application/json > Content-Length: 98 >
  • upload completely sent off: 98 out of 98 bytes < HTTP/1.1 400 Bad Request < Server: Apache-Coyote/1.1 < Cache-Control: private < Expires: Wed, 31 Dec 1969 16:00:00 PST < Set-Cookie: JSESSIONIDSSO=937D9C875749810CCD4FE55A401A2B91; Path=/ < Set-Cookie: JSESSIONID=D91FB50A21469FF6BDF298E1B41ED466; Path=/ < Content-Type: text/plain < Transfer-Encoding: chunked < Date: Thu, 07 Jan 2016 01:47:09 GMT < Connection: close <
  • Closing connection 0 Delete Operation Failed

For DELETE request, I tried without -d { ...} but the result was the same. please help.. thanks

edit retag flag offensive close merge delete