Switch to command pattern and using transaction chains
[ovsdb.git] / southbound / southbound-api / src / main / yang / ovsdb.yang
1 module ovsdb {
2     yang-version 1;
3     namespace "urn:opendaylight:params:xml:ns:yang:ovsdb";
4     prefix "southbound";
5
6     import network-topology {prefix "topo"; revision-date "2013-10-21"; }
7     import yang-ext { prefix "ext"; }
8     import ietf-inet-types { prefix inet; }
9     import overlay { prefix overlay; }
10     import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
11
12     revision "2015-01-05" {
13         description "Initial revision of southbound model";
14     }
15     
16     typedef ovsdb-bridge-ref {
17         description "A reference to an ovsdb bridge";
18         type instance-identifier;
19     }
20     
21     typedef ovsdb-node-ref {
22         description "A reference to an ovsdb node";
23         type instance-identifier;
24     }
25     
26     grouping ovsdb-bridge-attributes {
27         leaf bridge-uuid {
28             description "The unique identifier of the bridge";
29             type yang:uuid;
30         }
31
32         leaf bridge-name {
33             description "The name of the bridge";
34             type string;
35         }
36
37         leaf managed-by {
38             description "The OVSDB which this bridge belongs to";
39             type ovsdb-node-ref;
40         }
41     }
42
43     grouping ovsdb-node-attributes {
44         uses overlay:ip-port-locator;
45
46         leaf-list managed-node-entry {
47             type ovsdb-bridge-ref;
48         }
49     }
50
51     augment "/topo:network-topology/topo:topology/topo:node" {
52         description "Augmentation for bridge nodes managed by ovsdb";
53         ext:augment-identifier "ovsdb-managed-node-augmentation";
54         uses ovsdb-bridge-attributes;
55     }
56
57     augment "/topo:network-topology/topo:topology/topo:node" {
58         description "Augment topology node for an ovsdb node";
59         ext:augment-identifier "ovsdb-node-augmentation";
60         uses ovsdb-node-attributes;
61     }
62 }