diff options
Diffstat (limited to 'rpc-common/src/main/proto/agent.proto')
-rw-r--r-- | rpc-common/src/main/proto/agent.proto | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/rpc-common/src/main/proto/agent.proto b/rpc-common/src/main/proto/agent.proto index 585213e..1843917 100644 --- a/rpc-common/src/main/proto/agent.proto +++ b/rpc-common/src/main/proto/agent.proto @@ -6,42 +6,39 @@ option java_outer_classname = "AgentProto"; package moe.yuuta.dn42peering.agent; service Agent { - rpc ProvisionBGP (BGPRequest) returns (BGPReply) {} - rpc ReloadBGP (BGPRequest) returns (BGPReply) {} - rpc DeleteBGP (BGPRequest) returns (BGPReply) {} - - rpc ProvisionWG (WGRequest) returns (WGReply) {} - rpc ReloadWG (WGRequest) returns (WGReply) {} - rpc DeleteWG (WGRequest) returns (WGReply) {} + rpc Deploy (NodeConfig) returns (DeployResult) {} } -message BGPRequest { - Node node = 1; - uint64 id = 2; - string asn = 3; - bool mpbgp = 4; - string ipv4 = 5; - string ipv6 = 6; - string device = 7; +message DeployResult { + repeated uint64 successfulIDs = 1; + repeated uint64 failedIDs = 2; } -message BGPReply { +message NodeConfig { + Node node = 1; + repeated BGPConfig bgps = 2; + repeated WireGuardConfig wgs = 3; } -message WGRequest { - Node node = 1; - uint64 id = 2; - uint32 listenPort = 3; - string endpoint = 4; - string peerPubKey = 5; - string selfPrivKey = 6; - string selfPresharedSecret = 7; - string peerIPv4 = 8; - string peerIPv6 = 9; +message BGPConfig { + uint64 id = 1; + uint64 asn = 2; + bool mpbgp = 3; + string ipv4 = 4; + string ipv6 = 5; + string interface = 6; } -message WGReply { - string device = 1; +message WireGuardConfig { + uint64 id = 1; + uint32 listenPort = 2; + string endpoint = 3; + string peerPubKey = 4; + string selfPrivKey = 5; + string selfPresharedSecret = 6; + string peerIPv4 = 7; + string peerIPv6 = 8; + string interface = 9; } message Node { @@ -49,4 +46,5 @@ message Node { string ipv4 = 2; string ipv6 = 3; string ipv6NonLL = 4; + uint64 asn = 5; }
\ No newline at end of file |