Skip to content

Commit

Permalink
feat(cloud-provisioning): Updates DeleteMachineIdentity function
Browse files Browse the repository at this point in the history
Updated DeleteMachineIdentity function to use string as parameter instead of UUID
  • Loading branch information
rvelaVenafi committed May 31, 2024
1 parent 5f41ec7 commit 9e254e9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/venafi/cloud/cloudproviders.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,13 @@ func (c *Connector) GetMachineIdentity(request domain.GetCloudMachineIdentityReq
return machineIdentity, nil
}

func (c *Connector) DeleteMachineIdentity(id uuid.UUID) (bool, error) {
if id == uuid.Nil {
return false, fmt.Errorf("invalid machine identity ID: %s", id)
func (c *Connector) DeleteMachineIdentity(machineIdentityID string) (bool, error) {
if machineIdentityID == "" {
return false, fmt.Errorf("machine identity ID cannot be nil")
}
deleted, err := c.cloudProvidersClient.DeleteMachineIdentity(context.Background(), id.String())
deleted, err := c.cloudProvidersClient.DeleteMachineIdentity(context.Background(), machineIdentityID)
if err != nil {
return false, fmt.Errorf("failed to delete machine identity with ID %s: %w", id, err)
return false, fmt.Errorf("failed to delete machine identity with ID %s: %w", machineIdentityID, err)
}
return deleted, nil
}
Expand Down

0 comments on commit 9e254e9

Please sign in to comment.