From 08b2ecc4f75425711ff37a716dc04a91021809b2 Mon Sep 17 00:00:00 2001 From: Alex Demidoff Date: Sun, 18 Feb 2024 10:40:55 +0000 Subject: [PATCH] PMM-12913 merge anotation & node to management/service --- .mockery.yaml | 1 - admin/commands/annotation.go | 6 +- admin/commands/management/management.go | 7 +- admin/commands/management/register.go | 16 +- admin/commands/management/register_test.go | 6 +- admin/commands/summary.go | 4 +- agent/commands/clients.go | 10 +- agent/commands/setup.go | 4 +- api-tests/backup/backups_test.go | 5 +- api-tests/management/annotation_test.go | 14 +- api-tests/management/haproxy_test.go | 13 +- api-tests/management/helpers.go | 14 +- api-tests/management/mongodb_test.go | 65 ++- api-tests/management/mysql_test.go | 65 ++- api-tests/management/nodes_test.go | 14 +- api-tests/management/postgresql_test.go | 61 ++- api-tests/management/proxysql_test.go | 53 +- api-tests/server/logs_test.go | 4 +- api/MIGRATION_TO_V3.md | 14 +- api/management/v1/agent/agent.pb.go | 188 ++++--- api/management/v1/agent/agent.proto | 21 +- api/management/v1/annotation.pb.go | 48 +- api/management/v1/annotation.pb.gw.go | 163 ------ api/management/v1/annotation.proto | 18 - api/management/v1/annotation_grpc.pb.go | 112 ---- .../annotation_service_client.go | 78 --- .../node_service/node_service_client.go | 78 --- .../json/client/pmm_management_api_client.go | 10 - .../add_annotation_parameters.go | 2 +- .../add_annotation_responses.go | 2 +- .../register_node_parameters.go | 2 +- .../register_node_responses.go | 2 +- .../v1/json/client/service/service_client.go | 82 +++ api/management/v1/json/v1.json | 12 +- api/management/v1/node.pb.go | 46 +- api/management/v1/node.pb.gw.go | 163 ------ api/management/v1/node.proto | 15 - api/management/v1/node_grpc.pb.go | 111 ---- api/management/v1/service.pb.go | 506 ++++++++++-------- api/management/v1/service.pb.gw.go | 162 ++++++ api/management/v1/service.proto | 24 + api/management/v1/service_grpc.pb.go | 80 +++ api/nginx/nginx.conf | 2 +- .../v1/json/client/pmm_server_api_client.go | 5 - .../v1/json/client/server/server_client.go | 80 --- .../logs_parameters.go | 2 +- .../logs_responses.go | 2 +- .../server_service/server_service_client.go | 43 ++ api/server/v1/json/header.json | 2 +- api/server/v1/json/v1.json | 2 +- api/swagger/swagger-dev.json | 14 +- api/swagger/swagger.json | 14 +- descriptor.bin | Bin 679284 -> 678779 bytes managed/cmd/pmm-managed/main.go | 7 +- managed/services/management/annotation.go | 19 +- .../services/management/annotation_test.go | 119 ++-- managed/services/management/deps.go | 7 +- .../management/mock_api_key_provider_test.go | 83 --- .../management/mock_grafana_client_test.go | 54 ++ managed/services/management/node.go | 30 +- managed/services/management/node_test.go | 41 +- managed/services/management/rds_test.go | 4 +- managed/services/management/service.go | 31 +- managed/services/management/service_test.go | 10 +- 64 files changed, 1177 insertions(+), 1695 deletions(-) delete mode 100644 api/management/v1/annotation.pb.gw.go delete mode 100644 api/management/v1/annotation_grpc.pb.go delete mode 100644 api/management/v1/json/client/annotation_service/annotation_service_client.go delete mode 100644 api/management/v1/json/client/node_service/node_service_client.go rename api/management/v1/json/client/{annotation_service => service}/add_annotation_parameters.go (99%) rename api/management/v1/json/client/{annotation_service => service}/add_annotation_responses.go (99%) rename api/management/v1/json/client/{node_service => service}/register_node_parameters.go (99%) rename api/management/v1/json/client/{node_service => service}/register_node_responses.go (99%) delete mode 100644 api/management/v1/node.pb.gw.go delete mode 100644 api/management/v1/node_grpc.pb.go delete mode 100644 api/server/v1/json/client/server/server_client.go rename api/server/v1/json/client/{server => server_service}/logs_parameters.go (99%) rename api/server/v1/json/client/{server => server_service}/logs_responses.go (99%) delete mode 100644 managed/services/management/mock_api_key_provider_test.go diff --git a/.mockery.yaml b/.mockery.yaml index dcd62a20f75..d456b273ae5 100644 --- a/.mockery.yaml +++ b/.mockery.yaml @@ -38,7 +38,6 @@ packages: interfaces: agentsRegistry: agentsStateUpdater: - apiKeyProvider: checksService: connectionChecker: grafanaClient: diff --git a/admin/commands/annotation.go b/admin/commands/annotation.go index b6e0dfaf0dd..cec8202dc49 100644 --- a/admin/commands/annotation.go +++ b/admin/commands/annotation.go @@ -25,7 +25,7 @@ import ( nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" managementClient "github.com/percona/pmm/api/management/v1/json/client" - annotation "github.com/percona/pmm/api/management/v1/json/client/annotation_service" + "github.com/percona/pmm/api/management/v1/json/client/service" ) var annotationResultT = ParseTemplate(` @@ -156,8 +156,8 @@ func (cmd *AnnotationCommand) RunCmd() (Result, error) { return nil, err } - _, err = managementClient.Default.AnnotationService.AddAnnotation(&annotation.AddAnnotationParams{ - Body: annotation.AddAnnotationBody{ + _, err = managementClient.Default.Service.AddAnnotation(&service.AddAnnotationParams{ + Body: service.AddAnnotationBody{ Text: cmd.Text, Tags: cmd.Tags, NodeName: nodeName, diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go index 31c49e268c9..2a9c0350852 100644 --- a/admin/commands/management/management.go +++ b/admin/commands/management/management.go @@ -16,15 +16,14 @@ package management import ( - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) var ( allNodeTypes = map[string]string{ - "generic": node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, - "container": node.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, - "remote": node.RegisterNodeBodyNodeTypeNODETYPEREMOTENODE, + "generic": service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, + "container": service.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, + "remote": service.RegisterNodeBodyNodeTypeNODETYPEREMOTENODE, } allServiceTypes = map[string]string{ diff --git a/admin/commands/management/register.go b/admin/commands/management/register.go index 962cf0cea35..39158a68498 100644 --- a/admin/commands/management/register.go +++ b/admin/commands/management/register.go @@ -21,7 +21,7 @@ import ( "github.com/percona/pmm/admin/commands" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + "github.com/percona/pmm/api/management/v1/json/client/service" ) var registerResultT = commands.ParseTemplate(` @@ -34,10 +34,10 @@ Warning: {{ .Warning }} `) type registerResult struct { - GenericNode *node.RegisterNodeOKBodyGenericNode `json:"generic_node"` - ContainerNode *node.RegisterNodeOKBodyContainerNode `json:"container_node"` - PMMAgent *node.RegisterNodeOKBodyPMMAgent `json:"pmm_agent"` - Warning string `json:"warning"` + GenericNode *service.RegisterNodeOKBodyGenericNode `json:"generic_node"` + ContainerNode *service.RegisterNodeOKBodyContainerNode `json:"container_node"` + PMMAgent *service.RegisterNodeOKBodyPMMAgent `json:"pmm_agent"` + Warning string `json:"warning"` } func (res *registerResult) Result() {} @@ -70,8 +70,8 @@ type RegisterCommand struct { func (cmd *RegisterCommand) RunCmd() (commands.Result, error) { customLabels := commands.ParseCustomLabels(cmd.CustomLabels) - params := &node.RegisterNodeParams{ - Body: node.RegisterNodeBody{ + params := &service.RegisterNodeParams{ + Body: service.RegisterNodeBody{ NodeType: pointer.ToString(allNodeTypes[cmd.NodeType]), NodeName: cmd.NodeName, MachineID: cmd.MachineID, @@ -91,7 +91,7 @@ func (cmd *RegisterCommand) RunCmd() (commands.Result, error) { }, Context: commands.Ctx, } - resp, err := client.Default.NodeService.RegisterNode(params) + resp, err := client.Default.Service.RegisterNode(params) if err != nil { return nil, err } diff --git a/admin/commands/management/register_test.go b/admin/commands/management/register_test.go index b002a91ba00..34d3f97d115 100644 --- a/admin/commands/management/register_test.go +++ b/admin/commands/management/register_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestRegisterResult(t *testing.T) { @@ -31,7 +31,7 @@ func TestRegisterResult(t *testing.T) { { name: "Success", result: registerResult{ - PMMAgent: &node.RegisterNodeOKBodyPMMAgent{ + PMMAgent: &service.RegisterNodeOKBodyPMMAgent{ AgentID: "/agent_id/new_id", RunsOnNodeID: "/node_id/second_id", }, @@ -45,7 +45,7 @@ Node ID : /node_id/second_id { name: "With warning", result: registerResult{ - PMMAgent: &node.RegisterNodeOKBodyPMMAgent{ + PMMAgent: &service.RegisterNodeOKBodyPMMAgent{ AgentID: "/agent_id/warning", RunsOnNodeID: "/node_id/warning_node", }, diff --git a/admin/commands/summary.go b/admin/commands/summary.go index b45c2ac4eec..2f9def70ba1 100644 --- a/admin/commands/summary.go +++ b/admin/commands/summary.go @@ -41,7 +41,7 @@ import ( agents_info "github.com/percona/pmm/api/agentlocal/v1/json/client/agent_local_service" "github.com/percona/pmm/api/inventory/v1/types" "github.com/percona/pmm/api/server/v1/json/client" - "github.com/percona/pmm/api/server/v1/json/client/server" + server "github.com/percona/pmm/api/server/v1/json/client/server_service" "github.com/percona/pmm/version" ) @@ -166,7 +166,7 @@ func addClientData(ctx context.Context, zipW *zip.Writer) { // addServerData adds logs.zip from PMM Server to zip file. func addServerData(ctx context.Context, zipW *zip.Writer, usePprof bool) { var buf bytes.Buffer - _, err := client.Default.Server.Logs(&server.LogsParams{Context: ctx, Pprof: &usePprof}, &buf) + _, err := client.Default.ServerService.Logs(&server.LogsParams{Context: ctx, Pprof: &usePprof}, &buf) if err != nil { logrus.Errorf("%s", err) return diff --git a/agent/commands/clients.go b/agent/commands/clients.go index 051cb566637..ae5319bbbb3 100644 --- a/agent/commands/clients.go +++ b/agent/commands/clients.go @@ -36,7 +36,7 @@ import ( "github.com/percona/pmm/agent/config" agentlocalClient "github.com/percona/pmm/api/agentlocal/v1/json/client" managementClient "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + "github.com/percona/pmm/api/management/v1/json/client/service" "github.com/percona/pmm/utils/tlsconfig" ) @@ -162,8 +162,8 @@ func ParseCustomLabels(labels string) (map[string]string, error) { // This method is not thread-safe. func serverRegister(cfgSetup *config.Setup) (agentID, token string, _ error) { //nolint:nonamedreturns nodeTypes := map[string]string{ - "generic": node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, - "container": node.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, + "generic": service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE, + "container": service.RegisterNodeBodyNodeTypeNODETYPECONTAINERNODE, } var disableCollectors []string @@ -179,8 +179,8 @@ func serverRegister(cfgSetup *config.Setup) (agentID, token string, _ error) { / return "", "", err } - res, err := managementClient.Default.NodeService.RegisterNode(&node.RegisterNodeParams{ - Body: node.RegisterNodeBody{ + res, err := managementClient.Default.Service.RegisterNode(&service.RegisterNodeParams{ + Body: service.RegisterNodeBody{ NodeType: pointer.ToString(nodeTypes[cfgSetup.NodeType]), NodeName: cfgSetup.NodeName, MachineID: cfgSetup.MachineID, diff --git a/agent/commands/setup.go b/agent/commands/setup.go index a685c846cd9..8861c9f1efe 100644 --- a/agent/commands/setup.go +++ b/agent/commands/setup.go @@ -27,7 +27,7 @@ import ( "github.com/percona/pmm/agent/config" agent_local "github.com/percona/pmm/api/agentlocal/v1/json/client/agent_local_service" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + "github.com/percona/pmm/api/management/v1/json/client/service" ) // Setup implements `pmm-agent setup` command. @@ -142,7 +142,7 @@ func register(cfg *config.Config, l *logrus.Entry) { l.Debugf("Register error: %#v", err) if err != nil { msg := err.Error() - if e, _ := err.(*node.RegisterNodeDefault); e != nil { //nolint:errorlint + if e, _ := err.(*service.RegisterNodeDefault); e != nil { //nolint:errorlint msg = e.Payload.Message + "" switch e.Code() { case http.StatusConflict: diff --git a/api-tests/backup/backups_test.go b/api-tests/backup/backups_test.go index aedd8bb4f5e..93797d2f621 100644 --- a/api-tests/backup/backups_test.go +++ b/api-tests/backup/backups_test.go @@ -30,16 +30,15 @@ import ( backups "github.com/percona/pmm/api/backup/v1/json/client/backups_service" locations "github.com/percona/pmm/api/backup/v1/json/client/locations_service" managementClient "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" service "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestScheduleBackup(t *testing.T) { t.Run("mongo", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := management.RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := management.RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer management.RemovePMMAgentWithSubAgents(t, pmmAgentID) diff --git a/api-tests/management/annotation_test.go b/api-tests/management/annotation_test.go index 26a482cf46f..60814eecda2 100644 --- a/api-tests/management/annotation_test.go +++ b/api-tests/management/annotation_test.go @@ -27,7 +27,7 @@ import ( nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - annotation "github.com/percona/pmm/api/management/v1/json/client/annotation_service" + annotation "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestAddAnnotation(t *testing.T) { @@ -39,7 +39,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err := client.Default.AnnotationService.AddAnnotation(params) + _, err := client.Default.Service.AddAnnotation(params) require.NoError(t, err) }) @@ -51,7 +51,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err := client.Default.AnnotationService.AddAnnotation(params) + _, err := client.Default.Service.AddAnnotation(params) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid AddAnnotationRequest.Text: value length must be at least 1 runes") }) @@ -63,7 +63,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err := client.Default.AnnotationService.AddAnnotation(params) + _, err := client.Default.Service.AddAnnotation(params) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Service with name "no-service" not found.`) }) @@ -75,7 +75,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err := client.Default.AnnotationService.AddAnnotation(params) + _, err := client.Default.Service.AddAnnotation(params) pmmapitests.AssertAPIErrorf(t, err, 404, codes.NotFound, `Node with name "no-node" not found.`) }) @@ -121,7 +121,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err = client.Default.AnnotationService.AddAnnotation(paramsAdd) + _, err = client.Default.Service.AddAnnotation(paramsAdd) require.NoError(t, err) }) @@ -147,7 +147,7 @@ func TestAddAnnotation(t *testing.T) { }, Context: pmmapitests.Context, } - _, err = client.Default.AnnotationService.AddAnnotation(paramsAdd) + _, err = client.Default.Service.AddAnnotation(paramsAdd) require.NoError(t, err) }) } diff --git a/api-tests/management/haproxy_test.go b/api-tests/management/haproxy_test.go index 9d73570b8c3..588c88d100d 100644 --- a/api-tests/management/haproxy_test.go +++ b/api-tests/management/haproxy_test.go @@ -29,16 +29,15 @@ import ( nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestAddHAProxy(t *testing.T) { t.Run("Basic", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "genericNode-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -104,9 +103,9 @@ func TestAddHAProxy(t *testing.T) { t.Run("With labels", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "genericNode-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -252,9 +251,9 @@ func TestAddHAProxy(t *testing.T) { t.Run("With the same name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "genericNode-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) diff --git a/api-tests/management/helpers.go b/api-tests/management/helpers.go index 909ff6c4131..4af5dc607e5 100644 --- a/api-tests/management/helpers.go +++ b/api-tests/management/helpers.go @@ -29,19 +29,19 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + "github.com/percona/pmm/api/management/v1/json/client/service" ) // AgentStatusUnknown means agent is not connected and we don't know anything about its status. var AgentStatusUnknown = inventoryv1.AgentStatus_name[int32(inventoryv1.AgentStatus_AGENT_STATUS_UNKNOWN)] -func RegisterGenericNode(t pmmapitests.TestingT, body node.RegisterNodeBody) (string, string) { +func RegisterGenericNode(t pmmapitests.TestingT, body service.RegisterNodeBody) (string, string) { t.Helper() - params := node.RegisterNodeParams{ + params := service.RegisterNodeParams{ Context: pmmapitests.Context, Body: body, } - registerOK, err := client.Default.NodeService.RegisterNode(¶ms) + registerOK, err := client.Default.Service.RegisterNode(¶ms) require.NoError(t, err) require.NotNil(t, registerOK) require.NotNil(t, registerOK.Payload.PMMAgent) @@ -51,14 +51,14 @@ func RegisterGenericNode(t pmmapitests.TestingT, body node.RegisterNodeBody) (st return registerOK.Payload.GenericNode.NodeID, registerOK.Payload.PMMAgent.AgentID } -func registerContainerNode(t pmmapitests.TestingT, body node.RegisterNodeBody) (string, string) { +func registerContainerNode(t pmmapitests.TestingT, body service.RegisterNodeBody) (string, string) { t.Helper() - params := node.RegisterNodeParams{ + params := service.RegisterNodeParams{ Context: pmmapitests.Context, Body: body, } - registerOK, err := client.Default.NodeService.RegisterNode(¶ms) + registerOK, err := client.Default.Service.RegisterNode(¶ms) require.NoError(t, err) require.NotNil(t, registerOK) require.NotNil(t, registerOK.Payload.PMMAgent) diff --git a/api-tests/management/mongodb_test.go b/api-tests/management/mongodb_test.go index 8c8aba3bc25..f809c2a6006 100644 --- a/api-tests/management/mongodb_test.go +++ b/api-tests/management/mongodb_test.go @@ -28,16 +28,15 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestAddMongoDB(t *testing.T) { t.Run("Basic", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -110,9 +109,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With agents", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -203,9 +202,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With labels", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name-for-all-fields") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -262,9 +261,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With the same name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-the-same-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -308,9 +307,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With add_node block", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -427,9 +426,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With Wrong Node Type", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "generic-node-for-wrong-node-type") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -458,9 +457,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Empty Service Name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -476,9 +475,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Empty Address", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -499,9 +498,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Empty Port", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -523,9 +522,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Empty Pmm Agent ID", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -547,9 +546,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Address And Socket Conflict.", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -575,9 +574,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("Socket", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-mongo-socket-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -647,9 +646,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With MetricsModePush", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -722,9 +721,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With MetricsModePull", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -796,9 +795,9 @@ func TestAddMongoDB(t *testing.T) { t.Run("With MetricsModeAuto", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -873,9 +872,9 @@ func TestAddMongoDB(t *testing.T) { func TestRemoveMongoDB(t *testing.T) { addMongoDB := func(t *testing.T, serviceName, nodeName string, withAgents bool) (nodeID string, pmmAgentID string, serviceID string) { t.Helper() - nodeID, pmmAgentID = RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID = RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) params := &service.AddMongoDBParams{ diff --git a/api-tests/management/mysql_test.go b/api-tests/management/mysql_test.go index 9ebdaa5b30a..959ba98c616 100644 --- a/api-tests/management/mysql_test.go +++ b/api-tests/management/mysql_test.go @@ -28,16 +28,15 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestAddMySQL(t *testing.T) { t.Run("Basic", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -112,9 +111,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With agents", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -223,9 +222,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With labels", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -284,9 +283,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With the same name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-the-same-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -332,9 +331,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With add_node block", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -455,9 +454,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With Wrong Node Type", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "generic-node-for-wrong-node-type") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -487,9 +486,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Empty Service Name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -505,9 +504,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Empty Address And Socket", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -530,9 +529,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Empty Port", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -556,9 +555,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Address And Socket Conflict.", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -584,9 +583,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Empty Pmm Agent ID", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -608,9 +607,9 @@ func TestAddMySQL(t *testing.T) { t.Run("Empty username", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -633,9 +632,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With MetricsModePush", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -710,9 +709,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With MetricsModePull", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -786,9 +785,9 @@ func TestAddMySQL(t *testing.T) { t.Run("With MetricsModeAuto", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -865,9 +864,9 @@ func TestAddMySQL(t *testing.T) { func TestRemoveMySQL(t *testing.T) { addMySQL := func(t *testing.T, serviceName, nodeName string, withAgents bool) (nodeID string, pmmAgentID string, serviceID string) { t.Helper() - nodeID, pmmAgentID = RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID = RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) params := &service.AddMySQLParams{ diff --git a/api-tests/management/nodes_test.go b/api-tests/management/nodes_test.go index ade3932a26a..cfc3abea5a4 100644 --- a/api-tests/management/nodes_test.go +++ b/api-tests/management/nodes_test.go @@ -29,7 +29,7 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" nodes "github.com/percona/pmm/api/inventory/v1/json/client/nodes_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" + node "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestNodeRegister(t *testing.T) { @@ -79,7 +79,7 @@ func TestNodeRegister(t *testing.T) { Context: pmmapitests.Context, Body: body, } - _, err := client.Default.NodeService.RegisterNode(¶ms) + _, err := client.Default.Service.RegisterNode(¶ms) wantErr := fmt.Sprintf("Node with name %q already exists.", nodeName) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, wantErr) }) @@ -106,7 +106,7 @@ func TestNodeRegister(t *testing.T) { Context: pmmapitests.Context, Body: body, } - node, err := client.Default.NodeService.RegisterNode(¶ms) + node, err := client.Default.Service.RegisterNode(¶ms) assert.NoError(t, err) defer pmmapitests.RemoveNodes(t, node.Payload.GenericNode.NodeID) @@ -135,7 +135,7 @@ func TestNodeRegister(t *testing.T) { Context: pmmapitests.Context, Body: body, } - _, err := client.Default.NodeService.RegisterNode(¶ms) + _, err := client.Default.Service.RegisterNode(¶ms) wantErr := fmt.Sprintf("Node with instance %q and region %q already exists.", body.Address, body.Region) pmmapitests.AssertAPIErrorf(t, err, 409, codes.AlreadyExists, wantErr) }) @@ -163,7 +163,7 @@ func TestNodeRegister(t *testing.T) { Context: pmmapitests.Context, Body: body, } - node, err := client.Default.NodeService.RegisterNode(¶ms) + node, err := client.Default.Service.RegisterNode(¶ms) assert.NoError(t, err) defer pmmapitests.RemoveNodes(t, node.Payload.GenericNode.NodeID) @@ -430,7 +430,7 @@ func TestNodeRegister(t *testing.T) { Context: pmmapitests.Context, Body: node.RegisterNodeBody{}, } - registerOK, err := client.Default.NodeService.RegisterNode(¶ms) + registerOK, err := client.Default.Service.RegisterNode(¶ms) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, "invalid RegisterNodeRequest.NodeName: value length must be at least 1 runes") require.Nil(t, registerOK) }) @@ -442,7 +442,7 @@ func TestNodeRegister(t *testing.T) { NodeName: pmmapitests.TestString(t, "node-name"), }, } - registerOK, err := client.Default.NodeService.RegisterNode(¶ms) + registerOK, err := client.Default.Service.RegisterNode(¶ms) pmmapitests.AssertAPIErrorf(t, err, 400, codes.InvalidArgument, `Unsupported Node type "NODE_TYPE_UNSPECIFIED".`) require.Nil(t, registerOK) }) diff --git a/api-tests/management/postgresql_test.go b/api-tests/management/postgresql_test.go index 17e46c433a9..2038ffe5263 100644 --- a/api-tests/management/postgresql_test.go +++ b/api-tests/management/postgresql_test.go @@ -28,7 +28,6 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) @@ -37,9 +36,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Basic", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -116,9 +115,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With agents", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -227,9 +226,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With labels", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -284,9 +283,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With the same name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-the-same-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -333,9 +332,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With add_node block", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -459,9 +458,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With Wrong Node Type", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "generic-node-for-wrong-node-type") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -491,9 +490,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Empty Service Name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -509,9 +508,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Empty Address", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -533,9 +532,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Empty Port", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -558,9 +557,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Empty Pmm Agent ID", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -582,9 +581,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("Address And Socket Conflict.", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -610,9 +609,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With MetricsModePush", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -688,9 +687,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With MetricsModePull", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -765,9 +764,9 @@ func TestAddPostgreSQL(t *testing.T) { t.Run("With MetricsModeAuto", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -845,9 +844,9 @@ func TestAddPostgreSQL(t *testing.T) { func TestRemovePostgreSQL(t *testing.T) { addPostgreSQL := func(t *testing.T, serviceName, nodeName string, withAgents bool) (nodeID string, pmmAgentID string, serviceID string) { t.Helper() - nodeID, pmmAgentID = RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID = RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) params := &service.AddPostgreSQLParams{ diff --git a/api-tests/management/proxysql_test.go b/api-tests/management/proxysql_test.go index 6961b6a814a..9ef1c344c04 100644 --- a/api-tests/management/proxysql_test.go +++ b/api-tests/management/proxysql_test.go @@ -28,16 +28,15 @@ import ( agents "github.com/percona/pmm/api/inventory/v1/json/client/agents_service" services "github.com/percona/pmm/api/inventory/v1/json/client/services_service" "github.com/percona/pmm/api/management/v1/json/client" - node "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) func TestAddProxySQL(t *testing.T) { t.Run("Basic", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -111,9 +110,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("With agents", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -189,9 +188,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("With labels", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-all-fields-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -250,9 +249,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("With the same name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-the-same-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -298,9 +297,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("With add_node block", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-for-basic-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -420,9 +419,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("With Wrong Node Type", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "generic-node-for-wrong-node-type") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -452,9 +451,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Empty Service Name", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -470,9 +469,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Empty Address And Socket", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -494,9 +493,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Empty Port", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -519,9 +518,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Address And Socket Conflict.", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -547,9 +546,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Empty Pmm Agent ID", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -571,9 +570,9 @@ func TestAddProxySQL(t *testing.T) { t.Run("Empty username", func(t *testing.T) { nodeName := pmmapitests.TestString(t, "node-name") - nodeID, pmmAgentID := RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID := RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) defer pmmapitests.RemoveNodes(t, nodeID) defer RemovePMMAgentWithSubAgents(t, pmmAgentID) @@ -598,9 +597,9 @@ func TestAddProxySQL(t *testing.T) { func TestRemoveProxySQL(t *testing.T) { addProxySQL := func(t *testing.T, serviceName, nodeName string) (nodeID string, pmmAgentID string, serviceID string) { t.Helper() - nodeID, pmmAgentID = RegisterGenericNode(t, node.RegisterNodeBody{ + nodeID, pmmAgentID = RegisterGenericNode(t, service.RegisterNodeBody{ NodeName: nodeName, - NodeType: pointer.ToString(node.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), + NodeType: pointer.ToString(service.RegisterNodeBodyNodeTypeNODETYPEGENERICNODE), }) params := &service.AddProxySQLParams{ diff --git a/api-tests/server/logs_test.go b/api-tests/server/logs_test.go index 3411a6cdb04..abee317d5ee 100644 --- a/api-tests/server/logs_test.go +++ b/api-tests/server/logs_test.go @@ -27,12 +27,12 @@ import ( pmmapitests "github.com/percona/pmm/api-tests" serverClient "github.com/percona/pmm/api/server/v1/json/client" - "github.com/percona/pmm/api/server/v1/json/client/server" + "github.com/percona/pmm/api/server/v1/json/client/server_service" ) func TestDownloadLogs(t *testing.T) { var buf bytes.Buffer - res, err := serverClient.Default.Server.Logs(&server.LogsParams{ + res, err := serverClient.Default.ServerService.Logs(&server_service.LogsParams{ Context: pmmapitests.Context, }, &buf) require.NoError(t, err) diff --git a/api/MIGRATION_TO_V3.md b/api/MIGRATION_TO_V3.md index df79414cf8c..e7dfee48eae 100644 --- a/api/MIGRATION_TO_V3.md +++ b/api/MIGRATION_TO_V3.md @@ -8,13 +8,13 @@ } ``` -| Current | Migrate to | Comments | -| ------------------------------ | ------------------------------------- | ---------------------------- | -| POST /v1/updates/Check | GET /v1/updates | | -| POST /v1/updates/Start | POST /v1/updates:start | | -| POST /v1/updates/Status | GET /v1/updates/status?log_offset=200 | "auth_token" - pass via headers | -| POST /v1/management/HAProxy/Add | POST /management/v1/services/HAProxy | | -| POST /v1/management/Service/Remove | DELETE /management/v1/services/{id} | {service_id} or {service_name} | +| Current | Migrate to | Comments | +| ------------------------------ | -------------------------------------------- | ------------------------------- | +| POST /v1/updates/Check | GET /updates/v1/update | | +| POST /v1/updates/Start | POST /updates/v1/update:start | | +| POST /v1/updates/Status | GET /updates/v1/update/status?log_offset=200 | "auth_token" - pass via headers | +| POST /v1/management/HAProxy/Add | POST /management/v1/services/HAProxy | | +| POST /v1/management/Service/Remove | DELETE /management/v1/services/{id} | {service_id} or {service_name} | // POST /v1/management/Service/Remove => DELETE /management/v1/services/{id} diff --git a/api/management/v1/agent/agent.pb.go b/api/management/v1/agent/agent.pb.go index 12f0258cad9..76a919e6d58 100644 --- a/api/management/v1/agent/agent.pb.go +++ b/api/management/v1/agent/agent.pb.go @@ -536,7 +536,7 @@ type UniversalAgent_MySQLOptions struct { unknownFields protoimpl.UnknownFields // True if TLS key is set. - IsTlsKeySet bool `protobuf:"varint,3,opt,name=is_tls_key_set,json=isTlsKeySet,proto3" json:"is_tls_key_set,omitempty"` + IsTlsKeySet bool `protobuf:"varint,1,opt,name=is_tls_key_set,json=isTlsKeySet,proto3" json:"is_tls_key_set,omitempty"` } func (x *UniversalAgent_MySQLOptions) Reset() { @@ -672,15 +672,15 @@ type UniversalAgent_MongoDBOptions struct { // True if TLS certificate file password is set. IsTlsCertificateKeyFilePasswordSet bool `protobuf:"varint,2,opt,name=is_tls_certificate_key_file_password_set,json=isTlsCertificateKeyFilePasswordSet,proto3" json:"is_tls_certificate_key_file_password_set,omitempty"` // MongoDB auth mechanism. - AuthenticationMechanism string `protobuf:"bytes,4,opt,name=authentication_mechanism,json=authenticationMechanism,proto3" json:"authentication_mechanism,omitempty"` + AuthenticationMechanism string `protobuf:"bytes,3,opt,name=authentication_mechanism,json=authenticationMechanism,proto3" json:"authentication_mechanism,omitempty"` // MongoDB auth database. - AuthenticationDatabase string `protobuf:"bytes,5,opt,name=authentication_database,json=authenticationDatabase,proto3" json:"authentication_database,omitempty"` + AuthenticationDatabase string `protobuf:"bytes,4,opt,name=authentication_database,json=authenticationDatabase,proto3" json:"authentication_database,omitempty"` // MongoDB stats collections. - StatsCollections []string `protobuf:"bytes,6,rep,name=stats_collections,json=statsCollections,proto3" json:"stats_collections,omitempty"` + StatsCollections []string `protobuf:"bytes,5,rep,name=stats_collections,json=statsCollections,proto3" json:"stats_collections,omitempty"` // MongoDB collections limit. - CollectionsLimit int32 `protobuf:"varint,7,opt,name=collections_limit,json=collectionsLimit,proto3" json:"collections_limit,omitempty"` + CollectionsLimit int32 `protobuf:"varint,6,opt,name=collections_limit,json=collectionsLimit,proto3" json:"collections_limit,omitempty"` // True if all collectors are enabled. - EnableAllCollectors bool `protobuf:"varint,8,opt,name=enable_all_collectors,json=enableAllCollectors,proto3" json:"enable_all_collectors,omitempty"` + EnableAllCollectors bool `protobuf:"varint,7,opt,name=enable_all_collectors,json=enableAllCollectors,proto3" json:"enable_all_collectors,omitempty"` } func (x *UniversalAgent_MongoDBOptions) Reset() { @@ -770,9 +770,9 @@ type UniversalAgent_PostgreSQLOptions struct { unknownFields protoimpl.UnknownFields // True if TLS key is set. - IsSslKeySet bool `protobuf:"varint,3,opt,name=is_ssl_key_set,json=isSslKeySet,proto3" json:"is_ssl_key_set,omitempty"` + IsSslKeySet bool `protobuf:"varint,1,opt,name=is_ssl_key_set,json=isSslKeySet,proto3" json:"is_ssl_key_set,omitempty"` // Limit of databases for auto-discovery. - AutoDiscoveryLimit int32 `protobuf:"varint,4,opt,name=auto_discovery_limit,json=autoDiscoveryLimit,proto3" json:"auto_discovery_limit,omitempty"` + AutoDiscoveryLimit int32 `protobuf:"varint,2,opt,name=auto_discovery_limit,json=autoDiscoveryLimit,proto3" json:"auto_discovery_limit,omitempty"` } func (x *UniversalAgent_PostgreSQLOptions) Reset() { @@ -834,7 +834,7 @@ var file_management_v1_agent_agent_proto_rawDesc = []byte{ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, - 0xc7, 0x15, 0x0a, 0x0e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, + 0xa9, 0x15, 0x0a, 0x0e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x31, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, @@ -951,95 +951,93 @@ var file_management_v1_agent_agent_proto_rawDesc = []byte{ 0x52, 0x0b, 0x69, 0x73, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x18, 0x28, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x45, 0x78, - 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x3f, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x4f, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x1a, 0x33, 0x0a, 0x0c, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, - 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, - 0x69, 0x73, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x4a, 0x04, 0x08, 0x01, 0x10, - 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0xc9, 0x01, 0x0a, 0x0c, 0x41, 0x7a, 0x75, 0x72, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x69, 0x73, 0x5f, 0x63, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x27, 0x0a, - 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, 0x6e, 0x61, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x65, 0x6e, 0x61, 0x6e, - 0x74, 0x49, 0x64, 0x1a, 0xaa, 0x03, 0x0a, 0x0e, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x1a, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x73, 0x54, 0x6c, 0x73, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x1a, 0xc9, 0x01, 0x0a, 0x0c, + 0x41, 0x7a, 0x75, 0x72, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x2f, 0x0a, 0x14, 0x69, 0x73, 0x5f, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x47, 0x72, 0x6f, 0x75, + 0x70, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x65, + 0x6e, 0x61, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, + 0x65, 0x6e, 0x61, 0x6e, 0x74, 0x49, 0x64, 0x1a, 0xa4, 0x03, 0x0a, 0x0e, 0x4d, 0x6f, 0x6e, 0x67, + 0x6f, 0x44, 0x42, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3a, 0x0a, 0x1a, 0x69, 0x73, + 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, + 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, + 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x54, 0x0a, 0x28, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x73, 0x54, 0x6c, - 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x53, - 0x65, 0x74, 0x12, 0x54, 0x0a, 0x28, 0x69, 0x73, 0x5f, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, - 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x69, 0x6c, - 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x18, 0x61, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x63, 0x68, 0x61, - 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x61, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x63, 0x68, 0x61, 0x6e, - 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x11, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, 0x74, 0x73, 0x43, 0x6f, - 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x6f, 0x6c, - 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, - 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x41, 0x6c, 0x6c, - 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, - 0x1a, 0x76, 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x73, 0x73, 0x6c, 0x5f, - 0x6b, 0x65, 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, - 0x73, 0x53, 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, - 0x74, 0x6f, 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, - 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x4a, 0x04, 0x08, 0x01, - 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x11, 0x4c, 0x69, 0x73, - 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, - 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x32, 0xbc, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, - 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x73, + 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x22, 0x69, 0x73, 0x54, 0x6c, 0x73, 0x43, + 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x4b, 0x65, 0x79, 0x46, 0x69, 0x6c, + 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x53, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x18, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x65, 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, + 0x63, 0x68, 0x61, 0x6e, 0x69, 0x73, 0x6d, 0x12, 0x37, 0x0a, 0x17, 0x61, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x62, 0x61, + 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x16, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x62, 0x61, 0x73, 0x65, + 0x12, 0x2b, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x41, 0x6c, 0x6c, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x6a, + 0x0a, 0x11, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x4f, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x23, 0x0a, 0x0e, 0x69, 0x73, 0x5f, 0x73, 0x73, 0x6c, 0x5f, 0x6b, 0x65, + 0x79, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, + 0x73, 0x6c, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x61, 0x75, 0x74, 0x6f, + 0x5f, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x1a, 0x3f, 0x0a, 0x11, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x4b, 0x0a, 0x11, 0x4c, + 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, + 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0x4b, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, + 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x52, 0x06, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x32, 0xbc, 0x01, 0x0a, 0x0c, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x41, + 0x67, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x31, 0x12, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x22, 0x52, 0x65, 0x74, 0x75, - 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x6c, - 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x4c, 0x69, - 0x73, 0x74, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x67, 0x65, 0x6e, - 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x58, 0x92, 0x41, 0x31, 0x12, + 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x1a, 0x22, 0x52, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x3a, 0x01, 0x2a, 0x22, 0x19, 0x2f, 0x76, 0x31, 0x2f, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x2f, + 0x4c, 0x69, 0x73, 0x74, 0x42, 0xb1, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x61, 0x67, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, + 0x76, 0x31, 0x2f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x3b, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x41, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xca, 0x02, 0x0d, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0xe2, 0x02, 0x19, 0x41, 0x67, + 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/management/v1/agent/agent.proto b/api/management/v1/agent/agent.proto index e9d7ccc1ff6..33b1f0493da 100644 --- a/api/management/v1/agent/agent.proto +++ b/api/management/v1/agent/agent.proto @@ -8,10 +8,8 @@ import "protoc-gen-openapiv2/options/annotations.proto"; message UniversalAgent { message MySQLOptions { - reserved 1; // tls_ca - reserved 2; // tls_cert // True if TLS key is set. - bool is_tls_key_set = 3; + bool is_tls_key_set = 1; } message AzureOptions { @@ -32,26 +30,23 @@ message UniversalAgent { bool is_tls_certificate_key_set = 1; // True if TLS certificate file password is set. bool is_tls_certificate_key_file_password_set = 2; - reserved 3; // tls_ca // MongoDB auth mechanism. - string authentication_mechanism = 4; + string authentication_mechanism = 3; // MongoDB auth database. - string authentication_database = 5; + string authentication_database = 4; // MongoDB stats collections. - repeated string stats_collections = 6; + repeated string stats_collections = 5; // MongoDB collections limit. - int32 collections_limit = 7; + int32 collections_limit = 6; // True if all collectors are enabled. - bool enable_all_collectors = 8; + bool enable_all_collectors = 7; } message PostgreSQLOptions { - reserved 1; // ssl_ca - reserved 2; // ssl_cert // True if TLS key is set. - bool is_ssl_key_set = 3; + bool is_ssl_key_set = 1; // Limit of databases for auto-discovery. - int32 auto_discovery_limit = 4; + int32 auto_discovery_limit = 2; } // Unique agent identifier. diff --git a/api/management/v1/annotation.pb.go b/api/management/v1/annotation.pb.go index c118b4fe832..1e4cfe19204 100644 --- a/api/management/v1/annotation.pb.go +++ b/api/management/v1/annotation.pb.go @@ -15,7 +15,7 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" + _ "google.golang.org/protobuf/types/known/emptypb" ) const ( @@ -123,30 +123,19 @@ var file_management_v1_annotation_proto_rawDesc = []byte{ 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x32, - 0xb2, 0x01, 0x0a, 0x11, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9c, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, - 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x22, 0x4e, 0x92, 0x41, 0x22, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, - 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x10, 0x41, 0x64, 0x64, 0x73, 0x20, - 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x23, 0x3a, 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x41, 0x64, 0x64, 0x42, 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x6e, 0x6e, 0x6f, - 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, - 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x42, + 0xb0, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, + 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -165,15 +154,12 @@ var ( file_management_v1_annotation_proto_msgTypes = make([]protoimpl.MessageInfo, 1) file_management_v1_annotation_proto_goTypes = []interface{}{ (*AddAnnotationRequest)(nil), // 0: management.v1.AddAnnotationRequest - (*emptypb.Empty)(nil), // 1: google.protobuf.Empty } ) var file_management_v1_annotation_proto_depIdxs = []int32{ - 0, // 0: management.v1.AnnotationService.AddAnnotation:input_type -> management.v1.AddAnnotationRequest - 1, // 1: management.v1.AnnotationService.AddAnnotation:output_type -> google.protobuf.Empty - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -206,7 +192,7 @@ func file_management_v1_annotation_proto_init() { NumEnums: 0, NumMessages: 1, NumExtensions: 0, - NumServices: 1, + NumServices: 0, }, GoTypes: file_management_v1_annotation_proto_goTypes, DependencyIndexes: file_management_v1_annotation_proto_depIdxs, diff --git a/api/management/v1/annotation.pb.gw.go b/api/management/v1/annotation.pb.gw.go deleted file mode 100644 index 44f8528224e..00000000000 --- a/api/management/v1/annotation.pb.gw.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: management/v1/annotation.proto - -/* -Package managementv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package managementv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_AnnotationService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client AnnotationServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddAnnotationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_AnnotationService_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server AnnotationServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq AddAnnotationRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.AddAnnotation(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterAnnotationServiceHandlerServer registers the http handlers for service AnnotationService to "mux". -// UnaryRPC :call AnnotationServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAnnotationServiceHandlerFromEndpoint instead. -func RegisterAnnotationServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AnnotationServiceServer) error { - mux.Handle("POST", pattern_AnnotationService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.AnnotationService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_AnnotationService_AddAnnotation_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AnnotationService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterAnnotationServiceHandlerFromEndpoint is same as RegisterAnnotationServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterAnnotationServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterAnnotationServiceHandler(ctx, mux, conn) -} - -// RegisterAnnotationServiceHandler registers the http handlers for service AnnotationService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterAnnotationServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterAnnotationServiceHandlerClient(ctx, mux, NewAnnotationServiceClient(conn)) -} - -// RegisterAnnotationServiceHandlerClient registers the http handlers for service AnnotationService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AnnotationServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AnnotationServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "AnnotationServiceClient" to call the correct interceptors. -func RegisterAnnotationServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AnnotationServiceClient) error { - mux.Handle("POST", pattern_AnnotationService_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.AnnotationService/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_AnnotationService_AddAnnotation_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_AnnotationService_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var pattern_AnnotationService_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) - -var forward_AnnotationService_AddAnnotation_0 = runtime.ForwardResponseMessage diff --git a/api/management/v1/annotation.proto b/api/management/v1/annotation.proto index b630c7c359c..9fcdfe93628 100644 --- a/api/management/v1/annotation.proto +++ b/api/management/v1/annotation.proto @@ -2,9 +2,6 @@ syntax = "proto3"; package management.v1; -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "protoc-gen-openapiv2/options/annotations.proto"; import "validate/validate.proto"; // AddAnnotationRequest is a params to add new annotation. @@ -18,18 +15,3 @@ message AddAnnotationRequest { // Used for annotate services. repeated string service_names = 4; } - -// Annotation service provides public methods for managing Annotations. -service AnnotationService { - // AddAnnotation adds annotation. - rpc AddAnnotation(AddAnnotationRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v1/management/Annotations/Add" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Add Annotation" - description: "Adds annotation." - }; - } -} diff --git a/api/management/v1/annotation_grpc.pb.go b/api/management/v1/annotation_grpc.pb.go deleted file mode 100644 index 304799768c0..00000000000 --- a/api/management/v1/annotation_grpc.pb.go +++ /dev/null @@ -1,112 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: management/v1/annotation.proto - -package managementv1 - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - emptypb "google.golang.org/protobuf/types/known/emptypb" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - AnnotationService_AddAnnotation_FullMethodName = "/management.v1.AnnotationService/AddAnnotation" -) - -// AnnotationServiceClient is the client API for AnnotationService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type AnnotationServiceClient interface { - // AddAnnotation adds annotation. - AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) -} - -type annotationServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewAnnotationServiceClient(cc grpc.ClientConnInterface) AnnotationServiceClient { - return &annotationServiceClient{cc} -} - -func (c *annotationServiceClient) AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AnnotationService_AddAnnotation_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// AnnotationServiceServer is the server API for AnnotationService service. -// All implementations must embed UnimplementedAnnotationServiceServer -// for forward compatibility -type AnnotationServiceServer interface { - // AddAnnotation adds annotation. - AddAnnotation(context.Context, *AddAnnotationRequest) (*emptypb.Empty, error) - mustEmbedUnimplementedAnnotationServiceServer() -} - -// UnimplementedAnnotationServiceServer must be embedded to have forward compatible implementations. -type UnimplementedAnnotationServiceServer struct{} - -func (UnimplementedAnnotationServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") -} -func (UnimplementedAnnotationServiceServer) mustEmbedUnimplementedAnnotationServiceServer() {} - -// UnsafeAnnotationServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to AnnotationServiceServer will -// result in compilation errors. -type UnsafeAnnotationServiceServer interface { - mustEmbedUnimplementedAnnotationServiceServer() -} - -func RegisterAnnotationServiceServer(s grpc.ServiceRegistrar, srv AnnotationServiceServer) { - s.RegisterService(&AnnotationService_ServiceDesc, srv) -} - -func _AnnotationService_AddAnnotation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddAnnotationRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AnnotationServiceServer).AddAnnotation(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AnnotationService_AddAnnotation_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AnnotationServiceServer).AddAnnotation(ctx, req.(*AddAnnotationRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// AnnotationService_ServiceDesc is the grpc.ServiceDesc for AnnotationService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var AnnotationService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "management.v1.AnnotationService", - HandlerType: (*AnnotationServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "AddAnnotation", - Handler: _AnnotationService_AddAnnotation_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "management/v1/annotation.proto", -} diff --git a/api/management/v1/json/client/annotation_service/annotation_service_client.go b/api/management/v1/json/client/annotation_service/annotation_service_client.go deleted file mode 100644 index a7048109172..00000000000 --- a/api/management/v1/json/client/annotation_service/annotation_service_client.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package annotation_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new annotation service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for annotation service API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - AddAnnotation(params *AddAnnotationParams, opts ...ClientOption) (*AddAnnotationOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -AddAnnotation adds annotation - -Adds annotation. -*/ -func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption) (*AddAnnotationOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewAddAnnotationParams() - } - op := &runtime.ClientOperation{ - ID: "AddAnnotation", - Method: "POST", - PathPattern: "/v1/management/Annotations/Add", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &AddAnnotationReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*AddAnnotationOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*AddAnnotationDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/management/v1/json/client/node_service/node_service_client.go b/api/management/v1/json/client/node_service/node_service_client.go deleted file mode 100644 index 241618cb6ca..00000000000 --- a/api/management/v1/json/client/node_service/node_service_client.go +++ /dev/null @@ -1,78 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package node_service - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new node service API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for node service API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -RegisterNode registers node - -Registers a new Node and pmm-agent. -*/ -func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewRegisterNodeParams() - } - op := &runtime.ClientOperation{ - ID: "RegisterNode", - Method: "POST", - PathPattern: "/v1/management/Node/Register", - ProducesMediaTypes: []string{"application/json"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &RegisterNodeReader{formats: a.formats}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*RegisterNodeOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*RegisterNodeDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/management/v1/json/client/pmm_management_api_client.go b/api/management/v1/json/client/pmm_management_api_client.go index fe5c9e991a8..ba4d958f3e9 100644 --- a/api/management/v1/json/client/pmm_management_api_client.go +++ b/api/management/v1/json/client/pmm_management_api_client.go @@ -10,8 +10,6 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - "github.com/percona/pmm/api/management/v1/json/client/annotation_service" - "github.com/percona/pmm/api/management/v1/json/client/node_service" "github.com/percona/pmm/api/management/v1/json/client/service" ) @@ -57,8 +55,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMManagem cli := new(PMMManagementAPI) cli.Transport = transport - cli.AnnotationService = annotation_service.New(transport, formats) - cli.NodeService = node_service.New(transport, formats) cli.Service = service.New(transport, formats) return cli } @@ -104,10 +100,6 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PMMManagementAPI is a client for PMM management API type PMMManagementAPI struct { - AnnotationService annotation_service.ClientService - - NodeService node_service.ClientService - Service service.ClientService Transport runtime.ClientTransport @@ -116,7 +108,5 @@ type PMMManagementAPI struct { // SetTransport changes the transport on the client and all its subresources func (c *PMMManagementAPI) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.AnnotationService.SetTransport(transport) - c.NodeService.SetTransport(transport) c.Service.SetTransport(transport) } diff --git a/api/management/v1/json/client/annotation_service/add_annotation_parameters.go b/api/management/v1/json/client/service/add_annotation_parameters.go similarity index 99% rename from api/management/v1/json/client/annotation_service/add_annotation_parameters.go rename to api/management/v1/json/client/service/add_annotation_parameters.go index 141ce596979..297ffbfc2a8 100644 --- a/api/management/v1/json/client/annotation_service/add_annotation_parameters.go +++ b/api/management/v1/json/client/service/add_annotation_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package annotation_service +package service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/annotation_service/add_annotation_responses.go b/api/management/v1/json/client/service/add_annotation_responses.go similarity index 99% rename from api/management/v1/json/client/annotation_service/add_annotation_responses.go rename to api/management/v1/json/client/service/add_annotation_responses.go index 4e147002e2a..abdba7bdda3 100644 --- a/api/management/v1/json/client/annotation_service/add_annotation_responses.go +++ b/api/management/v1/json/client/service/add_annotation_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package annotation_service +package service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/node_service/register_node_parameters.go b/api/management/v1/json/client/service/register_node_parameters.go similarity index 99% rename from api/management/v1/json/client/node_service/register_node_parameters.go rename to api/management/v1/json/client/service/register_node_parameters.go index daca21549e9..f0ff6510aec 100644 --- a/api/management/v1/json/client/node_service/register_node_parameters.go +++ b/api/management/v1/json/client/service/register_node_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package node_service +package service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/node_service/register_node_responses.go b/api/management/v1/json/client/service/register_node_responses.go similarity index 99% rename from api/management/v1/json/client/node_service/register_node_responses.go rename to api/management/v1/json/client/service/register_node_responses.go index 240c6e2a1e1..03d54186f26 100644 --- a/api/management/v1/json/client/node_service/register_node_responses.go +++ b/api/management/v1/json/client/service/register_node_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package node_service +package service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/management/v1/json/client/service/service_client.go b/api/management/v1/json/client/service/service_client.go index 595612cd0e9..48e6222d56d 100644 --- a/api/management/v1/json/client/service/service_client.go +++ b/api/management/v1/json/client/service/service_client.go @@ -28,6 +28,8 @@ type ClientOption func(*runtime.ClientOperation) // ClientService is the interface for Client methods type ClientService interface { + AddAnnotation(params *AddAnnotationParams, opts ...ClientOption) (*AddAnnotationOK, error) + AddExternal(params *AddExternalParams, opts ...ClientOption) (*AddExternalOK, error) AddHAProxy(params *AddHAProxyParams, opts ...ClientOption) (*AddHAProxyOK, error) @@ -44,11 +46,52 @@ type ClientService interface { DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (*DiscoverRDSOK, error) + RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) + RemoveService(params *RemoveServiceParams, opts ...ClientOption) (*RemoveServiceOK, error) SetTransport(transport runtime.ClientTransport) } +/* +AddAnnotation adds annotation + +Adds an annotation. +*/ +func (a *Client) AddAnnotation(params *AddAnnotationParams, opts ...ClientOption) (*AddAnnotationOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewAddAnnotationParams() + } + op := &runtime.ClientOperation{ + ID: "AddAnnotation", + Method: "POST", + PathPattern: "/v1/management/Annotations/Add", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &AddAnnotationReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*AddAnnotationOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*AddAnnotationDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* AddExternal adds external service @@ -361,6 +404,45 @@ func (a *Client) DiscoverRDS(params *DiscoverRDSParams, opts ...ClientOption) (* return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +RegisterNode registers node + +Registers a new Node and pmm-agent. +*/ +func (a *Client) RegisterNode(params *RegisterNodeParams, opts ...ClientOption) (*RegisterNodeOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewRegisterNodeParams() + } + op := &runtime.ClientOperation{ + ID: "RegisterNode", + Method: "POST", + PathPattern: "/v1/management/Node/Register", + ProducesMediaTypes: []string{"application/json"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &RegisterNodeReader{formats: a.formats}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*RegisterNodeOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*RegisterNodeDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* RemoveService removes service diff --git a/api/management/v1/json/v1.json b/api/management/v1/json/v1.json index 7e969439e5f..c2ce227c7e2 100644 --- a/api/management/v1/json/v1.json +++ b/api/management/v1/json/v1.json @@ -17,9 +17,9 @@ "paths": { "/v1/management/Annotations/Add": { "post": { - "description": "Adds annotation.", + "description": "Adds an annotation.", "tags": [ - "AnnotationService" + "Service" ], "summary": "Add Annotation", "operationId": "AddAnnotation", @@ -2143,7 +2143,7 @@ "post": { "description": "Registers a new Node and pmm-agent.", "tags": [ - "NodeService" + "Service" ], "summary": "Register Node", "operationId": "RegisterNode", @@ -4817,12 +4817,6 @@ } }, "tags": [ - { - "name": "AnnotationService" - }, - { - "name": "NodeService" - }, { "name": "Service" } diff --git a/api/management/v1/node.pb.go b/api/management/v1/node.pb.go index c5e606e29fa..22a8748d249 100644 --- a/api/management/v1/node.pb.go +++ b/api/management/v1/node.pb.go @@ -528,31 +528,19 @@ var file_management_v1_node_proto_rawDesc = []byte{ 0x6e, 0x74, 0x52, 0x08, 0x70, 0x6d, 0x6d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x32, 0xc7, 0x01, 0x0a, - 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb7, 0x01, 0x0a, - 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, 0x41, 0x34, 0x12, 0x0d, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x1a, 0x23, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x4e, 0x6f, 0x64, 0x65, - 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6d, 0x6d, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4e, 0x6f, 0x64, 0x65, 0x2f, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x42, 0xaa, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, - 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, - 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, - 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, - 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x77, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x42, 0xaa, 0x01, 0x0a, + 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x42, 0x09, 0x4e, 0x6f, 0x64, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, + 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, + 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -592,10 +580,8 @@ var file_management_v1_node_proto_depIdxs = []int32{ 7, // 5: management.v1.RegisterNodeResponse.generic_node:type_name -> inventory.v1.GenericNode 8, // 6: management.v1.RegisterNodeResponse.container_node:type_name -> inventory.v1.ContainerNode 9, // 7: management.v1.RegisterNodeResponse.pmm_agent:type_name -> inventory.v1.PMMAgent - 1, // 8: management.v1.NodeService.RegisterNode:input_type -> management.v1.RegisterNodeRequest - 2, // 9: management.v1.NodeService.RegisterNode:output_type -> management.v1.RegisterNodeResponse - 9, // [9:10] is the sub-list for method output_type - 8, // [8:9] is the sub-list for method input_type + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type 8, // [8:8] is the sub-list for extension type_name 8, // [8:8] is the sub-list for extension extendee 0, // [0:8] is the sub-list for field type_name @@ -653,7 +639,7 @@ func file_management_v1_node_proto_init() { NumEnums: 0, NumMessages: 5, NumExtensions: 0, - NumServices: 1, + NumServices: 0, }, GoTypes: file_management_v1_node_proto_goTypes, DependencyIndexes: file_management_v1_node_proto_depIdxs, diff --git a/api/management/v1/node.pb.gw.go b/api/management/v1/node.pb.gw.go deleted file mode 100644 index 0e58d00bc4c..00000000000 --- a/api/management/v1/node.pb.gw.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: management/v1/node.proto - -/* -Package managementv1 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package managementv1 - -import ( - "context" - "io" - "net/http" - - "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/metadata" - "google.golang.org/grpc/status" - "google.golang.org/protobuf/proto" -) - -// Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = metadata.Join -) - -func request_NodeService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodeServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterNodeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err -} - -func local_request_NodeService_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server NodeServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq RegisterNodeRequest - var metadata runtime.ServerMetadata - - newReader, berr := utilities.IOReaderFactory(req.Body) - if berr != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) - } - if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.RegisterNode(ctx, &protoReq) - return msg, metadata, err -} - -// RegisterNodeServiceHandlerServer registers the http handlers for service NodeService to "mux". -// UnaryRPC :call NodeServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNodeServiceHandlerFromEndpoint instead. -func RegisterNodeServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NodeServiceServer) error { - mux.Handle("POST", pattern_NodeService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.NodeService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_NodeService_RegisterNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_NodeService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -// RegisterNodeServiceHandlerFromEndpoint is same as RegisterNodeServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterNodeServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.DialContext(ctx, endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterNodeServiceHandler(ctx, mux, conn) -} - -// RegisterNodeServiceHandler registers the http handlers for service NodeService to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterNodeServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterNodeServiceHandlerClient(ctx, mux, NewNodeServiceClient(conn)) -} - -// RegisterNodeServiceHandlerClient registers the http handlers for service NodeService -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NodeServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NodeServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "NodeServiceClient" to call the correct interceptors. -func RegisterNodeServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NodeServiceClient) error { - mux.Handle("POST", pattern_NodeService_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.NodeService/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_NodeService_RegisterNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) - if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) - return - } - - forward_NodeService_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) - - return nil -} - -var pattern_NodeService_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) - -var forward_NodeService_RegisterNode_0 = runtime.ForwardResponseMessage diff --git a/api/management/v1/node.proto b/api/management/v1/node.proto index 6184c49fdec..938d09fea30 100644 --- a/api/management/v1/node.proto +++ b/api/management/v1/node.proto @@ -79,18 +79,3 @@ message RegisterNodeResponse { // Warning message. string warning = 5; } - -// Node service provides public Management API methods for Nodes. -service NodeService { - // RegisterNode registers a new Node and pmm-agent. - rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) { - option (google.api.http) = { - post: "/v1/management/Node/Register" - body: "*" - }; - option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { - summary: "Register Node" - description: "Registers a new Node and pmm-agent." - }; - } -} diff --git a/api/management/v1/node_grpc.pb.go b/api/management/v1/node_grpc.pb.go deleted file mode 100644 index 7ec1704b1fb..00000000000 --- a/api/management/v1/node_grpc.pb.go +++ /dev/null @@ -1,111 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.3.0 -// - protoc (unknown) -// source: management/v1/node.proto - -package managementv1 - -import ( - context "context" - - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -const ( - NodeService_RegisterNode_FullMethodName = "/management.v1.NodeService/RegisterNode" -) - -// NodeServiceClient is the client API for NodeService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type NodeServiceClient interface { - // RegisterNode registers a new Node and pmm-agent. - RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) -} - -type nodeServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewNodeServiceClient(cc grpc.ClientConnInterface) NodeServiceClient { - return &nodeServiceClient{cc} -} - -func (c *nodeServiceClient) RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) { - out := new(RegisterNodeResponse) - err := c.cc.Invoke(ctx, NodeService_RegisterNode_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// NodeServiceServer is the server API for NodeService service. -// All implementations must embed UnimplementedNodeServiceServer -// for forward compatibility -type NodeServiceServer interface { - // RegisterNode registers a new Node and pmm-agent. - RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) - mustEmbedUnimplementedNodeServiceServer() -} - -// UnimplementedNodeServiceServer must be embedded to have forward compatible implementations. -type UnimplementedNodeServiceServer struct{} - -func (UnimplementedNodeServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") -} -func (UnimplementedNodeServiceServer) mustEmbedUnimplementedNodeServiceServer() {} - -// UnsafeNodeServiceServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to NodeServiceServer will -// result in compilation errors. -type UnsafeNodeServiceServer interface { - mustEmbedUnimplementedNodeServiceServer() -} - -func RegisterNodeServiceServer(s grpc.ServiceRegistrar, srv NodeServiceServer) { - s.RegisterService(&NodeService_ServiceDesc, srv) -} - -func _NodeService_RegisterNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(RegisterNodeRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(NodeServiceServer).RegisterNode(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: NodeService_RegisterNode_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(NodeServiceServer).RegisterNode(ctx, req.(*RegisterNodeRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// NodeService_ServiceDesc is the grpc.ServiceDesc for NodeService service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var NodeService_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "management.v1.NodeService", - HandlerType: (*NodeServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "RegisterNode", - Handler: _NodeService_RegisterNode_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "management/v1/node.proto", -} diff --git a/api/management/v1/service.pb.go b/api/management/v1/service.pb.go index 47eaee02d1f..24d39a55e38 100644 --- a/api/management/v1/service.pb.go +++ b/api/management/v1/service.pb.go @@ -106,7 +106,9 @@ var file_management_v1_service_proto_rawDesc = []byte{ 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x18, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x2f, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, + 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x68, 0x61, 0x70, 0x72, @@ -114,210 +116,233 @@ var file_management_v1_service_proto_rawDesc = []byte{ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x1c, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, - 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, - 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x14, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x32, 0xc1, 0x15, 0x0a, 0x07, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x86, 0x03, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, - 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x02, - 0x92, 0x41, 0x85, 0x02, 0x12, 0x14, 0x41, 0x64, 0x64, 0x20, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, - 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0xec, 0x01, 0x41, 0x64, 0x64, - 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, - 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, - 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, - 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, - 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, - 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, - 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x69, + 0x6f, 0x1a, 0x18, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, + 0x2f, 0x6e, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x67, + 0x72, 0x65, 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, + 0x73, 0x71, 0x6c, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x72, 0x64, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, + 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x14, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x19, 0x2e, 0x69, 0x6e, 0x76, + 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x32, 0x9d, 0x18, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x12, 0x9f, 0x01, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x51, 0x92, 0x41, 0x25, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x13, 0x41, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x6e, + 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x3a, + 0x01, 0x2a, 0x22, 0x1e, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x41, + 0x64, 0x64, 0x12, 0xb7, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5e, 0x92, 0x41, + 0x34, 0x12, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x20, 0x4e, 0x6f, 0x64, 0x65, + 0x1a, 0x23, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x65, + 0x77, 0x20, 0x4e, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x6d, 0x6d, 0x2d, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x3a, 0x01, 0x2a, 0x22, 0x1c, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4e, + 0x6f, 0x64, 0x65, 0x2f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x86, 0x03, 0x0a, + 0x0b, 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x12, 0x21, 0x2e, 0x6d, + 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x41, 0x64, 0x64, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0xaf, 0x02, 0x92, 0x41, 0x85, 0x02, 0x12, 0x14, 0x41, 0x64, 0x64, 0x20, + 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x1a, 0xec, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, + 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x64, 0x64, + 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, + 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, + 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, + 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, + 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, + 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, + 0x74, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, + 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, + 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x72, 0x75, + 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2e, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, + 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, + 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, + 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, + 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x92, 0x41, 0xce, 0x01, + 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x1a, 0xbe, 0x01, + 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, + 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, + 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, - 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x72, 0x75, 0x6e, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, - 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, - 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, - 0x6e, 0x74, 0x2f, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x41, 0x64, 0x64, 0x12, - 0xcb, 0x02, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x20, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, - 0x2e, 0x41, 0x64, 0x64, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xf7, 0x01, 0x92, 0x41, 0xce, 0x01, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, - 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x1a, 0xbe, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x48, - 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, - 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, - 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, - 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, - 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, - 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, - 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, - 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, - 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, - 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x80, 0x03, - 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, - 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb2, 0x02, 0x92, 0x41, - 0x8b, 0x02, 0x12, 0x09, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xfd, 0x01, - 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, - 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, - 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, - 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, - 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, - 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, - 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, - 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, - 0x73, 0x20, 0x22, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, - 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x22, 0x20, - 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, - 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, - 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, - 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, - 0x12, 0x8d, 0x03, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x12, - 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, - 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 0x92, 0x41, 0x90, 0x02, 0x12, 0x0b, 0x41, 0x64, 0x64, - 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x1a, 0x80, 0x02, 0x41, 0x64, 0x64, 0x73, 0x20, - 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, - 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, - 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, - 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, - 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, - 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, - 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, - 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, - 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, - 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, - 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x2f, 0x41, 0x64, 0x64, - 0x12, 0xf8, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, - 0x51, 0x4c, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, - 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, - 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, - 0x92, 0x41, 0xef, 0x01, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x53, 0x51, 0x4c, 0x1a, 0xdc, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x6f, 0x73, 0x74, - 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, - 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, - 0x65, 0x73, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, - 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, - 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, - 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, - 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, - 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, - 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x6f, - 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, - 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, + 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, + 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, + 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, + 0x61, 0x6e, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x48, 0x41, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x41, 0x64, 0x64, 0x12, 0x80, 0x03, 0x0a, 0x08, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, + 0x12, 0x1e, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xb2, 0x02, 0x92, 0x41, 0x8b, 0x02, 0x12, 0x09, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x79, + 0x53, 0x51, 0x4c, 0x1a, 0xfd, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x79, 0x53, 0x51, 0x4c, + 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, + 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, + 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, + 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, + 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, + 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x64, 0x5f, + 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, + 0x71, 0x61, 0x6e, 0x5f, 0x6d, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x66, 0x73, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, + 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, - 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x6f, 0x73, - 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, - 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, - 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, 0x41, 0xe8, 0x01, 0x12, 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xd7, 0x01, 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, - 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, - 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, - 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, - 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, - 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, - 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, - 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, - 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, - 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, - 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, + 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x3a, 0x01, 0x2a, 0x22, 0x18, 0x2f, 0x76, + 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x79, 0x53, + 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0x8d, 0x03, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x4d, 0x6f, + 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x12, 0x20, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x02, 0x92, 0x41, 0x90, + 0x02, 0x12, 0x0b, 0x41, 0x64, 0x64, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x1a, 0x80, + 0x02, 0x41, 0x64, 0x64, 0x73, 0x20, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, 0x44, 0x42, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, + 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, + 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, + 0x22, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, + 0x61, 0x64, 0x64, 0x73, 0x20, 0x22, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x65, 0x78, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x71, 0x61, + 0x6e, 0x5f, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x64, 0x62, 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, + 0x65, 0x72, 0x22, 0x20, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, + 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01, 0x2a, 0x22, 0x1a, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x4d, 0x6f, 0x6e, 0x67, 0x6f, + 0x44, 0x42, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xf8, 0x02, 0x0a, 0x0d, 0x41, 0x64, 0x64, 0x50, 0x6f, + 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x6f, 0x73, 0x74, + 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, + 0x64, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x02, 0x92, 0x41, 0xef, 0x01, 0x12, 0x0e, 0x41, 0x64, 0x64, 0x20, + 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x1a, 0xdc, 0x01, 0x41, 0x64, 0x64, + 0x73, 0x20, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, + 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x20, 0x65, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x72, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, + 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, + 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, + 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, + 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, + 0x64, 0x73, 0x20, 0x22, 0x70, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x73, 0x5f, 0x65, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, + 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, + 0x69, 0x64, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, + 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, + 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, + 0x6e, 0x74, 0x2f, 0x50, 0x6f, 0x73, 0x74, 0x67, 0x72, 0x65, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, + 0x64, 0x12, 0xe9, 0x02, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, + 0x4c, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x02, 0x92, 0x41, 0xe8, 0x01, 0x12, + 0x0c, 0x41, 0x64, 0x64, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x1a, 0xd7, 0x01, + 0x41, 0x64, 0x64, 0x73, 0x20, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x20, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, + 0x20, 0x73, 0x65, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, + 0x20, 0x49, 0x74, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, + 0x79, 0x20, 0x61, 0x64, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x6f, 0x72, 0x79, 0x2c, 0x20, 0x77, + 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x72, 0x75, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, + 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x22, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x22, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x73, + 0x20, 0x22, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x73, 0x71, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x72, 0x22, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, + 0x65, 0x64, 0x20, 0x22, 0x70, 0x6d, 0x6d, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x64, + 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, + 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xa7, 0x01, + 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x12, 0x21, 0x2e, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, + 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, + 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x50, 0x72, 0x6f, 0x78, 0x79, - 0x53, 0x51, 0x4c, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xa7, 0x01, 0x0a, 0x0b, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x12, 0x21, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, - 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, - 0x76, 0x65, 0x72, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x51, - 0x92, 0x41, 0x28, 0x12, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x20, 0x52, 0x44, - 0x53, 0x1a, 0x18, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x73, 0x20, 0x52, 0x44, 0x53, - 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x20, 0x3a, 0x01, 0x2a, 0x22, 0x1b, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, - 0x72, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, - 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, - 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, - 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, - 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, 0x41, 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, - 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, - 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x41, 0x64, 0x64, 0x12, 0xaf, 0x01, 0x0a, - 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, - 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x61, 0x92, 0x41, 0x36, - 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x1a, 0x24, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x41, - 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, - 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x42, 0xad, - 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, - 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, - 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, - 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, - 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x06, 0x41, 0x64, 0x64, 0x52, + 0x44, 0x53, 0x12, 0x1c, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x64, 0x64, 0x52, 0x44, 0x53, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x41, 0x92, 0x41, 0x1d, 0x12, 0x07, 0x41, 0x64, 0x64, 0x20, 0x52, 0x44, 0x53, 0x1a, 0x12, 0x41, + 0x64, 0x64, 0x73, 0x20, 0x52, 0x44, 0x53, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x2e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1b, 0x3a, 0x01, 0x2a, 0x22, 0x16, 0x2f, 0x76, 0x31, 0x2f, + 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x52, 0x44, 0x53, 0x2f, 0x41, + 0x64, 0x64, 0x12, 0xaf, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x22, 0x61, 0x92, 0x41, 0x36, 0x12, 0x0e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x24, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x73, 0x20, + 0x61, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, + 0x77, 0x69, 0x74, 0x68, 0x20, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x22, 0x3a, 0x01, 0x2a, 0x22, 0x1d, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, + 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x52, 0x65, + 0x6d, 0x6f, 0x76, 0x65, 0x42, 0xad, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x65, 0x72, 0x63, 0x6f, 0x6e, 0x61, 0x2f, 0x70, + 0x6d, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, + 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x6d, 0x65, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x6d, 0x65, 0x6e, 0x74, + 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -337,48 +362,55 @@ var ( file_management_v1_service_proto_goTypes = []interface{}{ (*RemoveServiceRequest)(nil), // 0: management.v1.RemoveServiceRequest (v1.ServiceType)(0), // 1: inventory.v1.ServiceType - (*AddExternalRequest)(nil), // 2: management.v1.AddExternalRequest - (*AddHAProxyRequest)(nil), // 3: management.v1.AddHAProxyRequest - (*AddMySQLRequest)(nil), // 4: management.v1.AddMySQLRequest - (*AddMongoDBRequest)(nil), // 5: management.v1.AddMongoDBRequest - (*AddPostgreSQLRequest)(nil), // 6: management.v1.AddPostgreSQLRequest - (*AddProxySQLRequest)(nil), // 7: management.v1.AddProxySQLRequest - (*DiscoverRDSRequest)(nil), // 8: management.v1.DiscoverRDSRequest - (*AddRDSRequest)(nil), // 9: management.v1.AddRDSRequest - (*AddExternalResponse)(nil), // 10: management.v1.AddExternalResponse - (*AddHAProxyResponse)(nil), // 11: management.v1.AddHAProxyResponse - (*AddMySQLResponse)(nil), // 12: management.v1.AddMySQLResponse - (*AddMongoDBResponse)(nil), // 13: management.v1.AddMongoDBResponse - (*AddPostgreSQLResponse)(nil), // 14: management.v1.AddPostgreSQLResponse - (*AddProxySQLResponse)(nil), // 15: management.v1.AddProxySQLResponse - (*DiscoverRDSResponse)(nil), // 16: management.v1.DiscoverRDSResponse - (*AddRDSResponse)(nil), // 17: management.v1.AddRDSResponse - (*emptypb.Empty)(nil), // 18: google.protobuf.Empty + (*AddAnnotationRequest)(nil), // 2: management.v1.AddAnnotationRequest + (*RegisterNodeRequest)(nil), // 3: management.v1.RegisterNodeRequest + (*AddExternalRequest)(nil), // 4: management.v1.AddExternalRequest + (*AddHAProxyRequest)(nil), // 5: management.v1.AddHAProxyRequest + (*AddMySQLRequest)(nil), // 6: management.v1.AddMySQLRequest + (*AddMongoDBRequest)(nil), // 7: management.v1.AddMongoDBRequest + (*AddPostgreSQLRequest)(nil), // 8: management.v1.AddPostgreSQLRequest + (*AddProxySQLRequest)(nil), // 9: management.v1.AddProxySQLRequest + (*DiscoverRDSRequest)(nil), // 10: management.v1.DiscoverRDSRequest + (*AddRDSRequest)(nil), // 11: management.v1.AddRDSRequest + (*emptypb.Empty)(nil), // 12: google.protobuf.Empty + (*RegisterNodeResponse)(nil), // 13: management.v1.RegisterNodeResponse + (*AddExternalResponse)(nil), // 14: management.v1.AddExternalResponse + (*AddHAProxyResponse)(nil), // 15: management.v1.AddHAProxyResponse + (*AddMySQLResponse)(nil), // 16: management.v1.AddMySQLResponse + (*AddMongoDBResponse)(nil), // 17: management.v1.AddMongoDBResponse + (*AddPostgreSQLResponse)(nil), // 18: management.v1.AddPostgreSQLResponse + (*AddProxySQLResponse)(nil), // 19: management.v1.AddProxySQLResponse + (*DiscoverRDSResponse)(nil), // 20: management.v1.DiscoverRDSResponse + (*AddRDSResponse)(nil), // 21: management.v1.AddRDSResponse } ) var file_management_v1_service_proto_depIdxs = []int32{ 1, // 0: management.v1.RemoveServiceRequest.service_type:type_name -> inventory.v1.ServiceType - 2, // 1: management.v1.Service.AddExternal:input_type -> management.v1.AddExternalRequest - 3, // 2: management.v1.Service.AddHAProxy:input_type -> management.v1.AddHAProxyRequest - 4, // 3: management.v1.Service.AddMySQL:input_type -> management.v1.AddMySQLRequest - 5, // 4: management.v1.Service.AddMongoDB:input_type -> management.v1.AddMongoDBRequest - 6, // 5: management.v1.Service.AddPostgreSQL:input_type -> management.v1.AddPostgreSQLRequest - 7, // 6: management.v1.Service.AddProxySQL:input_type -> management.v1.AddProxySQLRequest - 8, // 7: management.v1.Service.DiscoverRDS:input_type -> management.v1.DiscoverRDSRequest - 9, // 8: management.v1.Service.AddRDS:input_type -> management.v1.AddRDSRequest - 0, // 9: management.v1.Service.RemoveService:input_type -> management.v1.RemoveServiceRequest - 10, // 10: management.v1.Service.AddExternal:output_type -> management.v1.AddExternalResponse - 11, // 11: management.v1.Service.AddHAProxy:output_type -> management.v1.AddHAProxyResponse - 12, // 12: management.v1.Service.AddMySQL:output_type -> management.v1.AddMySQLResponse - 13, // 13: management.v1.Service.AddMongoDB:output_type -> management.v1.AddMongoDBResponse - 14, // 14: management.v1.Service.AddPostgreSQL:output_type -> management.v1.AddPostgreSQLResponse - 15, // 15: management.v1.Service.AddProxySQL:output_type -> management.v1.AddProxySQLResponse - 16, // 16: management.v1.Service.DiscoverRDS:output_type -> management.v1.DiscoverRDSResponse - 17, // 17: management.v1.Service.AddRDS:output_type -> management.v1.AddRDSResponse - 18, // 18: management.v1.Service.RemoveService:output_type -> google.protobuf.Empty - 10, // [10:19] is the sub-list for method output_type - 1, // [1:10] is the sub-list for method input_type + 2, // 1: management.v1.Service.AddAnnotation:input_type -> management.v1.AddAnnotationRequest + 3, // 2: management.v1.Service.RegisterNode:input_type -> management.v1.RegisterNodeRequest + 4, // 3: management.v1.Service.AddExternal:input_type -> management.v1.AddExternalRequest + 5, // 4: management.v1.Service.AddHAProxy:input_type -> management.v1.AddHAProxyRequest + 6, // 5: management.v1.Service.AddMySQL:input_type -> management.v1.AddMySQLRequest + 7, // 6: management.v1.Service.AddMongoDB:input_type -> management.v1.AddMongoDBRequest + 8, // 7: management.v1.Service.AddPostgreSQL:input_type -> management.v1.AddPostgreSQLRequest + 9, // 8: management.v1.Service.AddProxySQL:input_type -> management.v1.AddProxySQLRequest + 10, // 9: management.v1.Service.DiscoverRDS:input_type -> management.v1.DiscoverRDSRequest + 11, // 10: management.v1.Service.AddRDS:input_type -> management.v1.AddRDSRequest + 0, // 11: management.v1.Service.RemoveService:input_type -> management.v1.RemoveServiceRequest + 12, // 12: management.v1.Service.AddAnnotation:output_type -> google.protobuf.Empty + 13, // 13: management.v1.Service.RegisterNode:output_type -> management.v1.RegisterNodeResponse + 14, // 14: management.v1.Service.AddExternal:output_type -> management.v1.AddExternalResponse + 15, // 15: management.v1.Service.AddHAProxy:output_type -> management.v1.AddHAProxyResponse + 16, // 16: management.v1.Service.AddMySQL:output_type -> management.v1.AddMySQLResponse + 17, // 17: management.v1.Service.AddMongoDB:output_type -> management.v1.AddMongoDBResponse + 18, // 18: management.v1.Service.AddPostgreSQL:output_type -> management.v1.AddPostgreSQLResponse + 19, // 19: management.v1.Service.AddProxySQL:output_type -> management.v1.AddProxySQLResponse + 20, // 20: management.v1.Service.DiscoverRDS:output_type -> management.v1.DiscoverRDSResponse + 21, // 21: management.v1.Service.AddRDS:output_type -> management.v1.AddRDSResponse + 12, // 22: management.v1.Service.RemoveService:output_type -> google.protobuf.Empty + 12, // [12:23] is the sub-list for method output_type + 1, // [1:12] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name 1, // [1:1] is the sub-list for extension extendee 0, // [0:1] is the sub-list for field type_name @@ -389,10 +421,12 @@ func file_management_v1_service_proto_init() { if File_management_v1_service_proto != nil { return } + file_management_v1_annotation_proto_init() file_management_v1_external_proto_init() file_management_v1_haproxy_proto_init() file_management_v1_mongodb_proto_init() file_management_v1_mysql_proto_init() + file_management_v1_node_proto_init() file_management_v1_postgresql_proto_init() file_management_v1_proxysql_proto_init() file_management_v1_rds_proto_init() diff --git a/api/management/v1/service.pb.gw.go b/api/management/v1/service.pb.gw.go index 7f0264a62cd..aa71495f4a7 100644 --- a/api/management/v1/service.pb.gw.go +++ b/api/management/v1/service.pb.gw.go @@ -33,6 +33,70 @@ var ( _ = metadata.Join ) +func request_Service_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddAnnotationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.AddAnnotation(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Service_AddAnnotation_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq AddAnnotationRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.AddAnnotation(ctx, &protoReq) + return msg, metadata, err +} + +func request_Service_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterNodeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RegisterNode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Service_RegisterNode_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq RegisterNodeRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RegisterNode(ctx, &protoReq) + return msg, metadata, err +} + func request_Service_AddExternal_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq AddExternalRequest var metadata runtime.ServerMetadata @@ -326,6 +390,54 @@ func local_request_Service_RemoveService_0(ctx context.Context, marshaler runtim // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { + mux.Handle("POST", pattern_Service_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.Service/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_AddAnnotation_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + mux.Handle("POST", pattern_Service_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/management.v1.Service/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Service_RegisterNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle("POST", pattern_Service_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -582,6 +694,48 @@ func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "ServiceClient" to call the correct interceptors. func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { + mux.Handle("POST", pattern_Service_AddAnnotation_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.Service/AddAnnotation", runtime.WithHTTPPathPattern("/v1/management/Annotations/Add")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_AddAnnotation_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_AddAnnotation_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + + mux.Handle("POST", pattern_Service_RegisterNode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/management.v1.Service/RegisterNode", runtime.WithHTTPPathPattern("/v1/management/Node/Register")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Service_RegisterNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + if err != nil { + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + return + } + + forward_Service_RegisterNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) + mux.Handle("POST", pattern_Service_AddExternal_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -775,6 +929,10 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( + pattern_Service_AddAnnotation_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Annotations", "Add"}, "")) + + pattern_Service_RegisterNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "Node", "Register"}, "")) + pattern_Service_AddExternal_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "External", "Add"}, "")) pattern_Service_AddHAProxy_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"v1", "management", "HAProxy", "Add"}, "")) @@ -795,6 +953,10 @@ var ( ) var ( + forward_Service_AddAnnotation_0 = runtime.ForwardResponseMessage + + forward_Service_RegisterNode_0 = runtime.ForwardResponseMessage + forward_Service_AddExternal_0 = runtime.ForwardResponseMessage forward_Service_AddHAProxy_0 = runtime.ForwardResponseMessage diff --git a/api/management/v1/service.proto b/api/management/v1/service.proto index 0153e9a9225..e4629057a71 100644 --- a/api/management/v1/service.proto +++ b/api/management/v1/service.proto @@ -6,10 +6,12 @@ import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "inventory/v1/nodes.proto"; import "inventory/v1/services.proto"; +import "management/v1/annotation.proto"; import "management/v1/external.proto"; import "management/v1/haproxy.proto"; import "management/v1/mongodb.proto"; import "management/v1/mysql.proto"; +import "management/v1/node.proto"; import "management/v1/postgresql.proto"; import "management/v1/proxysql.proto"; import "management/v1/rds.proto"; @@ -28,6 +30,28 @@ message RemoveServiceRequest { // Service service provides public methods for managing and querying Services. service Service { + // AddAnnotation adds an annotation. + rpc AddAnnotation(AddAnnotationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v1/management/Annotations/Add" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Add Annotation" + description: "Adds an annotation." + }; + } + // RegisterNode registers a new Node and pmm-agent. + rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) { + option (google.api.http) = { + post: "/v1/management/Node/Register" + body: "*" + }; + option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = { + summary: "Register Node" + description: "Registers a new Node and pmm-agent." + }; + } // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". diff --git a/api/management/v1/service_grpc.pb.go b/api/management/v1/service_grpc.pb.go index e7e010a7413..6058fee9fcd 100644 --- a/api/management/v1/service_grpc.pb.go +++ b/api/management/v1/service_grpc.pb.go @@ -21,6 +21,8 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( + Service_AddAnnotation_FullMethodName = "/management.v1.Service/AddAnnotation" + Service_RegisterNode_FullMethodName = "/management.v1.Service/RegisterNode" Service_AddExternal_FullMethodName = "/management.v1.Service/AddExternal" Service_AddHAProxy_FullMethodName = "/management.v1.Service/AddHAProxy" Service_AddMySQL_FullMethodName = "/management.v1.Service/AddMySQL" @@ -36,6 +38,10 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ServiceClient interface { + // AddAnnotation adds an annotation. + AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) + // RegisterNode registers a new Node and pmm-agent. + RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". @@ -78,6 +84,24 @@ func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient { return &serviceClient{cc} } +func (c *serviceClient) AddAnnotation(ctx context.Context, in *AddAnnotationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { + out := new(emptypb.Empty) + err := c.cc.Invoke(ctx, Service_AddAnnotation_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *serviceClient) RegisterNode(ctx context.Context, in *RegisterNodeRequest, opts ...grpc.CallOption) (*RegisterNodeResponse, error) { + out := new(RegisterNodeResponse) + err := c.cc.Invoke(ctx, Service_RegisterNode_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *serviceClient) AddExternal(ctx context.Context, in *AddExternalRequest, opts ...grpc.CallOption) (*AddExternalResponse, error) { out := new(AddExternalResponse) err := c.cc.Invoke(ctx, Service_AddExternal_FullMethodName, in, out, opts...) @@ -163,6 +187,10 @@ func (c *serviceClient) RemoveService(ctx context.Context, in *RemoveServiceRequ // All implementations must embed UnimplementedServiceServer // for forward compatibility type ServiceServer interface { + // AddAnnotation adds an annotation. + AddAnnotation(context.Context, *AddAnnotationRequest) (*emptypb.Empty, error) + // RegisterNode registers a new Node and pmm-agent. + RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) // AddExternal adds external service and adds external exporter. // It automatically adds a service to inventory, which is running on provided "node_id", // then adds an "external exporter" agent to inventory, which is running on provided "runs_on_node_id". @@ -201,6 +229,14 @@ type ServiceServer interface { // UnimplementedServiceServer must be embedded to have forward compatible implementations. type UnimplementedServiceServer struct{} +func (UnimplementedServiceServer) AddAnnotation(context.Context, *AddAnnotationRequest) (*emptypb.Empty, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddAnnotation not implemented") +} + +func (UnimplementedServiceServer) RegisterNode(context.Context, *RegisterNodeRequest) (*RegisterNodeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterNode not implemented") +} + func (UnimplementedServiceServer) AddExternal(context.Context, *AddExternalRequest) (*AddExternalResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddExternal not implemented") } @@ -249,6 +285,42 @@ func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer) { s.RegisterService(&Service_ServiceDesc, srv) } +func _Service_AddAnnotation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddAnnotationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).AddAnnotation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Service_AddAnnotation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).AddAnnotation(ctx, req.(*AddAnnotationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Service_RegisterNode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RegisterNodeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ServiceServer).RegisterNode(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Service_RegisterNode_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ServiceServer).RegisterNode(ctx, req.(*RegisterNodeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Service_AddExternal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AddExternalRequest) if err := dec(in); err != nil { @@ -418,6 +490,14 @@ var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "management.v1.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "AddAnnotation", + Handler: _Service_AddAnnotation_Handler, + }, + { + MethodName: "RegisterNode", + Handler: _Service_RegisterNode_Handler, + }, { MethodName: "AddExternal", Handler: _Service_AddExternal_Handler, diff --git a/api/nginx/nginx.conf b/api/nginx/nginx.conf index 730479d2a97..63d5765d7f4 100644 --- a/api/nginx/nginx.conf +++ b/api/nginx/nginx.conf @@ -1,5 +1,5 @@ # This file is for serving Swagger docs during development. -# For pmm-managed work, please use devcontainer. +# For pmm-managed, please use devcontainer. daemon off; diff --git a/api/server/v1/json/client/pmm_server_api_client.go b/api/server/v1/json/client/pmm_server_api_client.go index 657962b8e47..46b708ab6e9 100644 --- a/api/server/v1/json/client/pmm_server_api_client.go +++ b/api/server/v1/json/client/pmm_server_api_client.go @@ -10,7 +10,6 @@ import ( httptransport "github.com/go-openapi/runtime/client" "github.com/go-openapi/strfmt" - serverops "github.com/percona/pmm/api/server/v1/json/client/server" "github.com/percona/pmm/api/server/v1/json/client/server_service" ) @@ -56,7 +55,6 @@ func New(transport runtime.ClientTransport, formats strfmt.Registry) *PMMServerA cli := new(PMMServerAPI) cli.Transport = transport - cli.Server = serverops.New(transport, formats) cli.ServerService = server_service.New(transport, formats) return cli } @@ -102,8 +100,6 @@ func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig { // PMMServerAPI is a client for PMM server API type PMMServerAPI struct { - Server serverops.ClientService - ServerService server_service.ClientService Transport runtime.ClientTransport @@ -112,6 +108,5 @@ type PMMServerAPI struct { // SetTransport changes the transport on the client and all its subresources func (c *PMMServerAPI) SetTransport(transport runtime.ClientTransport) { c.Transport = transport - c.Server.SetTransport(transport) c.ServerService.SetTransport(transport) } diff --git a/api/server/v1/json/client/server/server_client.go b/api/server/v1/json/client/server/server_client.go deleted file mode 100644 index 3f42053606d..00000000000 --- a/api/server/v1/json/client/server/server_client.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package server - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - - "github.com/go-openapi/runtime" - "github.com/go-openapi/strfmt" -) - -// New creates a new server API client. -func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService { - return &Client{transport: transport, formats: formats} -} - -/* -Client for server API -*/ -type Client struct { - transport runtime.ClientTransport - formats strfmt.Registry -} - -// ClientOption is the option for Client methods -type ClientOption func(*runtime.ClientOperation) - -// ClientService is the interface for Client methods -type ClientService interface { - Logs(params *LogsParams, writer io.Writer, opts ...ClientOption) (*LogsOK, error) - - SetTransport(transport runtime.ClientTransport) -} - -/* -Logs logs - -Returns the PMM Server logs. -*/ -func (a *Client) Logs(params *LogsParams, writer io.Writer, opts ...ClientOption) (*LogsOK, error) { - // TODO: Validate the params before sending - if params == nil { - params = NewLogsParams() - } - op := &runtime.ClientOperation{ - ID: "Logs", - Method: "GET", - PathPattern: "/logs.zip", - ProducesMediaTypes: []string{"application/zip"}, - ConsumesMediaTypes: []string{"application/json"}, - Schemes: []string{"http", "https"}, - Params: params, - Reader: &LogsReader{formats: a.formats, writer: writer}, - Context: params.Context, - Client: params.HTTPClient, - } - for _, opt := range opts { - opt(op) - } - - result, err := a.transport.Submit(op) - if err != nil { - return nil, err - } - success, ok := result.(*LogsOK) - if ok { - return success, nil - } - // unexpected success response - unexpectedSuccess := result.(*LogsDefault) - return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) -} - -// SetTransport changes the transport on the client -func (a *Client) SetTransport(transport runtime.ClientTransport) { - a.transport = transport -} diff --git a/api/server/v1/json/client/server/logs_parameters.go b/api/server/v1/json/client/server_service/logs_parameters.go similarity index 99% rename from api/server/v1/json/client/server/logs_parameters.go rename to api/server/v1/json/client/server_service/logs_parameters.go index 2463907eae1..eac190ca90c 100644 --- a/api/server/v1/json/client/server/logs_parameters.go +++ b/api/server/v1/json/client/server_service/logs_parameters.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package server +package server_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/server/v1/json/client/server/logs_responses.go b/api/server/v1/json/client/server_service/logs_responses.go similarity index 99% rename from api/server/v1/json/client/server/logs_responses.go rename to api/server/v1/json/client/server_service/logs_responses.go index ef66827e2e3..184f633ddd4 100644 --- a/api/server/v1/json/client/server/logs_responses.go +++ b/api/server/v1/json/client/server_service/logs_responses.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package server +package server_service // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command diff --git a/api/server/v1/json/client/server_service/server_service_client.go b/api/server/v1/json/client/server_service/server_service_client.go index 9278a2ac687..a843debece7 100644 --- a/api/server/v1/json/client/server_service/server_service_client.go +++ b/api/server/v1/json/client/server_service/server_service_client.go @@ -6,6 +6,8 @@ package server_service // Editing this file might prove futile when you re-run the swagger generate command import ( + "io" + "github.com/go-openapi/runtime" "github.com/go-openapi/strfmt" ) @@ -38,6 +40,8 @@ type ClientService interface { LeaderHealthCheck(params *LeaderHealthCheckParams, opts ...ClientOption) (*LeaderHealthCheckOK, error) + Logs(params *LogsParams, writer io.Writer, opts ...ClientOption) (*LogsOK, error) + Readiness(params *ReadinessParams, opts ...ClientOption) (*ReadinessOK, error) StartUpdate(params *StartUpdateParams, opts ...ClientOption) (*StartUpdateOK, error) @@ -244,6 +248,45 @@ func (a *Client) LeaderHealthCheck(params *LeaderHealthCheckParams, opts ...Clie return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) } +/* +Logs logs + +Returns the PMM Server logs. +*/ +func (a *Client) Logs(params *LogsParams, writer io.Writer, opts ...ClientOption) (*LogsOK, error) { + // TODO: Validate the params before sending + if params == nil { + params = NewLogsParams() + } + op := &runtime.ClientOperation{ + ID: "Logs", + Method: "GET", + PathPattern: "/logs.zip", + ProducesMediaTypes: []string{"application/zip"}, + ConsumesMediaTypes: []string{"application/json"}, + Schemes: []string{"http", "https"}, + Params: params, + Reader: &LogsReader{formats: a.formats, writer: writer}, + Context: params.Context, + Client: params.HTTPClient, + } + for _, opt := range opts { + opt(op) + } + + result, err := a.transport.Submit(op) + if err != nil { + return nil, err + } + success, ok := result.(*LogsOK) + if ok { + return success, nil + } + // unexpected success response + unexpectedSuccess := result.(*LogsDefault) + return nil, runtime.NewAPIError("unexpected success response: content available as default response in error", unexpectedSuccess, unexpectedSuccess.Code()) +} + /* Readiness checks server readiness diff --git a/api/server/v1/json/header.json b/api/server/v1/json/header.json index 3dbc7c393af..f98148cb939 100644 --- a/api/server/v1/json/header.json +++ b/api/server/v1/json/header.json @@ -12,7 +12,7 @@ "/logs.zip": { "get": { "tags": [ - "Server" + "ServerService" ], "description": "Returns the PMM Server logs.", "summary": "Logs", diff --git a/api/server/v1/json/v1.json b/api/server/v1/json/v1.json index c1caff5570f..bc6e1b30ec3 100644 --- a/api/server/v1/json/v1.json +++ b/api/server/v1/json/v1.json @@ -22,7 +22,7 @@ "application/zip" ], "tags": [ - "Server" + "ServerService" ], "summary": "Logs", "operationId": "Logs", diff --git a/api/swagger/swagger-dev.json b/api/swagger/swagger-dev.json index fa419e48e12..c593cc1c34a 100644 --- a/api/swagger/swagger-dev.json +++ b/api/swagger/swagger-dev.json @@ -23,7 +23,7 @@ "application/zip" ], "tags": [ - "Server" + "ServerService" ], "summary": "Logs", "operationId": "Logs", @@ -17042,9 +17042,9 @@ }, "/v1/management/Annotations/Add": { "post": { - "description": "Adds annotation.", + "description": "Adds an annotation.", "tags": [ - "AnnotationService" + "Service" ], "summary": "Add Annotation", "operationId": "AddAnnotation", @@ -19961,7 +19961,7 @@ "post": { "description": "Registers a new Node and pmm-agent.", "tags": [ - "NodeService" + "Service" ], "summary": "Register Node", "operationId": "RegisterNode", @@ -27772,12 +27772,6 @@ { "name": "ServicesService" }, - { - "name": "AnnotationService" - }, - { - "name": "NodeService" - }, { "name": "Service" }, diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index 920f4fc77d7..ca7b3ed99d8 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -22,7 +22,7 @@ "application/zip" ], "tags": [ - "Server" + "ServerService" ], "summary": "Logs", "operationId": "Logs", @@ -4997,9 +4997,9 @@ }, "/v1/management/Annotations/Add": { "post": { - "description": "Adds annotation.", + "description": "Adds an annotation.", "tags": [ - "AnnotationService" + "Service" ], "summary": "Add Annotation", "operationId": "AddAnnotation", @@ -7123,7 +7123,7 @@ "post": { "description": "Registers a new Node and pmm-agent.", "tags": [ - "NodeService" + "Service" ], "summary": "Register Node", "operationId": "RegisterNode", @@ -13245,12 +13245,6 @@ { "name": "UserService" }, - { - "name": "AnnotationService" - }, - { - "name": "NodeService" - }, { "name": "Service" }, diff --git a/descriptor.bin b/descriptor.bin index f9cd4e11bb76ff765f0045ece9567399b47f7fc7..12c52451e6b97dd1d2b0e5d9cf554bef8dbb79fc 100644 GIT binary patch delta 5507 zcmYjVeQ=b;8NYpZ@7?$I^0~QOE|*Jkm&@mwgdic16lg**W@4lfBc(_wL_nmNP@oho zC6va-jzt~(Sp1+ZmZ~VCrPhc7ilfZvj5=+nqwREBZKu=zQ>Sz~?M$g{f4lF#Z}{(? z=l%Vj{q3{+>^^({c%|*~OKk_H$+R;~r`dFL+I^AV@d*9Ruuvag^s?&lNB9&uF`Idm zujXWd+I5WQB*~IiZ&m!ZU1QsKUAOs;8#nJ(r;qV>$#Hey3H~~vYT!q_moW9w`?OXa z`4O)qQMEDawG&tU{_C`ha8s- z+4+LYXe9E4y5Wp>m0Eg}7gyhWlE)X{MTiiBvIvpX^OB-SFczT^$zo0sg%#BnzQsgR zvSPDIkU8hwfvM&is9C4&22pyIKrIh(>x*Vu?evJ$5{h)94fLByPiNOZ(9b@3^l z?`l zU5P8ka==Q&t3#FpRw7d?S}Y4@Qho3=Z|h24!J=R#U0IM67LY z5z8zKpX(KQhWB^XU%}Fus*lYNSvpho-3#qHI}S3HQ!hWm3thQTJ-lG$;&Wr^Oyw|^ zpD9P1c_p7krt(*?bf)t0hHxyMseDtjxXLO-rkd1Op5-0=O{^$Hu_)Zd6>~PCG$oqm zY(!~lZ409S-l9H4l&%&Q3sF(9T13s94OUBCz1>HS<4W457M|oiBW+h?#|5h`Ru{5d zu-bABc9p1P?ausQmGtb|F@j$qRIgH}u8_ta{D!E`FfMFhJHtAGjkuktlSL*IRHwH~ z9ea-Vc6NnxfLFUkpawQrT~O1a>s61}t-Mpbta!wk@Yo59)yt=NMv3o|vUG(7>9t;*tb!~p0!E*@(8H45 z=Gbs3Cf*my(JAV~wCy(y#-uw86N|q@4L#526_$i@bdf9x<>(Sw0y*6VkHE{+vFCYD zVVP56BkDz7RvO5U0>2FS27|`}_bc)OZ!GjX`ar^==IG_^&ol=X@cnHCY$QDsF6nZ0 zVJC0v&vHU-}hXRx(k;|NKI)c-EiR(0|xToi`F z)C-V?VhKwUAPrSj<2=-Z$0Z$BAN_>4b`FR5IPk+UY4LI3hbyZ@o52@JI^xu&GwQ1y zURsTw=Ea2(hg)b7h$Egp$aIE_Kpd&5wK*-8bfua(%{vM!LwqstE4{SE7X!btwq6XI zfl4GDRlhsUN7_e2VI{zi#)8!-0e&=<7Ap+CRMJ&Wt=jK;{hg)A*{YCL3f8J{=aquB zDxDFZHLNm8$JCoY#JF3wF3CH)%vK>@e`7+Q|o_*`0K*>3Epkax(0Jqzk3-Ko}`;jQy_h9z1L{7x?ztRDEC80-=;qh%%C<8-C}s6HO@ z>eRbu_|Mz-gv>0Md%S{Gkp**4$2@yf-BXuU{ZI6oCa|23@fAooI6n=eud{H-KP${$`{#Pm_@%$cVLrb2h`|Up6xh5 zFi5c}*(Nl<2M8+On&=%45S09&8KzmXgX-v6KGboLU`9Ts8I*$rVUPg^9TL5M28D*hRN3*&(&^JRcl7G)F-z!43rz z1_qQvq(Wan4s)b?KZ!hmXGa{*4$Z%x;0mZmG~L~@!|J!^d2Z=pf*Vke2&W4#L2qtN zP!5xHHZT$VFv&NHF9^qtNcUlaM^4{se0B0+;w8lOg1Ndsa*q(_7@_Hq&~+anG-TD^-U(-M+keIxS~SD^mq2cJ7*h0=N#%NVLt?_ zTyTRr>`B*mjk`N`PVSyuAZECzyM5!t##=Yf-u^mYM8xnpCNRTDq(Xh`VYi^(`+_K) zef$mnDVcrfE&lZ!ooNxOY?D_#+xlld?uy|9X&*o8c-^_Uzyr)i&r|k?Kv+^ijSrQ zzj5=fGdCyCAVpqWk?k?SwCu>^lVWnI0WZ^2Y#jx-R_t-1mR`r*=qI1o!?!c>22maB7 z4!K6%{#dkIjqc@44Spw@Ob3mM?u=_v)ncvLq0#!tQ|jhdy|r!iUa9WK^-hs2hc{n3 zpG9uxQk~ssGo5*hr|NUAIfgY{zswS?TCKJaKDS^<{q3yxxuSj(4<*v>EL7(&^CeTd zuWxrvHwQ2QwY|bz_Syoqef~9e*ApgL2kX+?S8sCSZ*t$|*M&yRXWcI9LT_-wu)%%D zJ&qX|Wz_2|r|JI?J(Fwp?%u3^@v3)uO22A)UDL&ar(c%6(%hZef{5OE%dH3pL-etw zfe6QnFfLz&Ml53kfe6QlFpgj2T0%e+@1XN}ntsQK7#bMesYcFuZ%^qb$RJAIPaB1Z zK~%i8AYu>&?+-yS#IQ~F^u=9*^1S$1Zq(&FeSVWVowch?op_wSI0-VppGj z)B9Y>zx+7(3u~Wq7g3kr@curfA7lH%EyY3J7j7vI@;+>-5>p_Y$>=w6<+?(ejm`Zj zSf77*1LJ;+;KtPR)O(xjSp=>gv#(&!5a)i}BF)(qYSWuu)0Ce8yzbZxffj3`3T6nz zSQGnkhCq!!l82G*Cb&a`%f$2L1kO3s_XxW$)Z-aF)`e#(B*tXa#Xb3$B5!$FD+Lck zT!(Iv9Xkdohe>fdFwJGzw7^QiOVfRTu!ln_F)PJ7eJL8H2zxY?5;Ib)3&$U%2uL|f zoF~=eZ+VL*@Ze-e2^Q8*fPjdj1S@Mzh&W0X3|SEZ;lEGVu~3AtBCOLFp;1o|_Tx~5 SFe0>TX5gYXJ8&_!K>Z)Otg>1F delta 6038 zcmZu#3v67+b=~=J=j|-Nk4tj*@wdAqSLBL6i4tX5R47{3k1{1otV}Da%&-)r5c;g8 zr6t>}vUMayapG34nq-=!PAbP0ZP~73M;85&65BE0qDf#IMT!O}ngj;wqCg7>C|VS4 z>YkbR-jFH^0m9yS=iE8>&Ye3m{I45b|Mq6rADkoS=s9+dpDQ~Ty)GX67X4&Q&3{Y$ zIeCAv>D%G~L55ZFvdFZsH0gBq#%GJabF{c~=CSdaxl!(rYKs49HB(nEi=UILYVKL_ zHsR`)=d34X>enBzX7$wfMIDK%J&jH`5$ac`SwC@9^`k81fXb@5cSHb=<<~M^kukxh5dvb3z?i5QF^*D~C`$ zMIzR0Sp=*^IwNxd3o+HJj}}B{fBmw#C|LFJlx0z{>YJM7ihu<(sk)vQUH!>rEJVkW zanG`thBdd?@VLu7^`+-U+kM_L76;2)78eK0LtK8ssLPvaPna;Rt63&xztKT;!dlhs z=f&#&RvR-$fohGl1v+5EV{2}O{7k^Y=ZqSEL2N2zma%lEGO<;br8AXTvo@$diu%j` zKlMj-{bgQ(sq|Rkxccb}BHQ0?lYy^bx5t;H>%_N1x}SKe z&75k!ip1xZv2@~d@vN1u6QAqI$(2FCNPMR{byf6i>g44X#mg{UQM+WrOJ|~E$%dEC z&MxZ(@VxpMUi$MqW>IBe*2l zvQEHaV6Ix`Nms@lHXLc&Us9&4a6rBLqR6ivupwd;tO45yU?ao^cDy9Yd)L~m;-mg5!~DPoc`fp@LU$28;d*uUCDD~%PaVHqn(5ZZYC;S6^@%#U z%HZK_gZkT-#6W2SjRpuk!v@h5TEK5;O-s+<5#L6d^eWOLhi8t@rRN@dc&1kdNQyGp zXlKd^0-{56qeFJoBl`w{BlUI`-nHW!xOi#}gi|WHcF4V=Bh0G6IA9{UI&V`lnX7ewshsO7j$I8W!uy{Cq-AU0B0Mm z3s3@_ZS`%T1= zkaz8*;R3`E54Jn)k zddj%VcGIN#=*zrmjh}=#=Gtw!ad3CX+<+SgcXwTb>@wVPm+et6|3IwF@1Y_f<7jm<#{D_l0N=qsY9d)(qHfFF0f0AB(8cyp^9HU2AIwvRTde<04*-b$$2 zXH`{#wJ#PfK_yuGlAgTRu&P`(p+0y;Y|T$td=>B$w%n?KpYWRGu)$ZmY`+?QRgCoR zr`3UuYT)k23t-Bf!57@e^0r5a<22De! z+I87M75kyc=MP$8F7O9q;j}p1*}>X6dB4Hex@=M%{Gr&}J87$@7Whd~9|)@jelpb< z_)oZOiZ*(U>hd%$6yJME#Cj9R+LWCv0rHg1S_0%LWbH09S)I$KRnK*CcYd0NTe}YU z=|s34>VTi_S}EHNzTRas>W{CBTzX z@P|b>TLbWi>yts2lP;T8$rN9y3a_Da%vw?sq*>7tWFQIBY^F`#Z6-;%?1=jQYhoyW z#Nt!H9}(#Qp920!TSp+ubJ;N!y8%(hEZzhDm;Ki@Lml_o|1#UdC5PXcJcCgw0qJ$R}dqZfOGf1a^zxrkY(= zq$%~zVV+d?FACXRw6tc>inaqcgH}Z1+Dr~wT=od9Qy)mszPl*m`A00R1++(EVe4rD z?GZN-^nq5FomPLdC_4L2+r8Ne{Anj#pH|>cW18E<%#(K6Jni>BRv&G4TGaN}#Yf%q zmYD`~-pL0^NrO4x(-(B8jLXi@YIS>_=hWm0C)%4qO3v7PW?qI!t|uJGChK%1SYQMPY@iU zfr)#_6C_a|q@~^EXNmgz2c71U|Ghn`M`&XJZwLDTv1@+3jJe98(?o+QZEMoDqZMxP>)Kl$cO zF_d_UI4QXee)J=SKTU8uSg*)-^p;=U#AD@)H${C9Mt$|>tpX6LQoDr-w@(vX40Kn< zo5bap)H^rD*6o*;D7cUCOJTskfO3h{>Vt}M>PEjoB7aJVj7!Ef{~HA7L@T`MHvm^^ z_brjxs0a>8JtGFOG>YH_6PTbV;-y0q&J}5EmlKjkBX0CNB(k7hz9k-TzeAja9Fsh% zFImxN2)&}}ekATIJwu{qDfBp=B+rnVtoEf%_JrQW(@F$Bp_!zZZS@WMQr_AYYfV<=E8mslzjizy6U}N0O^wC9-DZ z`0>Kr)EsJOeCFh-+36Yg&(vElIJ>-EmqxN~<;bB!=_QC)4ZEmvSDm$T^o^)QS|X9` zV&-izNKfWF&Y}Vw!_As#=Z{b1Sq*Jskkvye`g4_er z%+pci-X_ruEKa;DPG{&Z^NSyTEPg*)z50EW&aT3tnIL8Az*Xl>Hu{w&_4MbRp~bKL zvv{w(O5W$EV>~iRyiI9!`+zf?vLTP7`JszwnJ(W)ANuAS&d`jGW?$6Yh=OSL)tWOh zh-TlaEz6`n!1w>(V9d}`FrVcI?+iu{Ebjgf@psqgr8TN+!TFy0rv;~|{%XOgQoA2= zs?{e8`0vwGPNjPFdFQ|5@6<^V1i4uEqVtA~{bx!Fw=5F5sHT1<235rkr(XT^6BZ{O zs_%wVS89_nNg1xE<&jSF6F1L_NY4Dk4YD$lF+XuRtcu)ae&ViIjZul6iCnl5kLWCM zoebA$l1--F;Ej@?-Ck8XP;=)i0{au6_4S}#-wic2(YPWwBXk`k@+;-%jU#+&P`|z5 zd?DXpPcQv=X|RW$ejGKRyZ8qKN-Cu;E;^s-OIf^rrljm`N54!`$&~!8S?{vu$VEcD zv9ucbg>#>07rfc2l3%0Yif3qk@!A`XAZ=P}CTi~A!J21WbL0nWp6RuD6_Dl(g<%bP~Vb38eO-kpvc0^`ejX)j&|%eSCFTFU0R6{?HO)fDeZC zLO41IHv^Y^)#y`0bPMy&QoT3F9vk1Yc;==4OEyRUxh}D@OwiQ)Tl56%2$E*I7-Kv_Z447;rQXj|G9-cmh`i4)aHUg z#i-4Negux%TrkYBlkW;uut0?w@>OWWZoW5E!Hfzs@LPWo@O^@Qj(Pt|bS~~M6z9~r zA3Oh2(r?KL+m3M1unF6a^viO>wj&M~5Ap+{2p)(qL%s-&_+363ir_|s8TfZ!1Wx!v z^ceF#@kN|0JgRQL?fhd&KTr?ZiYkMML$;#ybM;W)J;8dEVTu|4g-}FUAi@m!A~a%_ z9}Pv684+dx4`i$_4uArElzF-Iy|cyX0&XFD)kE((&0T&G>Q`^UN{K>B!AjA8qbZ=c zzy7wfxjb*Yp|Lzp&#F(~b3nQC8w#!Xa60`n%A<1S8n%@Q5=Lccwog%