Changes between Initial Version and Version 1 of HowTo/WriteOFv3Rspecs/Examples


Ignore:
Timestamp:
09/30/11 09:32:59 (13 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/WriteOFv3Rspecs/Examples

    v1 v1  
     1[[PageOutline]]
     2If you have written any interested OFv3 rspecs, feel free to add them at the bottom of this page and help others:-)
     3
     4= Rspec with one group =
     5In this rspec there is only one defined group that is used in all the matches :
     6{{{
     7#!xml
     8<rspec xmlns="http://www.protogeni.net/resources/rspec/2"
     9       xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
     10       xmlns:openflow="http://www.geni.net/resources/rspec/ext/openflow/2"
     11       xs:schemaLocation="http://www.protogeni.net/resources/rspec/2
     12                          http://www.protogeni.net/resources/rspec/2/request.xsd
     13                          http://www.geni.net/resources/rspec/ext/openflow/2
     14                          http://wwww.geni.net/resources/rspec/ext/openflow/2/of-resv.xsd"
     15       type="request">
     16   
     17    <openflow:sliver email="user@example.net" description="My GENI experiment"
     18ref="http://wiki.example.net/myproj" />
     19
     20       <openflow:controller url="tcp:myctrl.example.net:9933" type="primary" />
     21
     22       <openflow:group name="mygrp">
     23
     24           <openflow:datapath
     25component_id="urn:publicid:IDN+openflow:foam:uxmal.example.net+datapath:06:af:00:24:a8:c4:b9:00">
     26             <openflow:port name="26" num="50"/>
     27             <openflow:port name="47" num="71"/>
     28           </openflow:datapath>
     29
     30       </openflow:group>
     31
     32       <openflow:match>
     33           <openflow:use-group name="mygrp" />
     34           <openflow:packet>
     35             <openflow:nw_src value="10.1.1.0/24" />
     36             <openflow:tp_src value="80" />
     37           <openflow:packet />
     38       <openflow:match>
     39   
     40       <openflow:match>
     41           <openflow:use-group name="mygrp" />
     42           <openflow:packet>
     43             <openflow:nw_src value="10.1.1.0/24" />
     44             <openflow:tp_src value="80, 8080-8090" />
     45           <openflow:packet />
     46         <openflow:match>
     47
     48    </openflow:sliver>
     49
     50</rspec>
     51
     52}}}
     53
     54= Rspec with multiple groups =
     55{{{
     56#!xml
     57<rspec xmlns="http://www.protogeni.net/resources/rspec/2"
     58       xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
     59       xmlns:openflow="http://www.geni.net/resources/rspec/ext/openflow/2"
     60       xs:schemaLocation="http://www.protogeni.net/resources/rspec/2
     61                          http://www.protogeni.net/resources/rspec/2/request.xsd
     62                          http://www.geni.net/resources/rspec/ext/openflow/2
     63                          http://wwww.geni.net/resources/rspec/ext/openflow/2/of-resv.xsd"
     64       type="request">
     65   
     66    <openflow:sliver email="user@example.net" description="My GENI experiment"
     67ref="http://wiki.example.net/myproj" />
     68
     69       <openflow:controller url="tcp:myctrl.example.net:9933" type="primary" />
     70
     71       <openflow:group name="mygrp1">
     72
     73           <openflow:datapath
     74component_id="urn:publicid:IDN+openflow:foam:uxmal.example.net+datapath:06:af:00:24:a8:c4:b9:00">
     75             <openflow:port name="26" num="50"/>
     76             <openflow:port name="47" num="71"/>
     77           </openflow:datapath>
     78
     79       </openflow:group>
     80
     81       <openflow:group name="mygrp2">
     82
     83           <openflow:datapath
     84component_id="urn:publicid:IDN+openflow:foam:uxmal.example.net+datapath:06:af:00:24:a8:c4:b9:00" />
     85           <openflow:datapath
     86component_id="urn:publicid:IDN+openflow:foam:uxmal.example.net+datapath:06:ac:00:24:a8:c4:b9:ff">
     87             <openflow:port name="26" num="20"/>
     88             <openflow:port name="27" num="21"/>
     89             <openflow:port name="28" num="22"/>
     90           </openflow:datapath>
     91
     92       </openflow:group>
     93
     94       <openflow:match>
     95           <openflow:use-group name="mygrp1" />
     96           <openflow:use-group name="mygrp2" />
     97           <openflow:packet>
     98             <openflow:nw_src value="10.1.1.0/24" />
     99             <openflow:tp_src value="80" />
     100           <openflow:packet />
     101       <openflow:match>
     102   
     103       <openflow:match>
     104           <openflow:use-group name="mygrp2" />
     105           <openflow:packet>
     106             <openflow:nw_src value="10.1.1.0/24" />
     107             <openflow:tp_src value="80, 8080-8090" />
     108           <openflow:packet />
     109         <openflow:match>
     110
     111    </openflow:sliver>
     112
     113</rspec>
     114}}}