From 2fea16729460eeccb4f6388da8267d9a7d55fa0f Mon Sep 17 00:00:00 2001 From: Rickard von Essen Date: Wed, 26 Jul 2017 19:01:12 +0200 Subject: [PATCH] cloudstack: Updated after review --- builder/cloudstack/ssh.go | 5 ++--- builder/cloudstack/step_create_instance.go | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/builder/cloudstack/ssh.go b/builder/cloudstack/ssh.go index 725961504..7a4c2fcba 100644 --- a/builder/cloudstack/ssh.go +++ b/builder/cloudstack/ssh.go @@ -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") } diff --git a/builder/cloudstack/step_create_instance.go b/builder/cloudstack/step_create_instance.go index aa032eecb..064754855 100644 --- a/builder/cloudstack/step_create_instance.go +++ b/builder/cloudstack/step_create_instance.go @@ -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, )