Skip to content
Snippets Groups Projects
gosdnCLI.proto 2.78 KiB
Newer Older
  • Learn to ignore specific revisions
  • syntax = "proto3";
    
    import "google/protobuf/empty.proto";
    
    
    option go_package = "gitlab.fbi.h-da.de/cocsn/gosdn";
    
    Malte Bauch's avatar
    Malte Bauch committed
    //TODO: purpose?
    
    option java_multiple_files = true;
    option java_package = "de.h-da.fbi.gosdn.cliInterface";
    option java_outer_classname = "cliInterface";
    
    
    
    
    // The greeting service definition.
    
      // Sends a greeting
      rpc SayHello (HelloRequest) returns (HelloReply) {}
    
      // Shutdown goSDN
      rpc Shutdown (ShutdownRequest) returns (ShutdownReply) {}
    
      // creates a stream to receive goSDN logs
      rpc CreateLogStream(google.protobuf.Empty) returns (stream LogReply) {}
    
    
      // By now solely TAPI specific calls can be issued from the grpc-cli
      // TAPIGetEdge
      rpc TAPIGetEdge (TAPIRequest) returns (TAPIReply) {}
      //TAPIGetEdgeNode
      rpc TAPIGetEdgeNode (TAPIRequest) returns (TAPIReply) {}
      // TAPIGetLink
      rpc TAPIGetLink (TAPIRequest) returns (TAPIReply) {}
    
    Malte Bauch's avatar
    Malte Bauch committed
      rpc CreatePND (CreatePNDRequest) returns (CreatePNDReply) {}
      // GetAllPNDs
      rpc GetAllPNDs(google.protobuf.Empty) returns (AllPNDsReply) {}
    
      // GetAllSBIs
      rpc  GetAllSBINames(google.protobuf.Empty) returns (AllSBINamesReply) {}
    
    Malte Bauch's avatar
    Malte Bauch committed
      // AddDevice
      rpc AddDevice(AddDeviceRequest) returns (AddDeviceReply) {}
    
      // HandleDeviceGetRequest
      rpc HandleDeviceGetRequest(DeviceGetRequest) returns (DeviceGetReply) {}
    
    }
    
    // The request message containing the user's name.
    message HelloRequest {
      string name = 1;
    }
    
    // The response message containing the greetings
    message HelloReply {
      string message = 1;
    
      string goSDNInfo = 2;
    
    
    // Request to shutdown goSDN
    message ShutdownRequest {
      string name = 1;
    }
    
    // The response message containing some shutdown notes of goSDN
    message ShutdownReply {
      string message = 1;
    }
    
    
    // Request with no meaning by now
    message TAPIRequest {
      string name = 1;
    }
    
    // The response message containing a string with no meaning by now
    message TAPIReply {
      string message = 1;
    }
    
    
    Malte Bauch's avatar
    Malte Bauch committed
    message CreatePNDRequest {
    
        string name = 1;
        string description = 2;
        string sbi = 3;
    }
    
    
    message AllSBINamesReply {
        repeated string sbiNames = 1;
    }
    
    
    Malte Bauch's avatar
    Malte Bauch committed
    message CreatePNDReply {
    
    Malte Bauch's avatar
    Malte Bauch committed
    //
    message AllPNDsReply {
        repeated PND pnds = 1;
    }
    
    message PND {
        string uuid = 1;
        string name = 2;
        string description = 3;
        string sbi = 4;
        repeated Device devices = 5;
    }
    
    message Device {
     string uuid = 1;
     string address = 2;
     string username = 3;
     string password = 4;
    }
    
    message AddDeviceRequest {
         string uuidPND = 1;
         Device device = 2;
    }
    
    message AddDeviceReply {
         string message = 1;
    }
    
    
    message DeviceGetRequest {
        string uuidPND = 1;
        string uuidDevice = 2;
        string path = 3;
    }
    
    message DeviceGetReply {
        string message = 1;
    }
    
    
    // The response message containing a string with a goSDN log
    message LogReply {
      string log = 1;
    }