blob: e7fef4b82bc4afdf699ca55235967dbeeeb32ef4 [file] [log] [blame]
Andy Bavier03df22b2017-08-30 14:46:02 -07001option name = "volt";
Matteo Scandolobfc31332018-03-29 09:06:52 -07002option app_label = "volt";
Andy Bavier03df22b2017-08-30 14:46:02 -07003
4message VOLTService (Service){
Matteo Scandolo43473812018-03-02 10:55:54 -08005 option verbose_name = "vOLT Service";
6 option kind = "vOLT";
Scott Baker2108e752019-01-17 07:00:32 -08007 option description = "OLT Access Service";
Scott Baker48a4f452019-05-31 17:58:21 -07008 option custom_python = "True";
Matteo Scandolo4a8b4d62018-03-06 17:18:46 -08009
Scott Baker1e043272019-01-24 08:33:15 -080010 required string voltha_url = 1 [
11 help_text = "The Voltha API address. By default voltha.voltha.svc.cluster.local",
Scott Baker1e043272019-01-24 08:33:15 -080012 default = "voltha.voltha.svc.cluster.local",
Scott Bakera108b9c2019-04-09 14:13:44 -070013 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080014 required int32 voltha_port = 2 [
15 help_text = "The Voltha API port. By default 8882",
Scott Baker1e043272019-01-24 08:33:15 -080016 default = 8882];
17 required string voltha_user = 3 [
18 help_text = "The Voltha username. By default voltha",
Scott Baker1e043272019-01-24 08:33:15 -080019 default = "voltha",
Scott Bakera108b9c2019-04-09 14:13:44 -070020 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080021 required string voltha_pass = 4 [
22 help_text = "The Voltha password. By default admin",
Scott Baker1e043272019-01-24 08:33:15 -080023 default = "admin",
Scott Bakera108b9c2019-04-09 14:13:44 -070024 max_length = 256];
Andy Bavier03df22b2017-08-30 14:46:02 -070025}
26
Matteo Scandolo4a8b4d62018-03-06 17:18:46 -080027message OLTDevice (XOSBase){
28 option verbose_name = "OLT Device";
29 option description="Represents a physical OLT device";
Scott Baker48a4f452019-05-31 17:58:21 -070030 option custom_python = "True";
vigneshethiraj8b163672019-06-04 18:55:19 +053031 option sync_implemented = "True";
Andy Bavier03df22b2017-08-30 14:46:02 -070032
Scott Baker1e043272019-01-24 08:33:15 -080033 required manytoone volt_service->VOLTService:volt_devices = 1:1001 [
34 help_text = "VOLTService that owns this OLT",
35 db_index = True];
36 optional string name = 2 [
37 help_text = "Human-readable name of device",
Scott Bakera108b9c2019-04-09 14:13:44 -070038 max_length = 256,
Scott Baker1e043272019-01-24 08:33:15 -080039 unique = True];
40 required string device_type = 3 [
41 help_text = "Phyiscal Device Type",
Scott Baker1e043272019-01-24 08:33:15 -080042 default = "openolt",
Scott Bakera108b9c2019-04-09 14:13:44 -070043 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080044 optional string host = 4 [
45 help_text = "IP Address of physical OLT Device",
Scott Bakera108b9c2019-04-09 14:13:44 -070046 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080047 optional int32 port = 5 [
48 help_text = "Port Number of physical OLT Device",
Scott Baker1e043272019-01-24 08:33:15 -080049 unique_with = "host"];
50 optional string mac_address = 6 [
Scott Bakera108b9c2019-04-09 14:13:44 -070051 help_text = "MAC address of physical OLT Device",
52 max_length = 17];
Matteo Scandolo4a8b4d62018-03-06 17:18:46 -080053
Scott Baker1e043272019-01-24 08:33:15 -080054 optional string serial_number = 9 [
Scott Bakera108b9c2019-04-09 14:13:44 -070055 help_text = "Serial Number",
56 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080057 optional string device_id = 10 [
58 help_text = "Voltha Device ID",
Scott Bakera108b9c2019-04-09 14:13:44 -070059 feedback_state = True,
60 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080061 optional string admin_state = 11 [
62 help_text = "admin state, whether OLT should be enabled",
63 choices = "(('DISABLED', 'DISABLED'), ('ENABLED', 'ENABLED'))",
Scott Bakera108b9c2019-04-09 14:13:44 -070064 default = "ENABLED",
65 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -080066 optional string oper_status = 12 [
67 help_text = "operational status, whether OLT is active",
Scott Bakera108b9c2019-04-09 14:13:44 -070068 feedback_state = True,
69 max_length = 256];
Scott Baker12687732019-03-19 15:40:57 -070070 optional string link_status = 21 [
71 help_text = "connectivity status, whether OLT has connectivity to agg switch",
72 choices = "(('up', 'up'), ('down', 'down'))",
Scott Bakera108b9c2019-04-09 14:13:44 -070073 feedback_state = True,
74 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -080075 optional string of_id = 13 [
76 help_text = "Logical device openflow id",
Scott Bakera108b9c2019-04-09 14:13:44 -070077 feedback_state = True,
78 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080079 optional string dp_id = 14 [
Scott Bakera108b9c2019-04-09 14:13:44 -070080 help_text = "Logical device datapath id",
81 max_length = 256];
Matteo Scandolo4a8b4d62018-03-06 17:18:46 -080082
Scott Baker1e043272019-01-24 08:33:15 -080083 required string uplink = 15 [
Scott Bakera108b9c2019-04-09 14:13:44 -070084 help_text = "uplink port, exposed via sadis",
85 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080086 required string driver = 16 [
87 help_text = "DEPRECATED",
Scott Bakera108b9c2019-04-09 14:13:44 -070088 default = "voltha",
89 max_length = 32]; // Used to be sent to ONOS, now unused.
Matteo Scandolod3c768d2018-04-11 13:38:49 -070090
Scott Baker1e043272019-01-24 08:33:15 -080091 optional string switch_datapath_id = 17 [
Scott Bakera108b9c2019-04-09 14:13:44 -070092 help_text = "Fabric switch to which the OLT is connected",
93 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080094 optional string switch_port = 18 [
Scott Bakera108b9c2019-04-09 14:13:44 -070095 help_text = "Fabric port to which the OLT is connected",
96 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -080097 optional string outer_tpid = 19 [
Scott Bakera108b9c2019-04-09 14:13:44 -070098 help_text = "Outer VLAN id field EtherType",
99 max_length = 256];
Matteo Scandolo610c11d2018-08-31 07:33:43 -0700100
Scott Baker1e043272019-01-24 08:33:15 -0800101 optional string nas_id = 20 [
Scott Bakera108b9c2019-04-09 14:13:44 -0700102 help_text = "Authentication ID (propagated to the free-radius server via sadis)",
103 max_length = 256];
Andy Bavier03df22b2017-08-30 14:46:02 -0700104}
105
Matteo Scandolo6be6ee92018-05-24 15:07:51 -0700106message PortBase (XOSBase){
107 option gui_hidden = True;
Scott Baker1e043272019-01-24 08:33:15 -0800108 option description = "Base class for Port objects";
Matteo Scandolo6be6ee92018-05-24 15:07:51 -0700109
Scott Baker1e043272019-01-24 08:33:15 -0800110 required string name = 1 [
111 help_text = "Human-readable name of port",
Scott Bakera108b9c2019-04-09 14:13:44 -0700112 db_index = True,
113 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -0800114 required int32 port_no = 3 [
Scott Baker3f4816f2019-03-12 15:06:01 -0700115 help_text = "Port Number"];
Matteo Scandolo6be6ee92018-05-24 15:07:51 -0700116
Scott Baker1e043272019-01-24 08:33:15 -0800117 optional string admin_state = 4 [
118 help_text = "admin state, whether port should be enabled",
Scott Bakera108b9c2019-04-09 14:13:44 -0700119 // TODO: Should specify "choices"
120 feedback_state = True,
121 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -0800122 optional string oper_status = 5 [
123 help_text = "operational status, whether port is active",
Scott Bakera108b9c2019-04-09 14:13:44 -0700124 // TODO: Should specify "choices"
125 feedback_state = True,
126 max_length = 32];
Matteo Scandolo6be6ee92018-05-24 15:07:51 -0700127}
128
129message PONPort (PortBase){
Matteo Scandolo80912942018-07-25 20:51:30 -0700130 option verbose_name = "PON Port";
Scott Baker1e043272019-01-24 08:33:15 -0800131 option description = "PON Port";
Matteo Scandolo4a8b4d62018-03-06 17:18:46 -0800132
Scott Baker1e043272019-01-24 08:33:15 -0800133 required manytoone olt_device->OLTDevice:pon_ports = 1:1001 [
134 help_text = "OLTDevice that owns this PONPort",
135 db_index = True];
Matteo Scandolo6be6ee92018-05-24 15:07:51 -0700136}
137
138message NNIPort (PortBase) {
139 option verbose_name = "NNI Port";
Scott Baker1e043272019-01-24 08:33:15 -0800140 option description = "NNI Port";
141
142 required manytoone olt_device->OLTDevice:nni_ports = 1:1002 [
143 help_text = "OLTDevice that owns this NNIPort",
144 db_index = True];
Andy Bavier03df22b2017-08-30 14:46:02 -0700145}
Matteo Scandoloe2cb8a42018-05-18 16:30:06 -0700146
147message ONUDevice (XOSBase){
148 option verbose_name = "ONU Device";
149 option description = "Represents a physical ONU device";
Scott Baker48a4f452019-05-31 17:58:21 -0700150 option custom_python = "True";
vigneshethiraj8b163672019-06-04 18:55:19 +0530151 option sync_implemented = "True";
Matteo Scandoloe2cb8a42018-05-18 16:30:06 -0700152
Scott Baker1e043272019-01-24 08:33:15 -0800153 required manytoone pon_port->PONPort:onu_devices = 1:1001 [
154 help_text = "PONPort that connects this ONUDevice to an OLTDevice",
155 db_index = True];
156 required string serial_number = 2 [
157 help_text = "Serial number of ONU Device",
Scott Bakera108b9c2019-04-09 14:13:44 -0700158 max_length = 256,
Scott Baker1e043272019-01-24 08:33:15 -0800159 tosca_key=True,
160 unique = True];
161 required string vendor = 3 [
162 help_text = "Vendor of ONU Device",
Scott Bakera108b9c2019-04-09 14:13:44 -0700163 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -0800164 required string device_type = 4 [
165 help_text = "Device Type",
Scott Baker1e043272019-01-24 08:33:15 -0800166 default = "asfvolt16_olt",
Scott Bakera108b9c2019-04-09 14:13:44 -0700167 max_length = 256];
Matteo Scandoloe2cb8a42018-05-18 16:30:06 -0700168
Scott Baker1e043272019-01-24 08:33:15 -0800169 optional string device_id = 5 [
170 help_text = "Voltha Device ID",
Scott Baker1e043272019-01-24 08:33:15 -0800171 feedback_state = True,
Scott Bakera108b9c2019-04-09 14:13:44 -0700172 max_length = 256];
Scott Baker1e043272019-01-24 08:33:15 -0800173 optional string admin_state = 6 [
174 help_text = "admin state, whether port should be enabled",
Andy Baviercd940192019-05-15 12:59:35 -0700175 choices = "(('DISABLED', 'DISABLED'), ('ENABLED', 'ENABLED'), ('ADMIN_DISABLED', 'ADMIN_DISABLED'))",
Scott Bakera108b9c2019-04-09 14:13:44 -0700176 default = "ENABLED",
177 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -0800178 optional string oper_status = 7 [
179 help_text = "oper_status",
Scott Bakera108b9c2019-04-09 14:13:44 -0700180 // TODO: Should add "choices"
181 feedback_state = True,
182 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -0800183 optional string connect_status = 8 [
184 help_text = "operational status, whether port is active",
Scott Bakera108b9c2019-04-09 14:13:44 -0700185 feedback_state = True,
186 max_length = 32];
Scott Baker1e043272019-01-24 08:33:15 -0800187 optional string reason = 9 [
188 help_text = "ONU device configuration state machine status message",
Scott Bakera108b9c2019-04-09 14:13:44 -0700189 feedback_state = True,
190 text = True];
Matteo Scandolo2360fd92018-05-29 17:27:51 -0700191}
192
Matteo Scandolo915c7b82019-05-09 16:26:12 -0700193message ANIPort (PortBase) {
Matteo Scandolo80912942018-07-25 20:51:30 -0700194 option verbose_name = "ANI Port";
Scott Baker2108e752019-01-17 07:00:32 -0800195 option description="Access Node Interface Port";
Matteo Scandolo915c7b82019-05-09 16:26:12 -0700196 required manytoone onu_device->ONUDevice:ani_ports = 1:1001 [
197 help_text = "ONUDevice that owns this ANIPort",
Scott Baker1e043272019-01-24 08:33:15 -0800198 db_index = True];
Matteo Scandolod8ed60e2018-06-18 17:00:57 -0700199}
200
201message UNIPort (PortBase) {
202 option verbose_name = "UNI Port";
Scott Baker2108e752019-01-17 07:00:32 -0800203 option description = "User Network Interface Port";
Scott Baker1e043272019-01-24 08:33:15 -0800204 required manytoone onu_device->ONUDevice:uni_ports = 1:1002 [
205 help_text = "ONUDevice that owns this UNIPort",
206 db_index = True];
Matteo Scandolod8ed60e2018-06-18 17:00:57 -0700207}
208
Matteo Scandolo2360fd92018-05-29 17:27:51 -0700209message VOLTServiceInstance (ServiceInstance){
210 option kind = "vOLT";
211 option owner_class_name = "VOLTService";
212 option verbose_name = "vOLT Service Instance";
Scott Baker2108e752019-01-17 07:00:32 -0800213 option description = "Represents subscriber tenancy in the VOLT Service";
vigneshethiraj8b163672019-06-04 18:55:19 +0530214 option policy_implemented = "True";
Matteo Scandolo2360fd92018-05-29 17:27:51 -0700215
Scott Baker1e043272019-01-24 08:33:15 -0800216 optional string description = 1 [
217 help_text = "Human-readable description",
Scott Bakera108b9c2019-04-09 14:13:44 -0700218 text = True];
Scott Baker1e043272019-01-24 08:33:15 -0800219 optional manytoone onu_device->ONUDevice:volt_service_instances = 2:1003 [
220 help_text = "ONUDevice that belongs to this Subscriber chain",
221 db_index = True];
Scott Baker6ff7a4a2018-10-01 12:19:49 -0700222}
Hardik Windlassda0d6c42019-05-13 16:00:01 +0000223
224message TechnologyProfile (XOSBase) {
225 option verbose_name = "Technology Profile";
226 option description = "The Technology Profile that is utilized by VOLTHA";
Scott Baker48a4f452019-05-31 17:58:21 -0700227 option custom_python = "True";
Hardik Windlassda0d6c42019-05-13 16:00:01 +0000228
229 required string technology = 1 [
230 help_text = "The technology being utilized by the adaptor",
231 db_index = True,
Matteo Scandolo7bba07b2019-06-11 09:34:04 -0700232 tosca_key = True,
Hardik Windlassda0d6c42019-05-13 16:00:01 +0000233 max_length = 16];
234 required int32 profile_id = 2 [
235 help_text = "The numeric id of the profile",
236 db_index = True,
Matteo Scandolo7bba07b2019-06-11 09:34:04 -0700237 tosca_key = True,
Hardik Windlassda0d6c42019-05-13 16:00:01 +0000238 min_value = 64,
239 max_value = 255];
240 required string profile_value = 3 [
241 help_text = "The technology profile value in JSON format",
242 max_length = 4096];
243}