Merge "OF plugin classes must have a strict dependency on Connection Service"
[controller.git] / opendaylight / sal / yang-prototype / code-generator / samples / maven-code-gen-sample / src / main / yang / controller-openflow.yang
1 module controller-openflow {
2
3     namespace "urn:opendaylight:controller:openflow";
4     prefix "of";
5     import controller-network {prefix cn;}
6
7     revision 2013-05-20 {
8        description "Initial demo";
9     }
10
11     typedef datapath-id {
12         type string {
13             length 16;
14         }
15     }
16
17
18     augment "/cn:network/cn:topologies/cn:topology/cn:types" {
19         leaf openflow {type string;}
20     }
21
22     augment "/cn:network/cn:topologies/cn:topology/cn:links/cn:link/cn:source" {
23         when "../../../cn:types/of:openflow";
24
25         leaf logical-port {
26             type int32;
27         }
28     }
29
30     augment "/cn:network/cn:topologies/cn:topology/cn:links/cn:link/cn:destination" {
31         when "../../../cn:types/of:openflow";
32
33         leaf logical-port {
34             type int32;
35         }
36     }
37
38     augment "/cn:network/cn:topologies/cn:topology/cn:nodes/cn:node/" {
39         when "../../../cn:types/of:openflow";
40         leaf datapath-id {
41             type datapath-id;
42         }
43     }
44     
45     augment "/cn:network/cn:network-elements/cn:network-element" {
46         leaf datapath-id {
47             type datapath-id;
48         }
49
50         container ports {
51             list port {
52                 key "logical-port-id";
53                 
54                 leaf logical-port-id {
55                     type int32;
56                 }
57
58                 // Should be replaced with ref to interface
59                 leaf physical-name {
60                     type string;
61                 }
62             }
63         }
64         container flow-tables {
65             list flow-table {
66                 key "flow-table-id";
67                 leaf flow-table-id {
68                     type string;
69                 }
70
71             }
72         }
73     }
74 }