Hi,
 I want to set more than one bfd parameters from the controller. ie) i have
to execute the following command
sudo ovs-vsctl set interface s6-eth1 bfd:enable=true bfd:min_rx=100
bfd:min_tx=100

if i use
  cmd = ovs_vsctl.VSCtlCommand('set', ('Interface', 'eth2',
'bfd=enable=true', 'bfd=min_tx=100'',bfd=min_rx=100'))

then, only the last one is set(min_rx=100). other two are not set properly.

How to achieve this. Please clarify.

Thanks and Regards,
Padma V



On Tue, Feb 17, 2015 at 9:47 PM, Padma Jayasankar <[email protected]>
wrote:

> Hi,
>  Thanks a lot. After setting the port for remote access of OVSDB server,
> it is working fine.
>
> Thanks and Regards,
> Padma V
>
> On Tue, Feb 17, 2015 at 7:40 AM, Wei-Li Tang <[email protected]> wrote:
>
>> Hi,
>>
>> 2015-02-17 0:13 GMT+08:00 Padma Jayasankar <[email protected]>:
>>
>>> Hi,
>>>  I am using the following snippet(based on the code snippet u sent)
>>>
>>> OVSDB_REMOTE_ADDR = "tcp:192.168.56.102:6634"
>>>
>>
>> Hmm... Was tcp/6634 occupied by other daemon?
>>
>> Make sure your ovsdb-server is listening on tcp/6634 (or other port you
>> specified.)
>>
>> If not, you can issue *one* of the following commands to do so:
>>
>> ovs-appctl -t ovsdb-server ovsdb-server/add-remote ptcp:6634
>> ovs-vsctl set-manager ptcp:6634
>>
>>
>>>
>>>
>>>     # Initialize a VSCtl instance.
>>>     vsctl = ovs_vsctl.VSCtl(OVSDB_REMOTE_ADDR)
>>>
>>>     # Define a command instance which is equivalent to
>>>     # `ovs-vsctl set interface gre0 bfd:enable=true`
>>>     cmd = ovs_vsctl.VSCtlCommand('set', ('Interface', 'eth2',
>>> 'bfd=enable=true'))
>>>
>>>     # Run it.
>>>     vsctl.run_command([cmd])
>>>
>>>
>>> The inet address of the remote host in which openvswitch is running is
>>> 192.168.56.102.
>>>
>>> Thanks and Regards,
>>> Padma V
>>>
>>> On Mon, Feb 16, 2015 at 7:47 PM, Wei-Li Tang <[email protected]>
>>> wrote:
>>>
>>>> 2015-02-16 21:01 GMT+08:00 Padma Jayasankar <[email protected]>:
>>>>
>>>>> Hi,
>>>>>  Thanks for the detailed information. I tried with this code. But i am
>>>>> getting some 'protocol error'. i am getting the following error message
>>>>>
>>>>>  File "/home/padma/ryu/ryu/app/simple_switch.py", line 87, in
>>>>> _packet_in_handler
>>>>>     vsctl.run_command([cmd])
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 1100, in run_command
>>>>>     self._run_command(commands)
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 1096, in _run_command
>>>>>     self._do_main(commands)
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 1012, in _do_main
>>>>>     self._init_schema_helper()
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 897, in _init_schema_helper
>>>>>     vswitch_idl.OVSREC_DB_NAME)
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 889, in _rpc_get_schema_json
>>>>>     vsctl_fatal(os.strerror(error))
>>>>>   File "/usr/local/lib/python2.7/dist-packages/ryu/lib/ovs/vsctl.py",
>>>>> line 132, in vsctl_fatal
>>>>>
>>>>> *    raise Exception(msg)        # not call ovs.utils.ovs_fatal for
>>>>> reusabilityException: Protocol error*
>>>>>
>>>>> Generally when i execute ovs-vsctl commands in the remote host, i have
>>>>> to run those commands as super user(sudo). Is this error bcoz of that? if
>>>>> so how to execute these cmds as super user? Please clarify.
>>>>>
>>>>
>>>> AFAIK there's no need to be a super user to manage remote host if you
>>>> connect ovsdb via tcp. I can execute the code as a normal user 
>>>> successfully.
>>>>
>>>> How do you connect to your ovsdb server? What is your
>>>> remote ovsdb server address?
>>>>
>>>>
>>>>>
>>>>> Thanks and Regards,
>>>>> Padma V
>>>>>
>>>>>
>>>>>
>>>>> On Sat, Feb 14, 2015 at 11:41 AM, Wei-Li Tang <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> Please refer to the following codes which enables bfd for a gre
>>>>>> interface.
>>>>>>
>>>>>> ===
>>>>>>
>>>>>> from ryu.lib.ovs import vsctl as ovs_vsctl
>>>>>>
>>>>>> # proto:addr where your OVSDB server listens to.
>>>>>> OVSDB_REMOTE_ADDR = "tcp:192.168.0.1:6634"
>>>>>>
>>>>>> # Initialize a VSCtl instance.
>>>>>> vsctl = ovs_vsctl.VSCtl(OVSDB_REMOTE_ADDR)
>>>>>>
>>>>>> # Define a command instance which is equivalent to
>>>>>> # `ovs-vsctl set interface gre0 bfd:enable=true`
>>>>>> cmd = ovs_vsctl.VSCtlCommand('set', ('Interface', 'gre0',
>>>>>> 'bfd=enable=true'))
>>>>>>
>>>>>> # Run it.
>>>>>> vsctl.run_command([cmd])
>>>>>>
>>>>>>
>>>>>> 2015-02-11 14:46 GMT+08:00 Padma Jayasankar <[email protected]>:
>>>>>>
>>>>>>> Hi,
>>>>>>>  Thanks for the information. I went through the files in
>>>>>>> ryu/lib/ovs. I thought that i have to use vsctl.py as i have to run
>>>>>>> ovs-vsctl set interface command. But i couldn't understand , hoow to use
>>>>>>> that? Can u give some more information on that.
>>>>>>>
>>>>>>> Thanks and Regards,
>>>>>>> Padma V
>>>>>>>
>>>>>>> On Tue, Feb 10, 2015 at 7:22 AM, Wei-Li Tang <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> 2015-02-09 22:30 GMT+08:00 Padma Jayasankar <[email protected]>:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>   Is it possible to enable bfd for a switch from the controller?
>>>>>>>>> I have to do this dynamically for my project. I am able to do this
>>>>>>>>> statically using ovs-vsctl commands? Is there any way to do it 
>>>>>>>>> dynamically
>>>>>>>>> from the controller.
>>>>>>>>>
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Are you using an openvswitch? You may do this through OVSDB and
>>>>>>>> take a look at ryu/lib/ovs/ which is an OVSDB interaction library for 
>>>>>>>> Ryu.
>>>>>>>>
>>>>>>>>
>>>>>> --
>>>>>> Sincerely,
>>>>>>
>>>>>> Wei-Li Tang
>>>>>> RD Engineer, Xinguard Inc.
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Sincerely,
>>>>
>>>> Wei-Li Tang
>>>> RD Engineer, Xinguard Inc.
>>>>
>>>
>>>
>>
>>
>> --
>> Sincerely,
>>
>> Wei-Li Tang
>> RD Engineer, Xinguard Inc.
>>
>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to