cloudstack: Updated after review

This commit is contained in:
Rickard von Essen 2017-07-26 19:01:12 +02:00
parent 1bf8a0c6a1
commit 2fea167294
No known key found for this signature in database
GPG Key ID: E0C0327388876CBA
2 changed files with 3 additions and 5 deletions

View File

@ -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")
}

View File

@ -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,
)