Updated example with OF model done during HackFest. 45/445/1
authorTony Tkacik <ttkacik@cisco.com>
Fri, 7 Jun 2013 20:44:16 +0000 (13:44 -0700)
committerTony Tkacik <ttkacik@cisco.com>
Fri, 7 Jun 2013 20:44:16 +0000 (13:44 -0700)
Signed-off-by: Tony Tkacik <ttkacik@cisco.com>
opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network-ne.yang [new file with mode: 0644]
opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-openflow-ipv6.yang [new file with mode: 0644]

diff --git a/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network-ne.yang b/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-network-ne.yang
new file mode 100644 (file)
index 0000000..41102ae
--- /dev/null
@@ -0,0 +1,54 @@
+module controller-openflow-ne {
+       yang-version 1;
+       namespace "urn:opendaylight:controller:network:openflow";
+       prefix "of";
+       
+       import controller-network {
+               prefix cn;
+       }
+       import ietf-inet-types { prefix "inet"; }
+       
+       revision 2013-06-07 {
+          description "Initial demo";
+       }
+
+       augment "/cn:network/cn:network-elements/cn:network-element" {
+
+               container flow-tables {
+                       list flow-table {
+
+                               key "id";
+                               leaf id {
+                                       type int32;
+                               }
+
+                               container flows {
+                                       list flow {
+                                               key "name";
+                                               leaf name {
+                                                       type string;
+                                               }
+                                               container match {
+                                                       leaf input-port {
+                                                               type cn:tp-ref;
+                                                       }
+                                                       leaf nl-src {
+                                                               type inet:ipv4-address;
+                                                       }
+                                                       leaf nl-dst {
+                                                               type inet:ipv4-address;
+                                                       }
+                                               }
+                                               container actions {
+                                                       list action {
+                                                               leaf type {
+                                                                       type string;
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+               }
+       }
+}
\ No newline at end of file
diff --git a/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-openflow-ipv6.yang b/opendaylight/sal/yang-prototype/code-generator/samples/maven-code-gen-sample/src/main/yang/controller-openflow-ipv6.yang
new file mode 100644 (file)
index 0000000..1d357bd
--- /dev/null
@@ -0,0 +1,31 @@
+module controller-openflow-ipv6 {
+       yang-version 1;
+       namespace "urn:opendaylight:controller:network:openflow:ipv6";
+       prefix "of6";
+
+       import controller-network {
+               prefix cn;
+       }
+       import ietf-inet-types { prefix "inet"; }
+       import controller-openflow-ne {prefix "of";}
+
+       revision 2013-06-07 {
+          description "Initial demo";
+       }
+
+
+
+       augment "/cn:network/cn:network-elements/cn:network-element/of:flow-tables/of:flow-table/of:flows/of:flow/of:match" {
+
+               leaf nl-src {
+                       type inet:ipv6-prefix;
+               }
+
+               leaf nl-dst {
+                       type inet:ipv6-prefix;
+               }
+           } 
+
+}
+
+       
\ No newline at end of file