diff --git a/build.gradle b/build.gradle index 1115471..98087f1 100644 --- a/build.gradle +++ b/build.gradle @@ -22,7 +22,7 @@ buildscript { } group 'io.bokun.inventory' -version '0.4.6' +version '0.4.9' apply plugin: "com.google.protobuf" apply plugin: "java" diff --git a/src/main/proto_service/provisioning_service.proto b/src/main/proto_service/provisioning_service.proto index 2ae5a5a..9ebe372 100644 --- a/src/main/proto_service/provisioning_service.proto +++ b/src/main/proto_service/provisioning_service.proto @@ -8,6 +8,17 @@ option java_package = "io.bokun.inventory.service.provisioning.grpc"; service ProvisioningService { // Returns IS build information rpc GetBuildInfo (GetBuildInfoRequest) returns (GetBuildInfoResponse) {} + + // List plugin/toggle pairs which have toggles open (e.g. disarm availability). + rpc GetMutedPlugins (GetMutedPluginsRequest) returns (GetMutedPluginsResponse) {} + + // Forces certain plugin/toggle type to disarm. + rpc MutePlugin(MutePluginRequest) returns (MutePluginResponse) {} + + // Forces certain plugin/toggle type to exit disarmed state. + rpc UnmutePlugin (UnmutePluginRequest) returns (UnmutePluginResponse) {} + + rpc GetOpenBreakers (GetOpenBreakersRequest) returns (GetOpenBreakersResponse) {} } message GetBuildInfoRequest { @@ -17,3 +28,65 @@ message GetBuildInfoResponse { // May contain elements such as branch, build number, etc. Does not imply any particular structure. Mandatory. string buildInformation = 1; } + +message GetMutedPluginsRequest { + // for which type of functionality results should be retrieved? Mandatory + FunctionType functionType = 1; +} + +message GetMutedPluginsResponse { + // a list of type/plugin id pairs which have the functionality muted + repeated FunctionTypePlugin metadata = 1; +} + +enum FunctionType { + UNKNOWN = 0; + AVAILABILITY = 1; +} + +// wrapper which contains function type & plugin id +message FunctionTypePlugin { + // mandatory + FunctionType type = 1; + + // mandatory + string pluginId = 2; +} + +message MutePluginRequest { + // a list of breaker type/plugin id pairs which are requested to have them open + repeated FunctionTypePlugin metadata = 1; +} + +message MutePluginResponse { +} + +message UnmutePluginRequest { + // a list of type/plugin id pairs which are requested to have them closed + repeated FunctionTypePlugin metadata = 1; +} + +message UnmutePluginResponse { +} + +message GetOpenBreakersRequest { + // for which type of functionality results should be retrieved? Mandatory + FunctionType functionType = 1; +} + +// wrapper which contains function type & plugin id & counter +message FunctionTypePluginCount { + // mandatory + FunctionType type = 1; + + // mandatory + string pluginId = 2; + + // how many nodes have this breaker open? Mandatory + int32 count = 3; +} + +message GetOpenBreakersResponse { + // a list of breaker type/plugin id pairs which have the breaker open, plus count (how many nodes have this open) + repeated FunctionTypePluginCount metadata = 1; +} diff --git a/src/main/swagger/inventory_api.json b/src/main/swagger/inventory_api.json index a7e3a11..ee8a61f 100644 --- a/src/main/swagger/inventory_api.json +++ b/src/main/swagger/inventory_api.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "description": "Channel Manager REST API. You can find out more about Channel Manager [here](https://www.bokun.io/sell/channel-manager).", - "version": "0.4.6", + "version": "0.4.9", "title": "Channel Manager REST API", "contact": { "email": "support@bokun.io"