Re: [Need Help] Arbitrary connection port is part of the node-id
Amit Mandke (ammandke) <ammandke@...>
Just to address the question from following mail. The way you specify the columns to select operation is you call setColumn(..) on a select.
Example:
Select<GenericTableSchema> bridgeSelect = op.select(bridge.getSchema());
List<String> columns = new ArrayList<>();
columns.add(bridge.getNameColumn().getSchema().getName());
bridgeSelect.setColumns(columns);
-Amit
From: "Prateek Garg (prategar)" <prategar@...>
Date: Wednesday, April 22, 2015 at 2:54 PM To: Edward Warnicke <hagbard@...>, "ovsdb-dev@..." <ovsdb-dev@...>, "ffernand@..." <ffernand@...> Subject: Re: [ovsdb-dev] [Need Help] Arbitrary connection port is part of the node-id 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:
|
|