Hi Daniel, as you pointed out in the yang model, I do not think this is 
supported in ODL today.

> On May 6, 2016, at 12:19 AM, Danijel Teslic <[email protected]> wrote:
> 
> Hello,
> 
> I'm trying to add a flow on my OVS with tcp port range (e.g. 1000-1007) via 
> OpenDaylight Lithium controller. I have successfuly installed this flow 
> directly through CLI on my OVS (command: sudo ovs-ofctl add-flow bridge1 
> dltype=0x800,nwproto=6,tp_dst=1000/65528,actions=output:1) so I know my OVS 
> version supports this.
> 
> What I want to do now is send REST command to my controller, and then the 
> controller sends appropriate OpenFlow command to OVS which will add specified 
> flow. To do this, I need appropirate XML body to send in my REST command. 
> I've tried with the .xml body presented below, but I'm getting an error.
> 
> <?xml version="1.0" encoding="UTF-8" standalone="no"?> <flow 
> xmlns="urn:opendaylight:flow:inventory">
>     <instructions>
>         <instruction>
>             <order>0</order>
>             <apply-actions>
>                 <action>
>                     <order>0</order>
>                     <output-action>
>                         <output-node-connector>1</output-node-connector>
>                         <max-length>60</max-length>
>                     </output-action>
>                 </action>
>             </apply-actions>
>         </instruction>
>     </instructions>
>     <table_id>0</table_id>
>     <id>252</id>
>     <match>
>         <ethernet-match>
>             <ethernet-type>
>                 <type>2048</type>
>             </ethernet-type>
>         </ethernet-match>
>         <ip-match>
>             <ip-protocol>6</ip-protocol>         
>         </ip-match>
>         <tcp-source-port>1000/65528</tcp-source-port>
>     </match>   
>     <hard-timeout>0</hard-timeout>
>     <cookie>10</cookie>
>     <idle-timeout>0</idle-timeout>
>     <flow-name>flow-instruction-go-to-tablee</flow-name>
>     <priority>400</priority> </flow>
> I think that I'm not using correct .xml tag for tcp port since I get an error 
> below. 
> 
>     <errors 
>     xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
>     <error>
>         <error-type>protocol</error-type>
>         <error-tag>malformed-message</error-tag>
>         <error-message>Error parsing input: Incorrect lexical representation 
> of integer value: 1000/65528.
> An integer value can be defined as: 
>   - a decimal number,
>   - a hexadecimal number (prefix 0x),
>   - an octal number (prefix 0).
> Signed values are allowed. Spaces between digits are NOT 
> allowed.</error-message>
>     </error>
> </errors>
> It seems that the YANG model does not support tcp port masking according to 
> this link 
> https://github.com/opendaylight/openflowplugin/blob/master/model/model-flow-base/src/main/yang/opendaylight-match-types.yang#L203-L212
>  
> <https://github.com/opendaylight/openflowplugin/blob/master/model/model-flow-base/src/main/yang/opendaylight-match-types.yang#L203-L212>
> 
> Could you please clarify if this is really the case and if not, provide 
> correct syntax for adding tcp port with a mask?
> _______________________________________________
> openflowplugin-dev mailing list
> [email protected]
> https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev

_______________________________________________
openflowplugin-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/openflowplugin-dev

Reply via email to