Skip to content

Commit

Permalink
PMM-12913 refactor /v1/management/services/azure
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Apr 10, 2024
1 parent 6d593de commit a6f6d68
Show file tree
Hide file tree
Showing 37 changed files with 5,468 additions and 5,194 deletions.
4 changes: 0 additions & 4 deletions Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ gen-api: ## Generate PMM API
api/user/v1 \
api/inventory/v1 \
api/management/v1 \
api/management/v1/agent \
api/management/v1/service \
api/management/v1/azure \
api/actions/v1 \
api/advisors/v1 \
api/alerting/v1 \
Expand Down Expand Up @@ -109,7 +107,6 @@ gen-api: ## Generate PMM API
api/inventory/v1/json/v1.json \
api/management/v1/json/v1.json \
api/management/v1/service/json/service.json \
api/management/v1/azure/json/azure.json \
api/actions/v1/json/v1.json \
api/alerting/v1/json/v1.json \
api/advisors/v1/json/v1.json \
Expand Down Expand Up @@ -151,7 +148,6 @@ clean: clean_swagger ## Remove generated files
api/user/v1 \
api/inventory/v1 \
api/management/v1 \
api/management/v1/azure \
api/management/v1/service \
api/actions/v1 \
api/alerting/v1 \
Expand Down
8 changes: 5 additions & 3 deletions api/MIGRATION_TO_V3.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@ POST /v1/management/MySQL/Add POST /v1/management/services
POST /v1/management/PostgreSQL/Add POST /v1/management/services ✅
POST /v1/management/ProxySQL/Add POST /v1/management/services ✅
POST /v1/management/RDS/Add POST /v1/management/services ✅
POST /v1/management/AzureDatabase/Add POST /v1/management/services/azure ✅ Moved from MgmtService
POST /v1/management/AzureDatabase/Discover POST /v1/management/services:discoverAzure ✅ Moved from MgmtService
POST /v1/management/RDS/Discover POST /v1/management/services:discoverRDS
POST /v1/management/Service/Remove DELETE /v1/management/services/{service_id} ✅ NOTE: in addition, it accepts ?service_type=

**MgmtService** **ManagementV1Beta1Service** NOTE: promote to v1 from v1beta1
POST /v1/management/Agent/List GET /v1/management/agents
POST /v1/management/Node/Get GET /v1/management/nodes/{node_id} ✅
POST /v1/management/Node/List GET /v1/management/nodes ✅
POST /v1/management/AzureDatabase/Add POST /v1/management/services/azure
POST /v1/management/AzureDatabase/Discover POST /v1/management/services/azure:discover
POST /v1/management/AzureDatabase/Add POST /v1/management/services
POST /v1/management/AzureDatabase/Discover POST /v1/management/services:discoverAzure
POST /v1/management/Service/List GET /v1/management/services ✅

**ActionsService** **ActionService**
Expand Down Expand Up @@ -167,7 +169,7 @@ POST /v1/platform/ServerInfo GET /v1/platform/server
POST /v1/platform/UserInfo GET /v1/platform/user

// TODO: rename `period_start_from` to `start_from` and `period_start_to` to `start_to`

// TODO: refactor the primitive types in alerting.proto

## The use of custom methods in RESTful API

Expand Down
368 changes: 190 additions & 178 deletions api/accesscontrol/v1beta1/accesscontrol.pb.go

Large diffs are not rendered by default.

32 changes: 16 additions & 16 deletions api/accesscontrol/v1beta1/accesscontrol.pb.gw.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/accesscontrol/v1beta1/accesscontrol.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/accesscontrol/v1beta1/accesscontrol.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
syntax = "proto3";

package role.v1beta1;
package accesscontrol.v1beta1;

import "google/api/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
Expand Down
18 changes: 9 additions & 9 deletions api/accesscontrol/v1beta1/accesscontrol_grpc.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/alerting/v1/alerting.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion api/alerting/v1/alerting.proto
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ message ParamDefinition {
string name = 1 [(validate.rules).string.min_len = 1];
// Short human-readable parameter summary.
string summary = 2 [(validate.rules).string.min_len = 1];
// Parameter unit.
// Parameter unit. TODO: remove this parameter.
ParamUnit unit = 3;
// Parameter type.
ParamType type = 4;
Expand Down
3 changes: 0 additions & 3 deletions api/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ lint:
RPC_RESPONSE_STANDARD_NAME:
- agent/v1/agent.proto # We want our naming in this file to be different
PACKAGE_DIRECTORY_MATCH: # Address these warnings during API restructuring
- management/v1/agent/agent.proto
- management/v1/azure/azure.proto
- management/v1/node/node.proto
- management/v1/service/service.proto
PACKAGE_VERSION_SUFFIX:
- common/common.proto # We don't want to version this file
Expand Down
Loading

0 comments on commit a6f6d68

Please sign in to comment.