Skip to content

Commit

Permalink
include feedback from pr review
Browse files Browse the repository at this point in the history
fix up typos
  • Loading branch information
ibrokethecloud committed Aug 2, 2024
1 parent fdf9e14 commit 1fea3d1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pkg/controllers/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func Register(ctx context.Context, restConfig *rest.Config) error {

scCache := storageFactory.Storage().V1().StorageClass().Cache()

sc.RegisterVmareController(ctx, migrationFactory.Migration().V1beta1().VmwareSource(), coreFactory.Core().V1().Secret())
sc.RegisterVmwareController(ctx, migrationFactory.Migration().V1beta1().VmwareSource(), coreFactory.Core().V1().Secret())
sc.RegisterOpenstackController(ctx, migrationFactory.Migration().V1beta1().OpenstackSource(), coreFactory.Core().V1().Secret())

sc.RegisterVMImportController(ctx, migrationFactory.Migration().V1beta1().VmwareSource(), migrationFactory.Migration().V1beta1().OpenstackSource(),
Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/migration/virtualmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
)

const (
vmiAnnotation = "migaration.harvesterhci.io/virtualmachineimport"
vmiAnnotation = "migration.harvesterhci.io/virtualmachineimport"
imageDisplayName = "harvesterhci.io/imageDisplayName"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/controllers/migration/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type vmwareHandler struct {
secret corecontrollers.SecretController
}

func RegisterVmareController(ctx context.Context, vc migrationController.VmwareSourceController, secret corecontrollers.SecretController) {
func RegisterVmwareController(ctx context.Context, vc migrationController.VmwareSourceController, secret corecontrollers.SecretController) {
vHandler := &vmwareHandler{
ctx: ctx,
vmware: vc,
Expand Down
6 changes: 1 addition & 5 deletions pkg/source/openstack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,6 @@ func (c *Client) checkOrGetUUID(input string) (string, error) {
return "", fmt.Errorf("error extracting servers in checkorgetuuid:%v", err)
}

if len(allServers) == 0 {
return allServers[0].ID, nil
}

// api could return multiple servers matching the pattern of name
// eg server names test and testvm will match name search "test"
// in which case we need to filter on actual name
Expand Down Expand Up @@ -623,7 +619,7 @@ func (c *Client) ImageFirmwareSettings(instance *servers.Server) (bool, bool, bo
if ok && firmwareType.(string) == "uefi" {
uefiType = true
}
logrus.Info(imageInfo.Properties)
logrus.Debugf("found image firmware settings %v", imageInfo.Properties)
if _, ok := imageInfo.Properties["hw_tpm_model"]; ok {
tpmEnabled = true
}
Expand Down

0 comments on commit 1fea3d1

Please sign in to comment.