Clean patch formatting with make fmt
This commit is contained in:
parent
5fe9f3980d
commit
038e9f316c
|
@ -126,10 +126,10 @@ func (b *Builder) Run(ctx context.Context, ui packer.Ui, hook packer.Hook) (pack
|
||||||
Wait: b.config.RackconnectWait,
|
Wait: b.config.RackconnectWait,
|
||||||
},
|
},
|
||||||
&StepAllocateIp{
|
&StepAllocateIp{
|
||||||
FloatingIPNetwork: b.config.FloatingIPNetwork,
|
FloatingIPNetwork: b.config.FloatingIPNetwork,
|
||||||
FloatingIP: b.config.FloatingIP,
|
FloatingIP: b.config.FloatingIP,
|
||||||
ReuseIPs: b.config.ReuseIPs,
|
ReuseIPs: b.config.ReuseIPs,
|
||||||
InstanceFloatingIPNet: b.config.InstanceFloatingIPNet,
|
InstanceFloatingIPNet: b.config.InstanceFloatingIPNet,
|
||||||
},
|
},
|
||||||
&communicator.StepConnect{
|
&communicator.StepConnect{
|
||||||
Config: &b.config.RunConfig.Comm,
|
Config: &b.config.RunConfig.Comm,
|
||||||
|
|
|
@ -86,13 +86,12 @@ func GetInstancePortID(client *gophercloud.ServiceClient, id string, instance_fl
|
||||||
for i := 0; i < len(interfaces); i++ {
|
for i := 0; i < len(interfaces); i++ {
|
||||||
log.Printf("Instance interface: %v: %+v\n", i, interfaces[i])
|
log.Printf("Instance interface: %v: %+v\n", i, interfaces[i])
|
||||||
if interfaces[i].NetID == instance_float_net {
|
if interfaces[i].NetID == instance_float_net {
|
||||||
log.Printf("Found preferred interface: %v\n", i)
|
log.Printf("Found preferred interface: %v\n", i)
|
||||||
selected_interface = i
|
selected_interface = i
|
||||||
log.Printf("Using interface value: %v", selected_interface)
|
log.Printf("Using interface value: %v", selected_interface)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return interfaces[selected_interface].PortID, nil
|
return interfaces[selected_interface].PortID, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,24 +17,24 @@ type RunConfig struct {
|
||||||
SSHInterface string `mapstructure:"ssh_interface"`
|
SSHInterface string `mapstructure:"ssh_interface"`
|
||||||
SSHIPVersion string `mapstructure:"ssh_ip_version"`
|
SSHIPVersion string `mapstructure:"ssh_ip_version"`
|
||||||
|
|
||||||
SourceImage string `mapstructure:"source_image"`
|
SourceImage string `mapstructure:"source_image"`
|
||||||
SourceImageName string `mapstructure:"source_image_name"`
|
SourceImageName string `mapstructure:"source_image_name"`
|
||||||
SourceImageFilters ImageFilter `mapstructure:"source_image_filter"`
|
SourceImageFilters ImageFilter `mapstructure:"source_image_filter"`
|
||||||
Flavor string `mapstructure:"flavor"`
|
Flavor string `mapstructure:"flavor"`
|
||||||
AvailabilityZone string `mapstructure:"availability_zone"`
|
AvailabilityZone string `mapstructure:"availability_zone"`
|
||||||
RackconnectWait bool `mapstructure:"rackconnect_wait"`
|
RackconnectWait bool `mapstructure:"rackconnect_wait"`
|
||||||
FloatingIPNetwork string `mapstructure:"floating_ip_network"`
|
FloatingIPNetwork string `mapstructure:"floating_ip_network"`
|
||||||
FloatingIP string `mapstructure:"floating_ip"`
|
FloatingIP string `mapstructure:"floating_ip"`
|
||||||
ReuseIPs bool `mapstructure:"reuse_ips"`
|
ReuseIPs bool `mapstructure:"reuse_ips"`
|
||||||
SecurityGroups []string `mapstructure:"security_groups"`
|
SecurityGroups []string `mapstructure:"security_groups"`
|
||||||
Networks []string `mapstructure:"networks"`
|
Networks []string `mapstructure:"networks"`
|
||||||
InstanceFloatingIPNet string `mapstructure:"instance_floating_ip_net"`
|
InstanceFloatingIPNet string `mapstructure:"instance_floating_ip_net"`
|
||||||
Ports []string `mapstructure:"ports"`
|
Ports []string `mapstructure:"ports"`
|
||||||
UserData string `mapstructure:"user_data"`
|
UserData string `mapstructure:"user_data"`
|
||||||
UserDataFile string `mapstructure:"user_data_file"`
|
UserDataFile string `mapstructure:"user_data_file"`
|
||||||
InstanceName string `mapstructure:"instance_name"`
|
InstanceName string `mapstructure:"instance_name"`
|
||||||
InstanceMetadata map[string]string `mapstructure:"instance_metadata"`
|
InstanceMetadata map[string]string `mapstructure:"instance_metadata"`
|
||||||
ForceDelete bool `mapstructure:"force_delete"`
|
ForceDelete bool `mapstructure:"force_delete"`
|
||||||
|
|
||||||
ConfigDrive bool `mapstructure:"config_drive"`
|
ConfigDrive bool `mapstructure:"config_drive"`
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
type StepAllocateIp struct {
|
type StepAllocateIp struct {
|
||||||
FloatingIPNetwork string
|
FloatingIPNetwork string
|
||||||
FloatingIP string
|
FloatingIP string
|
||||||
ReuseIPs bool
|
ReuseIPs bool
|
||||||
InstanceFloatingIPNet string
|
InstanceFloatingIPNet string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *StepAllocateIp) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
|
func (s *StepAllocateIp) Run(ctx context.Context, state multistep.StateBag) multistep.StepAction {
|
||||||
|
|
Loading…
Reference in New Issue