Please don't drop the mailing list. On Wed, Sep 03, 2014 at 03:53:13PM +0800, ychen wrote: > hi, Ben: > I am still have serval problems about transact. > when I use the following format to add port p100,type=internal, system > returns error > "ovsdb-client: invalid syntax for 'transact' (use --help for help)" > ovsdb-client transact {"method":"transact", > "params":["Open_vSwitch",{"row":{"type":"internal"},"table":"Interface","uuid-name":"rowp100intf","op":"insert"},{"row":{"ports":["set",[["uuid","275537c3-b469-47d1-b3c0-10efd08cb193"],["named-uuid","rowp100port"]]]},"table":"Bridge","where":[["_uuid","==",["uuid","8f725ab8-c5f4-4077-a251-d866e7a448d9"]]],"op":"update"},{"row":{"name":"p100","interfaces":["named-uuid","rowp100intf"],"tag":100},"table":"Port","uuid-name":"rowp100port","op":"insert"}], > "id":1}
It looks like you forgot to quote to protect the JSON content from the shell. > Also, I have tried to substitute the outer {} to [], and "method:transact" to > "method=transact", but system still reports error. > so what's the correct transact format? As specified in RFC 7047. > Another question: > I noticed that when add or delete one port, we should always update table > Bridge. But the update operation needs the old value(exp: add port p100, > there will be an operation update in bridge table, column ports). That's > really complicated when I want to debug with tool ovsdb-tool or ovsdb-client. > I am considering why we can't just use operation like "add" or "remove" to > add/delete one element of the ports column?(or other column which type is map > or set) Use "mutate"? _______________________________________________ discuss mailing list discuss@openvswitch.org http://openvswitch.org/mailman/listinfo/discuss