blob: aeae976afffb35d8689672142c0a5bfb60a0f853 [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
34 port entry of the agent represents each VSG endpoint as a
35 separate openflow port.";
36
37 list gateway {
38 description
39 "Each entry represents a VSG instance managed by the agent.";
40
41 leaf id { type yang:uuid; }
42 container services {
43 description
44 "Contains various services provided by the gateway.";
45 container cdn {
46 if-feature cdn;
47 }
48 container firewall {
49 if-feature firewall;
50 leaf-list rules { type string; }
51 }
52 container url-filter {
53 if-feature url-filter;
54 leaf level {
55 type enumeration {
56 enum "PG";
57 // others...
58 }
59 }
60 leaf-list rules { type string; }
61 }
62 container uverse {
63 if-feature uverse;
64 }
65 }
66 }
67 list port {
68 description
69 "Each entry represents a VSG endpoint connected across VSG gateways.";
70 key id;
71 leaf id {
72 description "OpenFlow Port ID";
73 type yang:uuid;
74 mandatory true;
75 }
76 leaf link {
77 type leafref {
78 path '../../gateway/id';
79 }
80 mandatory true;
81 }
82 }
83 }
84 grouping subscriber {
85 description
86 "This grouping represents a VSG service subscriber along with
87 reference to fabric flows used by the subscriber.";
88
89 leaf status {
90 type enumeration {
91 enum "enabled" {
92 description "Enabled";
93 value 1;
94 }
95 enum "suspended" {
96 description "Suspended";
97 }
98 enum "delinquent" {
99 description "Delinquent";
100 }
101 enum "violation" {
102 description "Copyright Violation";
103 }
104 }
105 default enabled;
106 }
107 leaf demo { type boolean; default false; }
108 leaf uplink-speed { type volt:bandwidth; }
109 leaf downlink-speed { type volt:bandwidth; }
110
111 list tag {
112 description
113 "Each entry represents a unique openflow port ID that the subscriber
114 connects to the VSG service from the fabric.";
115
116 key flow;
117 leaf flow {
118 type union {
119 type volt:subscriber-flow;
120 type vsg:subscriber-flow {
121 description "can be an output flow from the VSG service.";
122 }
123 type yang:uuid {
124 description "supports a generic openflow port ID";
125 }
126 }
127 }
128 }
129 leaf-list flows {
130 description
131 "Each entry represents a unique openflow port ID that the subscriber
132 uses to connect into the fabric from the VSG service.";
133 config false;
134 type subscriber-flow;
135 }
136 }
137
138 /*
139 * Configuration data
140 */
141 container service {
142 uses xos:service {
143 refine kind { default vsg-service; }
144 augment "provider" { uses vsg:provider; }
145 augment "subscriber" { uses vsg:subscriber; }
146 }
147 }
148}