Hi, Deni
You can make a connection by instantiating OVSBridge:
ovs_bridge = OVSBridge(None, datapath.id, 'tcp:127.0.0.1:6632',
timeout=1)
And by the following code, for example, you can delete a port:
ovs_bridge = OVSBridge(None, datapath.id, 'tcp:127.0.0.1:6632',
timeout=1)
ovs_bridge.init()
ports = ovs_bridge.get_port_name_list()
ovs_bridge.del_port(ports[0])
OVSBridge provides some other APIs.
For details, please check this code:
https://github.com/osrg/ryu/blob/master/ryu/lib/ovs/bridge.py
Thanks,
Fujimoto
On 2017年04月24日 16:18, Deni Toruan wrote:
Hi Satoshi san, thank you for your kind reply.
On Mon, Apr 24, 2017 at 5:07 AM, Fujimoto Satoshi
<satoshi.fujimo...@gmail.com <mailto:satoshi.fujimo...@gmail.com>> wrote:
Hi, Deni
The problem may be caused by that you use "ovsdb_event" and
"ovs_vsctl" at the same time.
If you don't need to monitor the status of OVS, you should not use
"ovsdb_event".
Is it mean I should not use initiation :
"ovsdb_event.EventNewOVSDBConnection)"? So how I will make (realize) a
connection between controller and OVSDB Server?
Also, you can use "OVSBridge" to control your OVS.
"OVSBridge" calls "ovs_vsctl.VSCtl()" in __init__(), and wraps
some operations including adding a port.
Thank you for your suggestion.Would you mind to give me some clue for
using the "OVSBridge" and for calling the "ovs_vsctl.VSCtl()"?
Thanks,
Fujimoto
Thank you.
Regards, Deni
On 2017年04月23日 19:23, Deni Toruan wrote:
Dear all,
Currently, I am trying to make a connection between Ryu
Controller and OVS, and trying to modify OVS from controller (add
bridge, add port, delete port, etc) dynamically.
Currently, the OVS and Ryu controller can be connected. They are
running in different VM. However, when I try to run my simple
app, it didn't work. In the code, I am trying to delete one port
that I have already set up from OVS terminal. I always got this
in controller:
----------------------------
d5f55957-26e1-4e24-8b9c-bb15210aa220
New OVSDB connection from system id
d5f55957-26e1-4e24-8b9c-bb15210aa220
New connection from 10.0.0.11:47985 <http://10.0.0.11:47985>
instantiating app None of RemoteOvsdb
BRICK RemoteOvsdb-d5f55957-26e1-4e24-8b9c-bb15210aa220
EVENT OVSDB->SimpleSwitch EventNewOVSDBConnection
EventNewOVSDBConnection<system_id=d5f55957-26e1-4e24-8b9c-bb15210aa220>
d5f55957-26e1-4e24-8b9c-bb15210aa220
New OVSDB connection from system id
d5f55957-26e1-4e24-8b9c-bb15210aa220
instantiating app None of RemoteOvsdb
BRICK RemoteOvsdb-d5f55957-26e1-4e24-8b9c-bb15210aa220
EVENT OVSDB->SimpleSwitch EventNewOVSDBConnection
EventNewOVSDBConnection<system_id=d5f55957-26e1-4e24-8b9c-bb15210aa220>
d5f55957-26e1-4e24-8b9c-bb15210aa220
New OVSDB connection from system id
d5f55957-26e1-4e24-8b9c-bb15210aa220
New connection from 10.0.0.11:47986 <http://10.0.0.11:47986>
---------------------------------
For your information, I customize the code and I put it in
attachment. Please give some hints for doing this, especially
with the code. Thank you.
Best regards,
Deni Lumbantoruan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org!http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
<mailto:Ryu-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/ryu-devel
<https://lists.sourceforge.net/lists/listinfo/ryu-devel>
--
Deni Toruan
Dosen IT Del
Sitoluama
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Ryu-devel mailing list
Ryu-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ryu-devel