context.proto 1.53 KB
Newer Older
Ricard Vilalta's avatar
Ricard Vilalta committed
syntax = "proto3";
package context;


service ContextService {
  rpc GetTopology (Empty) returns (Topology) {}
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed

  rpc AddLink(Link) returns (LinkId) {}
  rpc DeleteLink(LinkId) returns (Empty) {}
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message Empty {

}
Ricard Vilalta's avatar
Ricard Vilalta committed

message Context {
Ricard Vilalta's avatar
Ricard Vilalta committed
  ContextId contextId= 1;
  Topology topo = 2;
  TeraFlowController ctl = 3;
}

message ContextId {
  Uuid contextUuid = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message Topology {
Ricard Vilalta's avatar
Ricard Vilalta committed
  TopologyId topoId = 2;
  repeated Device device = 3;
  repeated Link link = 4; 
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message Link {
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  LinkId link_id = 1;
  repeated EndPointId endpointList = 2;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

Ricard Vilalta's avatar
Ricard Vilalta committed
message TopologyId {
  ContextId contextId = 1;
  Uuid topoId = 2;
}
Ricard Vilalta's avatar
Ricard Vilalta committed

message Constraint {
  string constraint_type = 1;
  string constraint_value = 2;
}

message Device {
  DeviceId device_id = 1;
  string device_type = 2;
  DeviceConfig device_config = 3;
  DeviceOperationalStatus devOperationalStatus = 4;
  repeated EndPoint endpointList = 5;  
}

message DeviceConfig {
  string device_config = 1;
}

message EndPoint {
  EndPointId port_id = 1;
  string port_type = 2;
}

message EndPointId {
Ricard Vilalta's avatar
Ricard Vilalta committed
  TopologyId topoId = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
  DeviceId dev_id = 2;
Ricard Vilalta's avatar
Ricard Vilalta committed
  Uuid port_id = 3;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message DeviceId {
  Uuid device_id = 1;
}

Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
message LinkId {
  Uuid link_id = 1;
}

Ricard Vilalta's avatar
Ricard Vilalta committed
message Uuid {
  string uuid = 1;
}

enum DeviceOperationalStatus {
Lluis Gifre Renom's avatar
Lluis Gifre Renom committed
  KEEP_STATUS = 0; // Do not change operational status of device (used in configure)
  DISABLED    = -1;
  ENABLED     = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
}

message TeraFlowController {
Ricard Vilalta's avatar
Ricard Vilalta committed
  ContextId ctl_id = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
  string ipaddress = 2;
}

message AuthenticationResult {
Ricard Vilalta's avatar
Ricard Vilalta committed
  ContextId ctl_id = 1;
Ricard Vilalta's avatar
Ricard Vilalta committed
  bool authenticated = 2;
}