blob: 0a1e9b20a835ff935831bdbe9f468a97ea83ca55 [file] [log] [blame]
Khen Nursimuluaaac7ee2016-12-11 22:03:52 -05001syntax = "proto3";
2
3package voltha;
4
5import "meta.proto";
6import "google/protobuf/any.proto";
7import "common.proto";
8import "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
19 // Capabilitities
20
21 bool accepts_bulk_flow_update = 3;
22 bool accepts_add_remove_flow_updates = 4;
23
24}
25
26// A plurality of device types
27message DeviceTypes {
28 repeated DeviceType items = 1;
29}
30
31message Port {
32
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
59}
60
61message Ports {
62 repeated Port items = 1;
63}
64
65// A Physical Device instance
66message Device {
67
68 // Voltha's device identifier
69 string id = 1 [(access) = READ_ONLY];
70
71 // Device type, refers to one of the registered device types
72 string type = 2 [(access) = READ_ONLY];
73
74 // Is this device a root device. Each logical switch has one root
75 // device that is associated with the logical flow switch.
76 bool root = 3 [(access) = READ_ONLY];
77
78 // 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];
82
83 // Vendor, version, serial number, etc.
84 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];
90
91 // Addapter that takes care of device
92 string adapter = 11 [(access) = READ_ONLY];
93
94 // Device contact on vlan (if 0, no vlan)
95 uint32 vlan = 12;
96
97 message ProxyAddress {
98 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
113 ProxyAddress proxy_device = 19;
114 };
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];
121
122 // TODO additional common attribute here
123
124 // Device type specific attributes
125 google.protobuf.Any custom = 64;
126
127 repeated Port ports = 128 [(child_node) = {key: "port_no"}];
128 openflow_13.Flows flows = 129 [(child_node) = {}];
129 openflow_13.FlowGroups flow_groups = 130 [(child_node) = {}];
130
131}
132
133message Devices {
134 repeated Device items = 1;
135}