Skip to content

Commit

Permalink
renamed API function
Browse files Browse the repository at this point in the history
  • Loading branch information
lubedacht committed Jan 15, 2024
1 parent 78709a8 commit 816ba3a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion internal/ionoscloud/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ type Client interface {
// GetLAN returns the LAN that matches lanID in the specified data center.
GetLAN(ctx context.Context, dataCenterID, lanID string) (*ionoscloud.Lan, error)
// DestroyLAN deletes the LAN that matches the provided lanID in the specified data center.
DestroyLAN(ctx context.Context, dataCenterID, lanID string) (string, error)
DeleteLAN(ctx context.Context, dataCenterID, lanID string) (string, error)
// CheckRequestStatus checks the status of a provided request identified by requestID
CheckRequestStatus(ctx context.Context, requestID string) (*ionoscloud.RequestStatus, error)
// ListVolumes returns a list of volumes in a specified data center.
Expand Down
4 changes: 2 additions & 2 deletions internal/ionoscloud/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,8 @@ func (c *IonosCloudClient) GetLAN(ctx context.Context, dataCenterID, lanID strin
return &lan, nil
}

// DestroyLAN deletes the LAN that matches the provided lanID in the specified data center.
func (c *IonosCloudClient) DestroyLAN(ctx context.Context, dataCenterID, lanID string) (string, error) {
// DeleteLAN deletes the LAN that matches the provided lanID in the specified data center.
func (c *IonosCloudClient) DeleteLAN(ctx context.Context, dataCenterID, lanID string) (string, error) {
if dataCenterID == "" {
return "", errDataCenterIDIsEmpty
}
Expand Down
20 changes: 10 additions & 10 deletions internal/ionoscloud/clienttest/mock_client.go

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

2 changes: 1 addition & 1 deletion internal/service/cloud/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (s *Service) createLAN() error {
func (s *Service) deleteLAN(lanID string) error {
log := s.scope.Logger.WithName("DeleteLAN")

requestPath, err := s.API().DestroyLAN(s.ctx, s.DataCenterID(), lanID)
requestPath, err := s.API().DeleteLAN(s.ctx, s.DataCenterID(), lanID)
if err != nil {
return fmt.Errorf("unable to request LAN deletion in data center: %w", err)
}
Expand Down

0 comments on commit 816ba3a

Please sign in to comment.