Sorry for the delay,

On Tue, 11 Sep 2012 13:27:52 +0900
HIYAMA Manabu <[email protected]> wrote:

> - some tests need attached port to switch.
> ---
>  ryu/tests/integrated/test_request_reply_v12.py |  409 
> ++++++++++++++++++++++--
>  ryu/tests/integrated/tester.py                 |   12 +-
>  2 files changed, 397 insertions(+), 24 deletions(-)
> 
> diff --git a/ryu/tests/integrated/test_request_reply_v12.py 
> b/ryu/tests/integrated/test_request_reply_v12.py
> index 15d4927..9de06b0 100644
> --- a/ryu/tests/integrated/test_request_reply_v12.py
> +++ b/ryu/tests/integrated/test_request_reply_v12.py
> @@ -15,7 +15,7 @@
>  
>  # vim: tabstop=4 shiftwidth=4 softtabstop=4
>  
> -import sys
> +import time
>  import logging
>  
>  from ryu.controller import ofp_event
> @@ -29,7 +29,13 @@ LOG = logging.getLogger(__name__)
>  
>  class RunTest(tester.TestFlowBase):
>      """ Test case for Request-Reply messages.
> +
> +        Some tests need attached port to switch.
> +        If use the OVS, can do it with the following commands.
> +            # ip link add <port> type dummy
> +            # ovs-vsctl add-port <bridge> <port>
>      """

For now, this is ok. Shortly, we'll add OVS db support to manage
OVS. Once it's done, the test script can do the above.

>      OFP_VERSIONS = [ofproto_v1_2.OFP_VERSION]
>  
>      def __init__(self, *args, **kwargs):
> @@ -61,10 +67,7 @@ class RunTest(tester.TestFlowBase):
>                  self.unclear -= 1
>                  self.start_next_test(dp)

(snip)

> @@ -144,6 +145,14 @@ class RunTest(tester.TestFlowBase):
>  
>          dp.send_msg(m)
>  
> +    def get_port(self, dp):
> +        p = None
> +        for port_no, port in dp.ports.items():
> +            if port_no != dp.ofproto.OFPP_LOCAL:
> +                p = port
> +                break
> +        return p

This funciton is supposed to return any port except for OFPP_LOCAL?

If so, something like the following?

        for port_no, port in dp.ports.items():
            if port_no != dp.ofproto.OFPP_LOCAL:
                 return port
        return None


Thanks, always a good thing to add more testings.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to