builder/amazon/all: get rid of unnecessary field
This commit is contained in:
parent
f5401110e6
commit
1234e61cda
|
@ -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",
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue