Skip to content

Commit

Permalink
PMM-13054 remove redundant functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ademidoff committed Jul 10, 2024
1 parent f0930b7 commit a999cc6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions admin/commands/management/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (

"github.com/percona/pmm/admin/agentlocal"
"github.com/percona/pmm/admin/commands"
"github.com/percona/pmm/admin/helpers"
inventoryClient "github.com/percona/pmm/api/inventory/v1/json/client"
services "github.com/percona/pmm/api/inventory/v1/json/client/services_service"
"github.com/percona/pmm/api/management/v1/json/client"
Expand Down Expand Up @@ -96,7 +95,7 @@ func (cmd *RemoveCommand) RunCmd() (commands.Result, error) {
}

params := &mservice.RemoveServiceParams{
ServiceID: helpers.StripServiceIDPrefix(serviceID),
ServiceID: serviceID,
ServiceType: cmd.serviceType(),
Context: commands.Ctx,
}
Expand Down
7 changes: 0 additions & 7 deletions admin/helpers/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package helpers

import (
"fmt"
"strings"

"github.com/pkg/errors"

Expand All @@ -31,7 +30,6 @@ var errNoNode = errors.New("no node available")
// HAProxyMinPMMServerVersion contains minimum version for running HAProxy.
const (
haProxyMinPMMServerVersion = "2.15.0"
serviceIDPrefix = "/service_id"
)

// ServerVersionLessThan return if provided version is lower than server version.
Expand Down Expand Up @@ -96,8 +94,3 @@ func IsOnPmmServer() (bool, error) {

return status.NodeID == "pmm-server", nil
}

// StripServiceIDPrefix removes the prefix from the service ID if present.
func StripServiceIDPrefix(serviceID string) string {
return strings.TrimPrefix(serviceID, serviceIDPrefix)
}

0 comments on commit a999cc6

Please sign in to comment.