ff1f2ba7e13bbcf9929cf373900d368bdb1f244f
[osm/IM.git] / models / yang / rw-topology.yang
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
6  *   Licensed under the Apache License, Version 2.0 (the "License");
7  *   you may not use this file except in compliance with the License.
8  *   You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *   Unless required by applicable law or agreed to in writing, software
13  *   distributed under the License is distributed on an "AS IS" BASIS,
14  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *   See the License for the specific language governing permissions and
16  *   limitations under the License.
17  *
18  *
19  */
20
21 module rw-topology {
22     namespace "http://riftio.com/ns/riftware-1.0/rw-topology";
23     prefix rw-topology;
24
25     import ietf-inet-types {prefix inet;}
26     import ietf-network {prefix nw;}
27     import ietf-network-topology {prefix nt;}
28     import ietf-l2-topology {prefix l2t;}
29
30     revision "2015-10-20" {
31         description "Initial revision of IP level addressing for L2 host topology";
32     }
33
34     grouping  ip-address-group  {
35       description "IP addresses if present for L2 termination points";
36       container ip-attributes {
37         description "L2 termination points containing IP addresses";
38         list ip-addresses {
39           key ip;
40           leaf ip {
41             type inet:ip-address;
42             description "IPv4 or IPv6 address";
43           }
44         }
45       }
46     } // grouping  ip-address-group
47
48
49     grouping rw-network-attributes {
50       description "RW Topology scope attributes";
51       container rw-network-attributes {
52         description "Containing RW network attributes";
53         leaf name {
54           type string;
55           description "Name of the RW Topology network";
56         }
57         leaf sdn-account-name {
58           type string;
59           description "Name of the SDN account from which topology is got"; 
60         }
61       }
62     }
63
64     grouping  rw-node-attributes {
65       description "RW node attributes";
66       container rw-node-attributes {
67         description "Containing RW node attributes";
68         leaf name {
69           type string;
70           description "Node name";
71         }
72         leaf ovs-bridge-name {
73           type string;
74          description "Name of OVS bridge";
75         } 
76       }
77     }
78
79     grouping rw-link-attributes {
80       description "RW link attributes";
81       container rw-link-attributes {
82         description "Containing RW link attributes";
83         leaf name {
84           type string;
85           description "Link name";
86         }
87       }
88     }
89
90     grouping rw-termination-point-attributes {
91       description "RW termination point attributes";
92       container rw-termination-point-attributes {
93         description "Containing RW TP attributes";
94         leaf description {
95           type string;
96           description "Port description";
97         }
98         uses ip-address-group;
99       }
100     }
101
102     augment "/nw:network" {
103       description
104         "Configuration parameters for the RW network
105          as a whole";
106       uses rw-network-attributes;
107     }
108
109     augment "/nw:network/nw:node" {
110       description
111         "Configuration parameters for RW at the node
112          level";
113       uses rw-node-attributes;
114     }
115
116     augment "/nw:network/nt:link" {
117       description "Augment RW topology link information";
118       uses rw-link-attributes;
119     }
120
121     augment "/nw:network/nw:node/nt:termination-point" {
122       description
123         "Augment RW topology termination point configuration";
124       uses rw-termination-point-attributes;
125     }
126 }