From 1234e61cdaac270a8ea6c19358127669ca5e0221 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 12 Dec 2013 21:38:48 -0800 Subject: [PATCH] builder/amazon/all: get rid of unnecessary field --- builder/amazon/chroot/step_attach_volume.go | 2 -- builder/amazon/chroot/step_create_volume.go | 1 - builder/amazon/chroot/step_register_ami.go | 1 - builder/amazon/chroot/step_snapshot.go | 1 - builder/amazon/common/state.go | 1 - builder/amazon/common/step_ami_region_copy.go | 1 - builder/amazon/common/step_run_source_instance.go | 2 -- builder/amazon/ebs/step_create_ami.go | 1 - builder/amazon/ebs/step_stop_instance.go | 1 - builder/amazon/instance/step_register_ami.go | 1 - 10 files changed, 12 deletions(-) diff --git a/builder/amazon/chroot/step_attach_volume.go b/builder/amazon/chroot/step_attach_volume.go index ab2ddb708..e67479550 100644 --- a/builder/amazon/chroot/step_attach_volume.go +++ b/builder/amazon/chroot/step_attach_volume.go @@ -46,7 +46,6 @@ func (s *StepAttachVolume) Run(state multistep.StateBag) multistep.StepAction { // Wait for the volume to become attached stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"attaching"}, StepState: state, Target: "attached", @@ -102,7 +101,6 @@ func (s *StepAttachVolume) CleanupFunc(state multistep.StateBag) error { // Wait for the volume to detach stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"attaching", "attached", "detaching"}, StepState: state, Target: "detached", diff --git a/builder/amazon/chroot/step_create_volume.go b/builder/amazon/chroot/step_create_volume.go index 0b89cf642..881857e71 100644 --- a/builder/amazon/chroot/step_create_volume.go +++ b/builder/amazon/chroot/step_create_volume.go @@ -65,7 +65,6 @@ func (s *StepCreateVolume) Run(state multistep.StateBag) multistep.StepAction { // Wait for the volume to become ready stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"creating"}, StepState: state, Target: "available", diff --git a/builder/amazon/chroot/step_register_ami.go b/builder/amazon/chroot/step_register_ami.go index cb52b646c..173d88d6d 100644 --- a/builder/amazon/chroot/step_register_ami.go +++ b/builder/amazon/chroot/step_register_ami.go @@ -53,7 +53,6 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction { // Wait for the image to become ready stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending"}, Target: "available", Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId), diff --git a/builder/amazon/chroot/step_snapshot.go b/builder/amazon/chroot/step_snapshot.go index e065da2df..cadf65f52 100644 --- a/builder/amazon/chroot/step_snapshot.go +++ b/builder/amazon/chroot/step_snapshot.go @@ -37,7 +37,6 @@ func (s *StepSnapshot) Run(state multistep.StateBag) multistep.StepAction { // Wait for the snapshot to be ready stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending"}, StepState: state, Target: "completed", diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index eaa29e92d..688a918a5 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -23,7 +23,6 @@ type StateRefreshFunc func() (result interface{}, state string, err error) // StateChangeConf is the configuration struct used for `WaitForState`. type StateChangeConf struct { - Conn *ec2.EC2 Pending []string Refresh StateRefreshFunc StepState multistep.StateBag diff --git a/builder/amazon/common/step_ami_region_copy.go b/builder/amazon/common/step_ami_region_copy.go index 2f5442c3c..6e61b40d1 100644 --- a/builder/amazon/common/step_ami_region_copy.go +++ b/builder/amazon/common/step_ami_region_copy.go @@ -83,7 +83,6 @@ func amiRegionCopy(state multistep.StateBag, auth aws.Auth, imageId string, } stateChange := StateChangeConf{ - Conn: regionconn, Pending: []string{"pending"}, Target: "available", Refresh: AMIStateRefreshFunc(regionconn, resp.ImageId), diff --git a/builder/amazon/common/step_run_source_instance.go b/builder/amazon/common/step_run_source_instance.go index 77d330a21..9f3d6bfb1 100644 --- a/builder/amazon/common/step_run_source_instance.go +++ b/builder/amazon/common/step_run_source_instance.go @@ -95,7 +95,6 @@ func (s *StepRunSourceInstance) Run(state multistep.StateBag) multistep.StepActi ui.Say(fmt.Sprintf("Waiting for instance (%s) to become ready...", s.instance.InstanceId)) stateChange := StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending"}, Target: "running", Refresh: InstanceStateRefreshFunc(ec2conn, s.instance), @@ -145,7 +144,6 @@ func (s *StepRunSourceInstance) Cleanup(state multistep.StateBag) { } stateChange := StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, Refresh: InstanceStateRefreshFunc(ec2conn, s.instance), Target: "terminated", diff --git a/builder/amazon/ebs/step_create_ami.go b/builder/amazon/ebs/step_create_ami.go index b31a702f6..4781cd692 100644 --- a/builder/amazon/ebs/step_create_ami.go +++ b/builder/amazon/ebs/step_create_ami.go @@ -40,7 +40,6 @@ func (s *stepCreateAMI) Run(state multistep.StateBag) multistep.StepAction { // Wait for the image to become ready stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending"}, Target: "available", Refresh: awscommon.AMIStateRefreshFunc(ec2conn, createResp.ImageId), diff --git a/builder/amazon/ebs/step_stop_instance.go b/builder/amazon/ebs/step_stop_instance.go index 058c61983..8603fb807 100644 --- a/builder/amazon/ebs/step_stop_instance.go +++ b/builder/amazon/ebs/step_stop_instance.go @@ -28,7 +28,6 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction { // Wait for the instance to actual stop ui.Say("Waiting for the instance to stop...") stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"running", "stopping"}, Target: "stopped", Refresh: awscommon.InstanceStateRefreshFunc(ec2conn, instance), diff --git a/builder/amazon/instance/step_register_ami.go b/builder/amazon/instance/step_register_ami.go index 35f31882d..211c7fc45 100644 --- a/builder/amazon/instance/step_register_ami.go +++ b/builder/amazon/instance/step_register_ami.go @@ -38,7 +38,6 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction { // Wait for the image to become ready stateChange := awscommon.StateChangeConf{ - Conn: ec2conn, Pending: []string{"pending"}, Target: "available", Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId),