builder/amazon/all: get rid of unnecessary field

This commit is contained in:
Mitchell Hashimoto 2013-12-12 21:38:48 -08:00
parent f5401110e6
commit 1234e61cda
10 changed files with 0 additions and 12 deletions

View File

@ -46,7 +46,6 @@ func (s *StepAttachVolume) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the volume to become attached // Wait for the volume to become attached
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"attaching"}, Pending: []string{"attaching"},
StepState: state, StepState: state,
Target: "attached", Target: "attached",
@ -102,7 +101,6 @@ func (s *StepAttachVolume) CleanupFunc(state multistep.StateBag) error {
// Wait for the volume to detach // Wait for the volume to detach
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"attaching", "attached", "detaching"}, Pending: []string{"attaching", "attached", "detaching"},
StepState: state, StepState: state,
Target: "detached", Target: "detached",

View File

@ -65,7 +65,6 @@ func (s *StepCreateVolume) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the volume to become ready // Wait for the volume to become ready
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"creating"}, Pending: []string{"creating"},
StepState: state, StepState: state,
Target: "available", Target: "available",

View File

@ -53,7 +53,6 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the image to become ready // Wait for the image to become ready
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending"}, Pending: []string{"pending"},
Target: "available", Target: "available",
Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId), Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId),

View File

@ -37,7 +37,6 @@ func (s *StepSnapshot) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the snapshot to be ready // Wait for the snapshot to be ready
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending"}, Pending: []string{"pending"},
StepState: state, StepState: state,
Target: "completed", Target: "completed",

View File

@ -23,7 +23,6 @@ type StateRefreshFunc func() (result interface{}, state string, err error)
// StateChangeConf is the configuration struct used for `WaitForState`. // StateChangeConf is the configuration struct used for `WaitForState`.
type StateChangeConf struct { type StateChangeConf struct {
Conn *ec2.EC2
Pending []string Pending []string
Refresh StateRefreshFunc Refresh StateRefreshFunc
StepState multistep.StateBag StepState multistep.StateBag

View File

@ -83,7 +83,6 @@ func amiRegionCopy(state multistep.StateBag, auth aws.Auth, imageId string,
} }
stateChange := StateChangeConf{ stateChange := StateChangeConf{
Conn: regionconn,
Pending: []string{"pending"}, Pending: []string{"pending"},
Target: "available", Target: "available",
Refresh: AMIStateRefreshFunc(regionconn, resp.ImageId), Refresh: AMIStateRefreshFunc(regionconn, resp.ImageId),

View File

@ -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)) ui.Say(fmt.Sprintf("Waiting for instance (%s) to become ready...", s.instance.InstanceId))
stateChange := StateChangeConf{ stateChange := StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending"}, Pending: []string{"pending"},
Target: "running", Target: "running",
Refresh: InstanceStateRefreshFunc(ec2conn, s.instance), Refresh: InstanceStateRefreshFunc(ec2conn, s.instance),
@ -145,7 +144,6 @@ func (s *StepRunSourceInstance) Cleanup(state multistep.StateBag) {
} }
stateChange := StateChangeConf{ stateChange := StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"}, Pending: []string{"pending", "running", "shutting-down", "stopped", "stopping"},
Refresh: InstanceStateRefreshFunc(ec2conn, s.instance), Refresh: InstanceStateRefreshFunc(ec2conn, s.instance),
Target: "terminated", Target: "terminated",

View File

@ -40,7 +40,6 @@ func (s *stepCreateAMI) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the image to become ready // Wait for the image to become ready
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending"}, Pending: []string{"pending"},
Target: "available", Target: "available",
Refresh: awscommon.AMIStateRefreshFunc(ec2conn, createResp.ImageId), Refresh: awscommon.AMIStateRefreshFunc(ec2conn, createResp.ImageId),

View File

@ -28,7 +28,6 @@ func (s *stepStopInstance) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the instance to actual stop // Wait for the instance to actual stop
ui.Say("Waiting for the instance to stop...") ui.Say("Waiting for the instance to stop...")
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"running", "stopping"}, Pending: []string{"running", "stopping"},
Target: "stopped", Target: "stopped",
Refresh: awscommon.InstanceStateRefreshFunc(ec2conn, instance), Refresh: awscommon.InstanceStateRefreshFunc(ec2conn, instance),

View File

@ -38,7 +38,6 @@ func (s *StepRegisterAMI) Run(state multistep.StateBag) multistep.StepAction {
// Wait for the image to become ready // Wait for the image to become ready
stateChange := awscommon.StateChangeConf{ stateChange := awscommon.StateChangeConf{
Conn: ec2conn,
Pending: []string{"pending"}, Pending: []string{"pending"},
Target: "available", Target: "available",
Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId), Refresh: awscommon.AMIStateRefreshFunc(ec2conn, registerResp.ImageId),