7 Similar to the :doc:`library_ovsdb_manager`, this library enables your
8 application to speak the OVSDB protocol (RFC7047_), but differ from the
9 :doc:`library_ovsdb_manager`, this library will initiate connections from
10 controller side as ovs-vsctl_ command does.
11 Please make sure that your devices are listening on either the Unix domain
12 socket or TCP/SSL port before calling the APIs of this library.
16 # Show current configuration
17 $ ovs-vsctl get-manager
19 # Set TCP listen address
20 $ ovs-vsctl set-manager "ptcp:6640"
22 See manpage of ovs-vsctl_ command for more details.
24 .. _RFC7047: https://tools.ietf.org/html/rfc7047
25 .. _ovs-vsctl: http://openvswitch.org/support/dist-docs/ovs-vsctl.8.txt
30 1. Instantiate :py:mod:`ryu.lib.ovs.vsctl.VSCtl`.
32 2. Construct commands with :py:mod:`ryu.lib.ovs.vsctl.VSCtlCommand`.
33 The syntax is almost the same as ovs-vsctl_ command.
35 3. Execute commands via :py:mod:`ryu.lib.ovs.vsctl.VSCtl.run_command`.
40 .. code-block:: python
42 from ryu.lib.ovs import vsctl
44 OVSDB_ADDR = 'tcp:127.0.0.1:6640'
45 ovs_vsctl = vsctl.VSCtl(OVSDB_ADDR)
49 command = vsctl.VSCtlCommand('show')
50 ovs_vsctl.run_command([command])
52 # >>> VSCtlCommand(args=[],command='show',options=[],result='830d781f-c3c8-4b4f-837e-106e1b33d058\n ovs_version: "2.8.90"\n')
55 # $ ovs-vsctl list Port s1-eth1
56 command = vsctl.VSCtlCommand('list', ('Port', 's1-eth1'))
57 ovs_vsctl.run_command([command])
59 # >>> VSCtlCommand(args=('Port', 's1-eth1'),command='list',options=[],result=[<ovs.db.idl.Row object at 0x7f525fb682e8>])
60 print(command.result[0].name)
69 .. automodule:: ryu.lib.ovs.vsctl
75 .. automodule:: ryu.lib.ovs.bridge