VSphere: fix VSphere import typo
@@ -5,7 +5,7 @@ import (
"fmt"
machinev1 "github.com/openshift/machine-api-operator/pkg/apis/machine/v1beta1"
- apivshpere "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1alpha1"
+ apivsphere "github.com/openshift/machine-api-operator/pkg/apis/vsphereprovider/v1alpha1"
machineapierros "github.com/openshift/machine-api-operator/pkg/controller/machine"
"github.com/openshift/machine-api-operator/pkg/controller/vsphere/session"
"github.com/pkg/errors"
@@ -43,8 +43,8 @@ type machineScope struct {
vSphereConfig *vSphereConfig
// machine resource
machine *machinev1.Machine
- providerSpec *apivshpere.VSphereMachineProviderSpec
- providerStatus *apivshpere.VSphereMachineProviderStatus
+ providerSpec *apivsphere.VSphereMachineProviderSpec
+ providerStatus *apivsphere.VSphereMachineProviderStatus
machineToBePatched runtimeclient.Patch
}
@@ -60,12 +60,12 @@ func newMachineScope(params machineScopeParams) (*machineScope, error) {
klog.Errorf("Failed to fetch vSphere config: %v", err)
}
- providerSpec, err := apivshpere.ProviderSpecFromRawExtension(params.machine.Spec.ProviderSpec.Value)
+ providerSpec, err := apivsphere.ProviderSpecFromRawExtension(params.machine.Spec.ProviderSpec.Value)
if err != nil {
return nil, machineapierros.InvalidMachineConfiguration("failed to get machine config: %v", err)
}
- providerStatus, err := apivshpere.ProviderStatusFromRawExtension(params.machine.Status.ProviderStatus)
+ providerStatus, err := apivsphere.ProviderStatusFromRawExtension(params.machine.Status.ProviderStatus)
if err != nil {
return nil, machineapierros.InvalidMachineConfiguration("failed to get machine provider status: %v", err.Error())
}
@@ -101,7 +101,7 @@ func newMachineScope(params machineScopeParams) (*machineScope, error) {
func (s *machineScope) PatchMachine() error {
klog.V(3).Infof("%v: patching machine", s.machine.GetName())
- providerStatus, err := apivshpere.RawExtensionFromProviderStatus(s.providerStatus)
+ providerStatus, err := apivsphere.RawExtensionFromProviderStatus(s.providerStatus)
if err != nil {
return machineapierros.InvalidMachineConfiguration("failed to get machine provider status: %v", err.Error())
}
@@ -166,7 +166,7 @@ func (s *machineScope) GetUserData() ([]byte, error) {
//data:
// user: base64 string
// password: base64 string
-func getCredentialsSecret(client runtimeclient.Client, namespace string, spec apivshpere.VSphereMachineProviderSpec) (string, string, error) {
+func getCredentialsSecret(client runtimeclient.Client, namespace string, spec apivsphere.VSphereMachineProviderSpec) (string, string, error) {
if spec.CredentialsSecret == nil {
return "", "", nil
}
