blob: 4fc261f15415c386029869aa0518c69b99ec8c34 [file] [log] [blame]
syntax = "proto3";
package voltha;
import "meta.proto";
import "google/protobuf/any.proto";
import "common.proto";
import "openflow_13.proto";
// A Device Type
message DeviceType {
// Unique name for the device type
string id = 1;
// Name of the adapter that handles device type
string adapter = 2;
// Capabilitities
bool accepts_bulk_flow_update = 3;
bool accepts_add_remove_flow_updates = 4;
}
// A plurality of device types
message DeviceTypes {
repeated DeviceType items = 1;
}
message Port {
enum PortType {
UNKNOWN = 0;
ETHERNET_NNI = 1;
ETHERNET_UNI = 2;
PON_OLT = 3;
PON_ONU = 4;
}
uint32 port_no = 1; // Device-unique port number
string label = 2; // Arbitrary port label
PortType type = 3; // Type of port
AdminState admin_state = 5;
OperStatus oper_status = 6;
string device_id = 7; // Unique .id of device that owns this port
message PeerPort {
string device_id = 1;
uint32 port_no = 2;
}
repeated PeerPort peers = 8;
}
message Ports {
repeated Port items = 1;
}
// A Physical Device instance
message Device {
// Voltha's device identifier
string id = 1 [(access) = READ_ONLY];
// Device type, refers to one of the registered device types
string type = 2 [(access) = READ_ONLY];
// Is this device a root device. Each logical switch has one root
// device that is associated with the logical flow switch.
bool root = 3 [(access) = READ_ONLY];
// Parent device id, in the device tree (for a root device, the parent_id
// is the logical_device.id)
string parent_id = 4 [(access) = READ_ONLY];
uint32 parent_port_no = 20 [(access) = READ_ONLY];
// Vendor, version, serial number, etc.
string vendor = 5 [(access) = READ_ONLY];
string model = 6 [(access) = READ_ONLY];
string hardware_version = 7 [(access) = READ_ONLY];
string firmware_version = 8 [(access) = READ_ONLY];
string software_version = 9 [(access) = READ_ONLY];
string serial_number = 10 [(access) = READ_ONLY];
// Addapter that takes care of device
string adapter = 11 [(access) = READ_ONLY];
// Device contact on vlan (if 0, no vlan)
uint32 vlan = 12;
message ProxyAddress {
string device_id = 1; // Which device to use as proxy to this device
uint32 channel_id = 2; // Sub-address within proxy device
};
oneof address {
// Device contact MAC address (format: "xx:xx:xx:xx:xx:xx")
string mac_address = 13;
// Device contact IPv4 address (format: "a.b.c.d" or can use hostname too)
string ipv4_address = 14;
// Device contact IPv6 address using the canonical string form
// ("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx")
string ipv6_address = 15;
ProxyAddress proxy_address = 19;
};
AdminState admin_state = 16;
OperStatus oper_status = 17 [(access) = READ_ONLY];
ConnectStatus connect_status = 18 [(access) = READ_ONLY];
// TODO additional common attribute here
// Device type specific attributes
google.protobuf.Any custom = 64;
repeated Port ports = 128 [(child_node) = {key: "port_no"}];
openflow_13.Flows flows = 129 [(child_node) = {}];
openflow_13.FlowGroups flow_groups = 130 [(child_node) = {}];
}
message Devices {
repeated Device items = 1;
}