diff --git a/cloud/scope/machine.go b/cloud/scope/machine.go index ccefe65ec..c3a40eba5 100644 --- a/cloud/scope/machine.go +++ b/cloud/scope/machine.go @@ -18,7 +18,6 @@ package scope import ( "context" - "fmt" "github.com/IBM/go-sdk-core/v5/core" "github.com/IBM/vpc-go-sdk/vpcv1" @@ -154,13 +153,12 @@ func (m *MachineScope) CreateMachine() (*vpcv1.Instance, error) { } options.SetInstancePrototype(instancePrototype) - instance, response, err := m.IBMVPCClient.CreateInstance(options) + instance, _, err := m.IBMVPCClient.CreateInstance(options) if err != nil { record.Warnf(m.IBMVPCMachine, "FailedCreateInstance", "Failed instance creation - %v", err) } else { record.Eventf(m.IBMVPCMachine, "SuccessfulCreateInstance", "Created Instance %q", *instance.Name) } - fmt.Printf("%v\n", response) return instance, err } diff --git a/controllers/ibmpowervsmachine_controller.go b/controllers/ibmpowervsmachine_controller.go index 243df695d..4627b6cac 100644 --- a/controllers/ibmpowervsmachine_controller.go +++ b/controllers/ibmpowervsmachine_controller.go @@ -256,7 +256,6 @@ func (r *IBMPowerVSMachineReconciler) reconcileNormal(machineScope *scope.PowerV machineScope.Info("PowerVS instance state is undefined", "state", *instance.Status, "instance-id", machineScope.GetInstanceID()) conditions.MarkUnknown(machineScope.IBMPowerVSMachine, infrav1beta1.InstanceReadyCondition, "", "") } - machineScope.Info(*ins.PvmInstanceID) } // Requeue after 2 minute if machine is not ready to update status of the machine properly. diff --git a/controllers/ibmvpcmachine_controller.go b/controllers/ibmvpcmachine_controller.go index 7ea12ce50..de96b42a3 100644 --- a/controllers/ibmvpcmachine_controller.go +++ b/controllers/ibmvpcmachine_controller.go @@ -196,7 +196,6 @@ func (r *IBMVPCMachineReconciler) reconcileNormal(machineScope *scope.MachineSco } } machineScope.IBMVPCMachine.Status.Ready = true - machineScope.Info(*instance.ID) } return ctrl.Result{}, nil