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.AdminState admin_state = 5;

    OperStatus.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.AdminState admin_state = 16;

    OperStatus.OperStatus oper_status = 17 [(access) = READ_ONLY];

    ConnectStatus.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;
}
