Added support for resolving augmentations.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / src / test / resources / controller-models / 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     
8     revision 2013-05-20 {
9        description "Initial demo";
10     }
11
12    
13
14
15
16     typedef datapath-id {
17         type string {
18             length 16;
19         }
20     }
21
22
23     augment "/cn:network/cn:topologies/cn:topology/cn:types" {
24         leaf openflow {type string;}
25     }
26
27     augment "/cn:network/cn:topologies/cn:topology/cn:links/cn:link/cn:source" {
28         when "../../../cn:types/of:openflow";
29
30         leaf logical-port {
31             type int32;
32         }
33     }
34
35     augment "/cn:network/cn:topologies/cn:topology/cn:links/cn:link/cn:destination" {
36         when "../../../cn:types/of:openflow";
37
38         leaf logical-port {
39             type int32;
40         }
41     }
42
43     augment "/cn:network/cn:topologies/cn:topology/cn:nodes/cn:node/" {
44         when "../../../cn:types/of:openflow";
45         leaf datapath-id {
46             type datapath-id;
47         }
48     }
49     
50     augment "/cn:network/cn:network-elements/cn:network-element" {
51         leaf datapath-id {
52             type datapath-id;
53         }
54
55         container ports {
56             list port {
57                 key "logical-port-id";
58                 
59                 leaf logical-port-id {
60                     type int32;
61                 }
62
63                 // Should be replaced with ref to interface
64                 leaf physical-name {
65                     type string;
66                 }
67             }
68         }
69         container flow-tables {
70             list flow-table {
71                 key "flow-table-id";
72                 leaf flow-table-id {
73                     type string;
74                 }
75
76             }
77         }
78     }
79 }