cloudstack: Updated after review
This commit is contained in:
parent
1bf8a0c6a1
commit
2fea167294
|
@ -12,9 +12,8 @@ import (
|
|||
)
|
||||
|
||||
func commHost(state multistep.StateBag) (string, error) {
|
||||
|
||||
ip, hasIp := state.Get("ipaddress").(string)
|
||||
if !hasIp {
|
||||
ip, hasIP := state.Get("ipaddress").(string)
|
||||
if !hasIP {
|
||||
return "", fmt.Errorf("Failed to retrieve IP address")
|
||||
}
|
||||
|
||||
|
|
|
@ -30,14 +30,13 @@ func (s *stepCreateInstance) Run(state multistep.StateBag) multistep.StepAction
|
|||
client := state.Get("client").(*cloudstack.CloudStackClient)
|
||||
config := state.Get("config").(*Config)
|
||||
ui := state.Get("ui").(packer.Ui)
|
||||
source := state.Get("source").(string)
|
||||
|
||||
ui.Say("Creating instance...")
|
||||
|
||||
// Create a new parameter struct.
|
||||
p := client.VirtualMachine.NewDeployVirtualMachineParams(
|
||||
config.ServiceOffering,
|
||||
source,
|
||||
state.Get("source").(string),
|
||||
config.Zone,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue