From aef359b64911e804a2113d7922112e5ee597985e Mon Sep 17 00:00:00 2001 From: Devan Goodwin Date: Wed, 30 May 2018 09:54:35 -0300 Subject: [PATCH] Fixes for cluster-api interface changes. --- contrib/cmd/aws-actuator-test/main.go | 4 ++-- pkg/clusterapi/aws/actuator.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/cmd/aws-actuator-test/main.go b/contrib/cmd/aws-actuator-test/main.go index 7df95fa20..c7cf1db80 100644 --- a/contrib/cmd/aws-actuator-test/main.go +++ b/contrib/cmd/aws-actuator-test/main.go @@ -78,12 +78,12 @@ func deleteClusterMachine(instanceId string) error { } func clusterMachineExists(instanceId string) error { - _, machine := testClusterAPIResources("any") + cluster, machine := testClusterAPIResources("any") machine.Annotations = map[string]string{ instanceIDAnnotation: instanceId, } actuator := aws.NewActuator(nil, nil, log.WithField("example", "delete-machine"), "us-east-1c") - exists, err := actuator.Exists(machine) + exists, err := actuator.Exists(cluster, machine) if err != nil { return err } diff --git a/pkg/clusterapi/aws/actuator.go b/pkg/clusterapi/aws/actuator.go index 57a5b5fdf..0b5775c4c 100644 --- a/pkg/clusterapi/aws/actuator.go +++ b/pkg/clusterapi/aws/actuator.go @@ -332,7 +332,7 @@ func (a *Actuator) CreateMachine(cluster *clusterv1.Cluster, machine *clusterv1. } // Delete deletes a machine and updates its finalizer -func (a *Actuator) Delete(machine *clusterv1.Machine) error { +func (a *Actuator) Delete(cluster *clusterv1.Cluster, machine *clusterv1.Machine) error { mLog := clustoplog.WithMachine(a.logger, machine) mLog.Debugf("Delete %s/%s", machine.Namespace, machine.Name) if err := a.DeleteMachine(machine); err != nil { @@ -396,7 +396,7 @@ func (a *Actuator) Update(c *clusterv1.Cluster, machine *clusterv1.Machine) erro } // Exists determines if the given machine currently exists. -func (a *Actuator) Exists(machine *clusterv1.Machine) (bool, error) { +func (a *Actuator) Exists(cluster *clusterv1.Cluster, machine *clusterv1.Machine) (bool, error) { mLog := clustoplog.WithMachine(a.logger, machine) mLog.Debugf("checking if machine exists")