Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
gosdn.proto 2.09 KiB
syntax = "proto3";

package gosdn;

import "github.com/openconfig/gnmi/proto/gnmi/gnmi.proto";

option (pnd_service) = "0.0.1";
option go_package = "code.fbi.h-da.de/cocsn/api/proto/gosdn";

service pnd {
  rpc Get(GetRequest) returns (GetResponse);
  rpc Set(SetRequest) returns (SetResponse);
}

message GetRequest {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  enum get_type {
    PND = 0;
    OND = 1;
    ONDS = 2;
    SBI = 3;
    SBIS = 4;
    Changes = 5;
  }
  get_type type = 2;
  string id = 3;
}

message GetResponse {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  oneof get_oneof {
    PrincipalNetworkingDomain pnd = 2;
    OrchestratedNetworkingDevice ond = 3;
    OrchestratedNetworkingDevices onds = 4;
    SouthboundInterface sbi = 5;
    SouthboundInterfaces sbis = 6;
    Changes changes = 7;
  }

}

message SetRequest {}

message SetResponse{}

message PrincipalNetworkingDomain {
  string id = 1;
  string name = 2;
  string description = 3;
  map<string, OrchestratedNetworkingDevice> onds = 4;
  map<string, SouthboundInterface> sbis = 5;
  map<string, Change> changes = 6;
}

message SouthboundInterface {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  string id = 2;
  string schema = 3;
}

message OrchestratedNetworkingDevice {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  string id = 2;
  string name = 3;
  gnmi.Notification device = 4;
}

message SouthboundInterfaces {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  map<string, SouthboundInterface> sbis = 2;
}

message OrchestratedNetworkingDevices {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  map<string, OrchestratedNetworkingDevice> sbis = 2;
}

message Change {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  string id = 2;
  int64 age = 3;
  enum state {
    PENDING = 0;
    COMMITTED = 1;
    CONFIRMED = 2;
  }

}

message Changes {
  int64 timestamp = 1;          // Timestamp in nanoseconds since Epoch.
  map<string, Change> sbis = 2;
}