Re: [Need Help] Arbitrary connection port is part of the node-id
Prateek Garg (prategar) <prategar@...>
Hi,
While implementing this use case I need some help using the select operation of ovsdb library. I am trying to read the Open_vSwitch table to get the data in external-ids. I am doing the following:
OpenVSwitch ovs = TyperUtils.getTypedRowWrapper(dbSchema, OpenVSwitch.class); transaction.add(op.select(ovs.getSchema())); ListenableFuture<List<OperationResult>> results = transaction.execute(); List<OperationResult> resultList = results.get();
I am getting resultList as: [OperationResult [count=0, uuid=null, rows=[Row [columns={}]], error=null, details=null]] Query sent to Ovs db is: ovsdb-client transact '["Open_vSwitch",{"op":"select", "table":"Open_vSwitch", "columns":[],"where": []}]'
However, I want to send: ovsdb-client transact '["Open_vSwitch",{"op":"select", "table":"Open_vSwitch", "columns":["external_ids"],"where": []}]'
It would be very helpful if someone could provide pointers on how to set column in select operation.
Regards Prateek
From: Edward Warnicke <hagbard@...>
Date: Tuesday, April 21, 2015 at 1:18 PM To: Prateek Garg <prategar@...> Cc: "ffernand@..." <ffernand@...>, "ovsdb-dev@..." <ovsdb-dev@...> Subject: Re: [ovsdb-dev] Arbitrary connection port is part of the node-id The config/operational synch is best handled a little differently.
When you try to config an ovsdb-node to connect... you don't *really* know the systemid... just the IP:port.
The way we solved this for bridges, and the way I'd advocate solving it here is:
1) If you are configing a ovsdb-node, write its iid to the external-ids of the openvswitch table
2) When you get an openvswitch table, if it has an iid in its external-ids, use that in the operational data store as its iid
3) If you don't get an iid in its external-ids... use some reasonable heuristic to contruct one.
For #3... I don't currently see a reason *not* to use systemid presuming its guaranteed unique and we contruct some kind of reasonable
Uri from it.
Ed
On Tue, Apr 21, 2015 at 1:09 PM, Prateek Garg (prategar)
<prategar@...> wrote:
|
|