feat: add methods to enable and disable single routes

This commit is contained in:
Johan Siebens
2022-09-16 11:33:14 +02:00
parent f71ca49693
commit 3b9ce04ec8
10 changed files with 512 additions and 237 deletions
+2 -1
View File
@@ -54,5 +54,6 @@ service IonscaleService {
rpc DeleteMachine(DeleteMachineRequest) returns (DeleteMachineResponse) {}
rpc SetMachineKeyExpiry(SetMachineKeyExpiryRequest) returns (SetMachineKeyExpiryResponse) {}
rpc GetMachineRoutes (GetMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc SetMachineRoutes (SetMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc EnableMachineRoutes (EnableMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
rpc DisableMachineRoutes (DisableMachineRoutesRequest) returns (GetMachineRoutesResponse) {}
}
+2
View File
@@ -60,6 +60,8 @@ message Machine {
google.protobuf.Timestamp created_at = 14;
google.protobuf.Timestamp expires_at = 15;
bool key_expiry_disabled = 16;
repeated string enabled_routes = 17;
repeated string advertised_routes = 18;
}
message ClientConnectivity {
+8 -6
View File
@@ -8,15 +8,17 @@ message GetMachineRoutesRequest {
}
message GetMachineRoutesResponse {
repeated RoutableIP routes = 1;
repeated string advertised_routes = 1;
repeated string enabled_routes = 2;
}
message SetMachineRoutesRequest {
message EnableMachineRoutesRequest {
uint64 machine_id = 1;
repeated string allowed_ips = 2;
repeated string routes = 2;
bool replace = 3;
}
message RoutableIP {
string advertised = 1;
bool allowed = 2;
message DisableMachineRoutesRequest {
uint64 machine_id = 1;
repeated string routes = 2;
}