blob: 0a1e9b20a835ff935831bdbe9f468a97ea83ca55 [file] [log] [blame]
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08001syntax = "proto3";
2
3package voltha;
4
5import "meta.proto";
6import "google/protobuf/any.proto";
Zsolt Haraszti66862032016-11-28 14:28:39 -08007import "common.proto";
Zsolt Haraszti00d9a842016-11-23 11:18:23 -08008import "openflow_13.proto";
9
10// A Device Type
11message DeviceType {
12
13 // Unique name for the device type
14 string id = 1;
15
16 // Name of the adapter that handles device type
17 string adapter = 2;
18
Zsolt Harasztic5c5d102016-12-07 21:12:27 -080019 // Capabilitities
20
21 bool accepts_bulk_flow_update = 3;
22 bool accepts_add_remove_flow_updates = 4;
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080023
24}
25
26// A plurality of device types
27message DeviceTypes {
28 repeated DeviceType items = 1;
29}
30
31message Port {
Zsolt Haraszti66862032016-11-28 14:28:39 -080032
33 enum PortType {
34 UNKNOWN = 0;
35 ETHERNET_NNI = 1;
36 ETHERNET_UNI = 2;
37 PON_OLT = 3;
38 PON_ONU = 4;
39 }
40
41 uint32 port_no = 1; // Device-unique port number
42
43 string label = 2; // Arbitrary port label
44
45 PortType type = 3; // Type of port
46
47 AdminState.AdminState admin_state = 5;
48
49 OperStatus.OperStatus oper_status = 6;
50
51 string device_id = 7; // Unique .id of device that owns this port
52
53 message PeerPort {
54 string device_id = 1;
55 uint32 port_no = 2;
56 }
57 repeated PeerPort peers = 8;
58
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080059}
60
61message Ports {
62 repeated Port items = 1;
63}
64
65// A Physical Device instance
66message Device {
67
68 // Voltha's device identifier
Zsolt Haraszti66862032016-11-28 14:28:39 -080069 string id = 1 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080070
71 // Device type, refers to one of the registered device types
Zsolt Haraszti66862032016-11-28 14:28:39 -080072 string type = 2 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080073
74 // Is this device a root device. Each logical switch has one root
75 // device that is associated with the logical flow switch.
Zsolt Haraszti66862032016-11-28 14:28:39 -080076 bool root = 3 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080077
Zsolt Haraszti66862032016-11-28 14:28:39 -080078 // Parent device id, in the device tree (for a root device, the parent_id
79 // is the logical_device.id)
80 string parent_id = 4 [(access) = READ_ONLY];
81 uint32 parent_port_no = 20 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080082
83 // Vendor, version, serial number, etc.
Zsolt Haraszti66862032016-11-28 14:28:39 -080084 string vendor = 5 [(access) = READ_ONLY];
85 string model = 6 [(access) = READ_ONLY];
86 string hardware_version = 7 [(access) = READ_ONLY];
87 string firmware_version = 8 [(access) = READ_ONLY];
88 string software_version = 9 [(access) = READ_ONLY];
89 string serial_number = 10 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -080090
91 // Addapter that takes care of device
Zsolt Haraszti66862032016-11-28 14:28:39 -080092 string adapter = 11 [(access) = READ_ONLY];
93
94 // Device contact on vlan (if 0, no vlan)
95 uint32 vlan = 12;
96
Zsolt Harasztic5c5d102016-12-07 21:12:27 -080097 message ProxyAddress {
Zsolt Haraszti66862032016-11-28 14:28:39 -080098 string device_id = 1; // Which device to use as proxy to this device
99 uint32 channel_id = 2; // Sub-address within proxy device
100 };
101
102 oneof address {
103 // Device contact MAC address (format: "xx:xx:xx:xx:xx:xx")
104 string mac_address = 13;
105
106 // Device contact IPv4 address (format: "a.b.c.d" or can use hostname too)
107 string ipv4_address = 14;
108
109 // Device contact IPv6 address using the canonical string form
110 // ("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx")
111 string ipv6_address = 15;
112
Zsolt Harasztic5c5d102016-12-07 21:12:27 -0800113 ProxyAddress proxy_device = 19;
Zsolt Haraszti66862032016-11-28 14:28:39 -0800114 };
115
116 AdminState.AdminState admin_state = 16;
117
118 OperStatus.OperStatus oper_status = 17 [(access) = READ_ONLY];
119
120 ConnectStatus.ConnectStatus connect_status = 18 [(access) = READ_ONLY];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800121
122 // TODO additional common attribute here
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800123
124 // Device type specific attributes
125 google.protobuf.Any custom = 64;
126
Zsolt Haraszti66862032016-11-28 14:28:39 -0800127 repeated Port ports = 128 [(child_node) = {key: "port_no"}];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800128 openflow_13.Flows flows = 129 [(child_node) = {}];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800129 openflow_13.FlowGroups flow_groups = 130 [(child_node) = {}];
Zsolt Haraszti00d9a842016-11-23 11:18:23 -0800130
131}
132
133message Devices {
134 repeated Device items = 1;
135}