[ovs-discuss] ovsdb jsonrpc: referential integrity

Boris Tobotras tobotras at parallels.com
Tue Mar 26 15:21:12 UTC 2013


Hi,

I'm playing with ovsdb's jsonrpc API. What I'm trying to do first is to 
create new bridge. To do that I need to create a port and an interface 
first if I understand correctly. Trying to do that I got this:

me>ovsdb: 
{"method":"transact","params":["Open_vSwitch",{"op":"insert","table":"Interface","row":{"name":"paci1face","type":"internal","_uuid":["uuid","02807bab-47f8-482d-be63-66a570bf73c3"]}}],"id":4}

me<ovsdb: {:id 4, :error nil, :result [{:uuid ["uuid" 
"df6ce11d-6a09-496e-9433-5ce38818fb7a"]}]}

me>ovsdb: 
{"method":"transact","params":["Open_vSwitch",{"op":"insert","table":"Port","row":{"_uuid":["uuid","5c097dde-5772-4385-b9d5-645590c20e38"],"name":"paci1port","interfaces":["uuid","02807bab-47f8-482d-be63-66a570bf73c3"]}}],"id":5}

me<ovsdb: {:id 5, :error nil, :result [{:uuid ["uuid" 
"cb769c11-26a3-45d0-b120-d6f7c21dbeb2"]} {:error "referential integrity 
violation", :details "Table Port column interfaces row 
cb769c11-26a3-45d0-b120-d6f7c21dbeb2 references nonexistent row 
02807bab-47f8-482d-be63-66a570bf73c3 in table Interface."}]}

	Why? Isn't interface's "_uuid" something I should refer to from port's 
"interfaces" list? (Being desperate I even tried to use returned result 
("id":4's) "uuid" in "interfaces" to no avail.) What am I missing here?
-- 
         Best regards, -- Boris.

Marriage, being a lifelong venture, must be approached with care and 
caution. -- Bluebeard



More information about the discuss mailing list