[ovs-discuss] Automating ovs using an API or similar
ksemba at enterasys.com
Wed Jul 6 07:46:56 PDT 2011
In February I was looking for a way to automatize openvSwitch configurations remotely via some sort of API which we could integrate into our Java code base in addition to the already used XAPI (so we could also configure the openvSwitch in addition to the "standard" XenServer networking feature set). Last time I checked, the only option was to implement what the ovs tools are doing (see Justin's reply below). This seemed to be quite a lot of effort so we shifted it. I'd like to check again if there is something planned or already existing in this regard from either the openvSwitch community or from Citrix?
I've found a Java library called openflowj but as far as I understand it is used to configure an existing Distributed Virtual Switch from Citrix - correct? I've also checked the latest Citrix XAPI documentation which has been updated in December 2010 - it doesn't yet seem to contain any support for openvSwitch -correct?
Any other options would be highly appreciated.
Thanks a lot in advance,
From: Justin Pettit [mailto:jpettit at nicira.com]
Sent: Dienstag, 22. Februar 2011 09:17
To: Semba, Kurt
Cc: discuss at openvswitch.org
Subject: Re: [ovs-discuss] Automating ovs using an API or similar
On Feb 21, 2011, at 11:43 PM, Semba, Kurt wrote:
> thanks for your reply and your advice. I'm using the following SDK/library within my Java application:
Yes, that would be XAPI, which I mentioned earlier. (Or at least, that's what we call it. The term is a bit overloaded in XenServer, and it appears that the API itself has a couple slight variations.) I've only used the Python bindings, but I imagine the Java ones are quite similarly straight-forward.
> I would prefer using libraries which I can compile into my code instead of using calls to external tools like ovs-vsctl. Where exactly do I find the documentation on implementing my own ovsdb-server (I don't know where to find "ovsdb/SPECS" - sorry, stupid me). How much effort would you think it is to build something like this in Java?
I'd recommend using ovsdb-server, since it runs alongside the ovs-vswitchd process. I was suggesting that if you wanted to centralize control that you may consider implementing a manager that speaks its protocol. I don't know of any Java bindings to the database (either local or remote). I would imagine it would be a moderate task to build, but it does appear that there are at least Java bindings for JSON-RPC, which would help.
That "ovsdb/SPECS", which defines the protocol, was relative to the root directory of the source distribution. You can also view that file online here:
More information about the discuss