blob: 16615e8e9e7c16129671cbc38a7cdd597a28c44f [file] [log] [blame]
Peter K. Lee0db45ac2016-09-13 00:30:37 -07001module cord-service-vsg {
2 namespace "urn:onlab:cord:service:volt";
3 prefix volt;
4 yang-version 1.1;
5
6 import ietf-yang-types { prefix yang; }
7 import xos-core { prefix xos; }
8 import cord-service-volt { prefix volt; }
9
10 organization
11 "Open Networking Lab (CORD) / Corenova Technologies";
12
13 contact
14 "Larry Peterson <llp@onlab.us>
15 Peter K. Lee <peter@corenova.com>";
16
17 revision 2016-09-09 {
18 description "Initial revision.";
19 }
20
21 identity vsg-service { base xos:service; }
22
23 typedef subscriber-flow {
24 type leafref {
25 path "/vsg:service/vsg:provider/vsg:port/vsg:id";
26 }
27 }
28
29 grouping provider {
30 description
31 "This grouping represents a VSG agent/provider which manages multiple
32 VSG gateways. The VSG agent provides agregate abstraction of
33 the entire NFaaS as a single switch to the controller. Each
Peter K. Leec3960502016-09-13 11:47:02 -070034 port entry of the agent represents each VSG subscriber flow as
35 a separate openflow port.";
Peter K. Lee0db45ac2016-09-13 00:30:37 -070036
37 list gateway {
38 description
39 "Each entry represents a VSG instance managed by the agent.";
40
Peter K. Leec3960502016-09-13 11:47:02 -070041 leaf id { type xos:unique-identifier; }
42
Peter K. Lee0db45ac2016-09-13 00:30:37 -070043 container services {
44 description
45 "Contains various services provided by the gateway.";
46 container cdn {
47 if-feature cdn;
48 }
49 container firewall {
50 if-feature firewall;
51 leaf-list rules { type string; }
52 }
53 container url-filter {
54 if-feature url-filter;
55 leaf level {
56 type enumeration {
57 enum "PG";
58 // others...
59 }
60 }
61 leaf-list rules { type string; }
62 }
63 container uverse {
64 if-feature uverse;
65 }
66 }
Peter K. Leec3960502016-09-13 11:47:02 -070067 list flow {
68 description
69 "Each flow represents a subscriber flow into the VSG instance.";
70 leaf id {
71 type yang:uuid;
72 }
73 }
Peter K. Lee0db45ac2016-09-13 00:30:37 -070074 }
75 list port {
76 description
Peter K. Leec3960502016-09-13 11:47:02 -070077 "Each entry represents a VSG subscriber flow connected across VSG
78 gateways.";
Peter K. Lee0db45ac2016-09-13 00:30:37 -070079 key id;
80 leaf id {
81 description "OpenFlow Port ID";
82 type yang:uuid;
83 mandatory true;
84 }
85 leaf link {
86 type leafref {
Peter K. Leec3960502016-09-13 11:47:02 -070087 path '../../gateway/flow/id';
Peter K. Lee0db45ac2016-09-13 00:30:37 -070088 }
89 mandatory true;
90 }
91 }
92 }
93 grouping subscriber {
94 description
95 "This grouping represents a VSG service subscriber along with
96 reference to fabric flows used by the subscriber.";
97
98 leaf status {
99 type enumeration {
100 enum "enabled" {
101 description "Enabled";
102 value 1;
103 }
104 enum "suspended" {
105 description "Suspended";
106 }
107 enum "delinquent" {
108 description "Delinquent";
109 }
110 enum "violation" {
111 description "Copyright Violation";
112 }
113 }
114 default enabled;
115 }
116 leaf demo { type boolean; default false; }
117 leaf uplink-speed { type volt:bandwidth; }
118 leaf downlink-speed { type volt:bandwidth; }
119
120 list tag {
121 description
122 "Each entry represents a unique openflow port ID that the subscriber
123 connects to the VSG service from the fabric.";
124
125 key flow;
126 leaf flow {
127 type union {
128 type volt:subscriber-flow;
129 type vsg:subscriber-flow {
130 description "can be an output flow from the VSG service.";
131 }
132 type yang:uuid {
133 description "supports a generic openflow port ID";
134 }
135 }
136 }
137 }
138 leaf-list flows {
139 description
140 "Each entry represents a unique openflow port ID that the subscriber
141 uses to connect into the fabric from the VSG service.";
142 config false;
143 type subscriber-flow;
144 }
145 }
146
147 /*
148 * Configuration data
149 */
150 container service {
151 uses xos:service {
152 refine kind { default vsg-service; }
153 augment "provider" { uses vsg:provider; }
154 augment "subscriber" { uses vsg:subscriber; }
155 }
156 }
157}