javaopendaylightqos

Adding 2 or more Actions on L2switch for OpenDaylight Sodium-SR4


I am working with L2switch (https://github.com/opendaylight/l2switch).

In flow writer (https://github.com/opendaylight/l2switch/blob/master/l2switch-main/src/main/java/org/opendaylight/l2switch/flow/FlowWriterServiceImpl.java) I would like to add other actions as well. [line 189-197]

When I add another setAction for the queue, it does not work. Second setAction is overriding the first one and ping does not work due to unavailability of port (first setAction).

Could anyone please help me with this so that I can define 2 or more actions??


Solution

  • To define 2 (or more) actions you have to define two (or more) different action builders, set the order you want actions to be performed and add all these actions into a list, which would be passed to apply action builder. Basic structure is like this-

    1. Define a list.
    2. Action Builder1.
    3. Add Action Builder1 to list.
    4. Action Builder2.
    5. Add Action Builder2 to list. ....and so on
    6. Pass list into Apply Action.