// Copyright (c) 2018 Open Networking Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

option go_package = "github.com/opencord/voltha-protos/v3/go/openolt";
option java_package = "org.opencord.voltha.openolt";
option java_outer_classname = "VolthaOpenOLT";

package openolt;
import "google/api/annotations.proto";
import public "voltha_protos/tech_profile.proto";

service Openolt {

    rpc DisableOlt(Empty) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/Disable"
          body: "*"
        };
    }

    rpc ReenableOlt(Empty) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/Reenable"
          body: "*"
        };
    }

    rpc ActivateOnu(Onu) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/EnableOnu"
          body: "*"
        };
    }

    rpc DeactivateOnu(Onu) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/DisableOnu"
          body: "*"
        };
    }

    rpc DeleteOnu(Onu) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/DeleteOnu"
          body: "*"
        };
    }

    rpc OmciMsgOut(OmciMsg) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/OmciMsgOut"
          body: "*"
        };
    }

    rpc OnuPacketOut(OnuPacket) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/OnuPacketOut"
          body: "*"
        };
    }

    rpc UplinkPacketOut(UplinkPacket) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/UplinkPacketOut"
          body: "*"
        };
    }

    rpc FlowAdd(Flow) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/FlowAdd"
          body: "*"
        };
    }

    rpc FlowRemove(Flow) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/FlowRemove"
          body: "*"
        };
    }

    rpc HeartbeatCheck(Empty) returns (Heartbeat) {
        option (google.api.http) = {
          post: "/v1/HeartbeatCheck"
          body: "*"
        };
    }

    rpc EnablePonIf(Interface) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/EnablePonIf"
            body: "*"
        };
    }

    rpc DisablePonIf(Interface) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/DisablePonIf"
            body: "*"
        };
    }

    rpc GetDeviceInfo(Empty) returns (DeviceInfo) {
        option (google.api.http) = {
            post: "/v1/GetDeviceInfo"
            body: "*"
        };
    }

    rpc Reboot(Empty) returns (Empty) {
         option (google.api.http) = {
            post: "/v1/Reboot"
            body: "*"
        };
    }

    rpc CollectStatistics(Empty) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/CollectStatistics"
            body: "*"
        };
    }

    rpc CreateTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/CreateTrafficSchedulers"
            body: "*"
        };
    }

    rpc RemoveTrafficSchedulers(tech_profile.TrafficSchedulers) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/RemoveTrafficSchedulers"
            body: "*"
        };
    }

    rpc CreateTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/CreateTrafficQueues"
            body: "*"
        };
    }

    rpc RemoveTrafficQueues(tech_profile.TrafficQueues) returns (Empty) {
        option (google.api.http) = {
            post: "/v1/RemoveTrafficQueues"
            body: "*"
        };
    }

    rpc EnableIndication(Empty) returns (stream Indication) {}

    rpc PerformGroupOperation(Group) returns (Empty) {
        option (google.api.http) = {
          post: "/v1/PerformGroupOperation"
          body: "*"
        };
    }
}

message Indication {
    oneof data {
        OltIndication olt_ind = 1;
        IntfIndication intf_ind = 2;
        IntfOperIndication intf_oper_ind = 3;
        OnuDiscIndication onu_disc_ind = 4;
        OnuIndication onu_ind = 5;
        OmciIndication omci_ind = 6;
        PacketIndication pkt_ind = 7;
        PortStatistics port_stats = 8;
        FlowStatistics flow_stats = 9;
        AlarmIndication alarm_ind= 10;
    }
}

message AlarmIndication {
    oneof data {
        LosIndication los_ind = 1;
        DyingGaspIndication dying_gasp_ind = 2;
        OnuAlarmIndication onu_alarm_ind = 3;
        OnuStartupFailureIndication onu_startup_fail_ind = 4;
        OnuSignalDegradeIndication onu_signal_degrade_ind = 5;
        OnuDriftOfWindowIndication onu_drift_of_window_ind = 6;
        OnuLossOfOmciChannelIndication onu_loss_omci_ind = 7;
        OnuSignalsFailureIndication onu_signals_fail_ind = 8;
        OnuTransmissionInterferenceWarning onu_tiwi_ind = 9;
        OnuActivationFailureIndication onu_activation_fail_ind = 10;
        OnuProcessingErrorIndication onu_processing_error_ind = 11;
        OnuLossOfKeySyncFailureIndication onu_loss_of_sync_fail_ind = 12;
        OnuItuPonStatsIndication onu_itu_pon_stats_ind = 13;
        OnuDeactivationFailureIndication onu_deactivation_failure_ind = 14;
        OnuRemoteDefectIndication onu_remote_defect_ind = 15;
        OnuLossOfGEMChannelDelineationIndication onu_loss_gem_delineation_ind = 16;
        OnuPhysicalEquipmentErrorIndication onu_physical_equipment_error_ind = 17;
        OnuLossOfAcknowledgementIndication onu_loss_of_ack_ind = 18;
        OnuDifferentialReachExceededIndication onu_diff_reach_exceeded_ind = 19;
    }
}

message OltIndication {
    string oper_state = 1;	// up, down
}

message IntfIndication {
    fixed32 intf_id = 1;
    string oper_state = 2;      // up, down
}

message OnuDiscIndication {
    fixed32 intf_id = 1;
    SerialNumber serial_number = 2;
}

message OnuIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string oper_state = 3;      // up, down
    string admin_state = 5;     // up, down
    SerialNumber serial_number = 4;
}

message IntfOperIndication {
    string type = 1;		// nni, pon
    fixed32 intf_id = 2;
    string oper_state = 3;      // up, down
}

message OmciIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    bytes pkt = 3;
}

message PacketIndication {
    string intf_type = 5;		// nni, pon, unknown
    fixed32 intf_id = 1;
    fixed32 gemport_id = 2;
    fixed32 flow_id = 3;
    fixed32 port_no = 6;
    fixed64 cookie = 7;
    bytes pkt = 4;
}

message Interface {
    fixed32 intf_id = 1;
}

message Heartbeat {
    fixed32 heartbeat_signature = 1;
}

message Onu {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    SerialNumber serial_number = 3;
    fixed32 pir = 4;   // peak information rate assigned to onu
}

message OmciMsg {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    bytes pkt = 3;
}

message OnuPacket {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    fixed32 port_no = 4;
    fixed32 gemport_id = 5;
    bytes pkt = 3;
}

message UplinkPacket {
    fixed32 intf_id = 1;
    bytes pkt = 2;
}

message DeviceInfo {
    string vendor = 1;
    string model = 2;
    string hardware_version = 3;
    string firmware_version = 4;
    string device_id = 16;
    string device_serial_number = 17;

    // Total number of pon intf ports on the device
    fixed32 pon_ports = 12;

    // If using global per-device technology profile. To be deprecated
    string technology = 5;
    fixed32 onu_id_start = 6;
    fixed32 onu_id_end = 7;
    fixed32 alloc_id_start = 8;
    fixed32 alloc_id_end = 9;
    fixed32 gemport_id_start = 10;
    fixed32 gemport_id_end = 11;
    fixed32 flow_id_start = 13;
    fixed32 flow_id_end = 14;

    message DeviceResourceRanges {

        // List of 0 or more intf_ids that use the same technology and pools.
        // If 0 intf_ids supplied, it implies ALL interfaces
        repeated fixed32 intf_ids = 1;

        // Technology profile for this pool
        string technology = 2;

        message Pool {
            enum PoolType {
                ONU_ID = 0;
                ALLOC_ID = 1;
                GEMPORT_ID = 2;
                FLOW_ID = 3;
            }

            enum SharingType {
                DEDICATED_PER_INTF = 0;
                SHARED_BY_ALL_INTF_ALL_TECH = 1; // Shared across all interfaces in all technologies in all ranges
                SHARED_BY_ALL_INTF_SAME_TECH = 2; // Shared across all interfaces of the same technology used in this range
            }

            PoolType type = 1;
	    SharingType sharing = 2;
	    fixed32 start = 3; // lower bound on IDs allocated from this pool
	    fixed32 end = 4; // upper bound on IDs allocated from this pool
	}
        repeated Pool pools = 3;
    }
    repeated DeviceResourceRanges ranges = 15;
}

message Classifier {
    fixed32 o_tpid = 1;
    fixed32 o_vid = 2;
    fixed32 i_tpid = 3;
    fixed32 i_vid = 4;
    fixed32 o_pbits = 5;
    fixed32 i_pbits = 6;
    fixed32 eth_type = 7;
    bytes dst_mac = 8;
    bytes src_mac = 9;
    fixed32 ip_proto = 10;
    fixed32 dst_ip = 11;
    fixed32 src_ip = 12;
    fixed32 src_port = 13;
    fixed32 dst_port = 14;
    string pkt_tag_type = 15;	// untagged, single_tag, double_tag
}

message ActionCmd {
    bool add_outer_tag = 1;
    bool remove_outer_tag = 2;
    bool trap_to_host = 3;
    bool remark_outer_pbits = 4;
    bool remark_inner_pbits = 5;
    bool add_inner_tag = 6;
    bool remove_inner_tag = 7;
    bool translate_inner_tag = 8;
    bool translate_outer_tag = 9;
}

message Action {
    ActionCmd cmd = 1;
    fixed32 o_vid = 2;
    fixed32 o_pbits = 3;
    fixed32 o_tpid = 4;
    fixed32 i_vid = 5;
    fixed32 i_pbits = 6;
    fixed32 i_tpid = 7;
}

message Flow {
    sfixed32 access_intf_id = 1;
    sfixed32 onu_id = 2;
    sfixed32 uni_id = 11;
    fixed32 flow_id = 3;
    string flow_type = 4;	// upstream, downstream, broadcast, multicast
    sfixed32 alloc_id = 10;
    sfixed32 network_intf_id = 5;
    sfixed32 gemport_id = 6;
    Classifier classifier = 7;
    Action action = 8;
    sfixed32 priority = 9;
    fixed64 cookie = 12; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
    fixed32 port_no = 13; // must be provided for any flow with trap_to_host action. Returned in PacketIndication
    fixed32 group_id = 14;
}

message SerialNumber {
    bytes vendor_id = 1;
    bytes vendor_specific = 2;
}

message PortStatistics {
    fixed32 intf_id = 1;
    fixed64 rx_bytes = 2;
    fixed64 rx_packets = 3;
    fixed64 rx_ucast_packets = 4;
    fixed64 rx_mcast_packets = 5;
    fixed64 rx_bcast_packets = 6;
    fixed64 rx_error_packets = 7;
    fixed64 tx_bytes = 8;
    fixed64 tx_packets = 9;
    fixed64 tx_ucast_packets = 10;
    fixed64 tx_mcast_packets = 11;
    fixed64 tx_bcast_packets = 12;
    fixed64 tx_error_packets = 13;
    fixed64 rx_crc_errors = 14;
    fixed64 bip_errors = 15;
    fixed32 timestamp = 16;
}

message FlowStatistics {
    fixed32 flow_id = 1;
    fixed64 rx_bytes = 2;
    fixed64 rx_packets = 3;
    fixed64 tx_bytes = 8;
    fixed64 tx_packets = 9;
    fixed32 timestamp = 16;
}

message LosIndication {
    fixed32 intf_id = 1;
    string status = 2;
}

message DyingGaspIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuAlarmIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string los_status = 3;
    string lob_status = 4;
    string lopc_miss_status = 5;
    string lopc_mic_error_status = 6;
    string lofi_status = 7;
    string loami_status = 8;
}

message OnuStartupFailureIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuSignalDegradeIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
    fixed32 inverse_bit_error_rate = 4;
}

message OnuDriftOfWindowIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
    fixed32 drift = 4;
    fixed32 new_eqd = 5;
}

message OnuLossOfOmciChannelIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuSignalsFailureIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
    fixed32 inverse_bit_error_rate = 4;
}

message OnuTransmissionInterferenceWarning {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
    fixed32 drift = 4;
}

message OnuActivationFailureIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    fixed32 fail_reason = 3;
}

message OnuLossOfKeySyncFailureIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuItuPonStatsIndication{
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    fixed32 rdi_errors = 3;
}

message OnuProcessingErrorIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
}

message OnuDeactivationFailureIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    fixed32 fail_reason = 3;
}

message OnuRemoteDefectIndication{
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    fixed32 rdi_errors = 3;
}

message OnuLossOfGEMChannelDelineationIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
    fixed32 delineation_errors = 4;
}

message OnuPhysicalEquipmentErrorIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuLossOfAcknowledgementIndication {
    fixed32 intf_id = 1;
    fixed32 onu_id = 2;
    string status = 3;
}

message OnuDifferentialReachExceededIndication {
        fixed32 intf_id = 1;
        fixed32 onu_id = 2;
        string status = 3;
        fixed32 distance = 4;
}

message GroupMember {
    enum InterfaceType {
        PON = 0;
        EPON_1G_PATH = 1;
        EPON_10G_PATH = 2;
    }
    uint32 interface_id = 1;
    InterfaceType interface_type = 2;
    uint32 gem_port_id = 3;
    uint32 priority = 4; // Priority (and also the ID) of the default fixed queue for the multicast traffic.
                         // This queue is attached to the default PON port scheduler.
}

message Group {
    enum GroupMembersCommand {
        ADD_MEMBERS = 0;
        REMOVE_MEMBERS = 1;
        SET_MEMBERS = 2;
    }

    uint32 group_id = 1;
    GroupMembersCommand command = 2;
    repeated GroupMember members = 3;
    Action action = 4;
}



message Empty {}

