blob: 9ff86c5dfc67a908590114306ceb9fce9f0f5723 [file] [log] [blame]
syntax = "proto3";
option java_package = "org.onosproject.grpc.net.device";
import "net/device/DeviceDescriptionProto.proto";
import "net/device/PortDescriptionProto.proto";
import "net/device/PortStatisticsProto.proto";
import "net/device/DeviceEnumsProto.proto";
package Device;
message DeviceConnected {
// DeviceID as String DeviceId#toString
string device_id = 1;
net.device.DeviceDescriptionProto device_description = 2;
}
message DeviceDisconnected {
// DeviceID as String DeviceId#toString
string device_id = 1;
}
message UpdatePorts {
// DeviceID as String DeviceId#toString
string device_id = 1;
repeated net.device.PortDescriptionProto port_descriptions= 2;
}
message PortStatusChanged {
// DeviceID as String DeviceId#toString
string device_id = 1;
net.device.PortDescriptionProto port_description= 2;
}
message ReceivedRoleReply {
// DeviceID as String DeviceId#toString
string device_id = 1;
net.device.MastershipRoleProto requested = 2;
net.device.MastershipRoleProto response = 3;
}
message UpdatePortStatistics {
// DeviceID as String DeviceId#toString
string device_id = 1;
repeated net.device.PortStatisticsProto port_statistics = 2;
}
message RegisterProvider {
// DeviceProvider's ProviderId scheme
string provider_scheme = 1;
}
message DeviceProviderServiceMsg {
oneof method {
DeviceConnected device_connected= 1;
DeviceDisconnected device_disconnected = 2;
UpdatePorts update_ports= 3;
PortStatusChanged port_status_changed = 4;
ReceivedRoleReply received_role_reply = 5;
UpdatePortStatistics update_port_statistics = 6;
// This message is for return value of DeviceProvider#isReachable
IsReachableResponse is_reachable_response = 7;
// This MUST be the 1st message over the stream
RegisterProvider register_provider = 8;
}
}
message TriggerProbe {
// DeviceID as String DeviceId#toString
string device_id = 1;
}
message RoleChanged {
// DeviceID as String DeviceId#toString
string device_id = 1;
net.device.MastershipRoleProto new_role = 2;
}
message IsReachableRequest {
int32 xid = 1;
// DeviceID as String DeviceId#toString
string device_id = 2;
}
message IsReachableResponse {
int32 xid = 1;
bool is_reachable = 2;
}
message DeviceProviderMsg {
oneof method {
TriggerProbe trigger_probe = 1;
RoleChanged role_changed = 2;
IsReachableRequest is_reachable_request= 3;
}
}
service DeviceProviderRegistryRpc {
rpc Register(stream DeviceProviderServiceMsg) returns (stream DeviceProviderMsg);
}