cloudstack: moved instanceSource to statebag

This commit is contained in:
Rickard von Essen
2017-07-18 16:39:28 +02:00
parent ba3d4c8cd2
commit 07fffd7cd5
3 changed files with 10 additions and 8 deletions
+2 -1
View File
@@ -30,13 +30,14 @@ 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,
config.instanceSource,
source,
config.Zone,
)