From c42be62d9066b9cfbf3d12484fa6b62e01150dc2 Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Wed, 24 Oct 2018 14:08:11 -0700 Subject: [PATCH] fix identifier changes from oracle sdk --- builder/oracle/classic/step_add_keys.go | 4 ++-- builder/oracle/classic/step_attach_volume.go | 4 ++-- builder/oracle/classic/step_create_image.go | 4 ++-- builder/oracle/classic/step_create_instance.go | 4 ++-- builder/oracle/classic/step_create_ip_reservation.go | 4 ++-- builder/oracle/classic/step_create_persistent_volume.go | 4 ++-- builder/oracle/classic/step_create_pv_builder.go | 4 ++-- builder/oracle/classic/step_create_pv_master.go | 4 ++-- builder/oracle/classic/step_list_images.go | 2 +- builder/oracle/classic/step_security.go | 4 ++-- builder/oracle/classic/step_snapshot.go | 4 ++-- builder/oracle/classic/step_terminate_pv_master.go | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/builder/oracle/classic/step_add_keys.go b/builder/oracle/classic/step_add_keys.go index 739a2c790..dafea637f 100644 --- a/builder/oracle/classic/step_add_keys.go +++ b/builder/oracle/classic/step_add_keys.go @@ -17,7 +17,7 @@ func (s *stepAddKeysToAPI) Run(_ context.Context, state multistep.StateBag) mult // get variables from state ui := state.Get("ui").(packer.Ui) config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) if config.Comm.Type != "ssh" { ui.Say("Not using SSH communicator; skip generating SSH keys...") @@ -61,7 +61,7 @@ func (s *stepAddKeysToAPI) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) ui.Say("Deleting SSH keys...") deleteInput := compute.DeleteSSHKeyInput{Name: config.Comm.SSHKeyPairName} - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) deleteClient := client.SSHKeys() err := deleteClient.DeleteSSHKey(&deleteInput) if err != nil { diff --git a/builder/oracle/classic/step_attach_volume.go b/builder/oracle/classic/step_attach_volume.go index 83576cd03..1ae9ccf13 100644 --- a/builder/oracle/classic/step_attach_volume.go +++ b/builder/oracle/classic/step_attach_volume.go @@ -16,7 +16,7 @@ type stepAttachVolume struct { } func (s *stepAttachVolume) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui := state.Get("ui").(packer.Ui) instanceInfo := state.Get(s.InstanceInfoKey).(*compute.InstanceInfo) @@ -46,7 +46,7 @@ func (s *stepAttachVolume) Cleanup(state multistep.StateBag) { if !ok { return } - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui := state.Get("ui").(packer.Ui) saClient := client.StorageAttachments() diff --git a/builder/oracle/classic/step_create_image.go b/builder/oracle/classic/step_create_image.go index 2df23c9bb..8fdacfee8 100644 --- a/builder/oracle/classic/step_create_image.go +++ b/builder/oracle/classic/step_create_image.go @@ -15,7 +15,7 @@ type stepCreateImage struct { func (s *stepCreateImage) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { ui := state.Get("ui").(packer.Ui) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) config := state.Get("config").(*Config) imageFile := state.Get("image_file").(string) @@ -75,7 +75,7 @@ func (s *stepCreateImage) Cleanup(state multistep.StateBag) { return } - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) config := state.Get("config").(*Config) ui := state.Get("ui").(packer.Ui) diff --git a/builder/oracle/classic/step_create_instance.go b/builder/oracle/classic/step_create_instance.go index 4d0646a8a..d481f5d3b 100644 --- a/builder/oracle/classic/step_create_instance.go +++ b/builder/oracle/classic/step_create_instance.go @@ -17,7 +17,7 @@ func (s *stepCreateInstance) Run(_ context.Context, state multistep.StateBag) mu ui.Say("Creating Instance...") config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ipAddName := state.Get("ipres_name").(string) secListName := state.Get("security_list").(string) @@ -63,7 +63,7 @@ func (s *stepCreateInstance) Cleanup(state multistep.StateBag) { // terminate instance ui := state.Get("ui").(packer.Ui) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) config := state.Get("config").(*Config) ui.Say("Terminating source instance...") diff --git a/builder/oracle/classic/step_create_ip_reservation.go b/builder/oracle/classic/step_create_ip_reservation.go index 82a447aab..c3e921fc7 100644 --- a/builder/oracle/classic/step_create_ip_reservation.go +++ b/builder/oracle/classic/step_create_ip_reservation.go @@ -16,7 +16,7 @@ func (s *stepCreateIPReservation) Run(_ context.Context, state multistep.StateBa ui := state.Get("ui").(packer.Ui) config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) iprClient := client.IPReservations() // TODO: add optional Name and Tags @@ -50,7 +50,7 @@ func (s *stepCreateIPReservation) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) ui.Say("Cleaning up IP reservations...") - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) input := compute.DeleteIPReservationInput{Name: ipResName.(string)} ipClient := client.IPReservations() diff --git a/builder/oracle/classic/step_create_persistent_volume.go b/builder/oracle/classic/step_create_persistent_volume.go index 3d2ba7d65..24e8dcdf5 100644 --- a/builder/oracle/classic/step_create_persistent_volume.go +++ b/builder/oracle/classic/step_create_persistent_volume.go @@ -17,7 +17,7 @@ type stepCreatePersistentVolume struct { } func (s *stepCreatePersistentVolume) Run(_ context.Context, state multistep.StateBag) multistep.StepAction { - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui := state.Get("ui").(packer.Ui) ui.Say("Creating Volume...") @@ -53,7 +53,7 @@ func (s *stepCreatePersistentVolume) Cleanup(state multistep.StateBag) { return } - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui := state.Get("ui").(packer.Ui) ui.Say("Cleaning up Volume...") diff --git a/builder/oracle/classic/step_create_pv_builder.go b/builder/oracle/classic/step_create_pv_builder.go index f0cab1061..2d3cb3693 100644 --- a/builder/oracle/classic/step_create_pv_builder.go +++ b/builder/oracle/classic/step_create_pv_builder.go @@ -21,7 +21,7 @@ func (s *stepCreatePVBuilder) Run(_ context.Context, state multistep.StateBag) m ui.Say("Creating builder instance...") config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ipAddName := state.Get("ipres_name").(string) secListName := state.Get("security_list").(string) @@ -74,7 +74,7 @@ func (s *stepCreatePVBuilder) Cleanup(state multistep.StateBag) { // terminate instance ui := state.Get("ui").(packer.Ui) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui.Say("Terminating builder instance...") diff --git a/builder/oracle/classic/step_create_pv_master.go b/builder/oracle/classic/step_create_pv_master.go index 082f23b50..82063a1b1 100644 --- a/builder/oracle/classic/step_create_pv_master.go +++ b/builder/oracle/classic/step_create_pv_master.go @@ -20,7 +20,7 @@ func (s *stepCreatePVMaster) Run(_ context.Context, state multistep.StateBag) mu ui.Say("Creating master instance...") config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ipAddName := state.Get("ipres_name").(string) secListName := state.Get("security_list").(string) @@ -75,7 +75,7 @@ func (s *stepCreatePVMaster) Cleanup(state multistep.StateBag) { // terminate instance ui := state.Get("ui").(packer.Ui) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui.Say("Terminating builder instance...") diff --git a/builder/oracle/classic/step_list_images.go b/builder/oracle/classic/step_list_images.go index ed453af5b..654337b30 100644 --- a/builder/oracle/classic/step_list_images.go +++ b/builder/oracle/classic/step_list_images.go @@ -15,7 +15,7 @@ func (s *stepListImages) Run(_ context.Context, state multistep.StateBag) multis // get variables from state ui := state.Get("ui").(packer.Ui) config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui.Say("Adding image to image list...") imageListClient := client.ImageList() diff --git a/builder/oracle/classic/step_security.go b/builder/oracle/classic/step_security.go index 74e249df6..d85bbb1c9 100644 --- a/builder/oracle/classic/step_security.go +++ b/builder/oracle/classic/step_security.go @@ -27,7 +27,7 @@ func (s *stepSecurity) Run(_ context.Context, state multistep.StateBag) multiste ui.Say(fmt.Sprintf("Configuring security lists and rules to enable %s access...", commType)) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) runUUID := uuid.TimeOrderedUUID() secListName := fmt.Sprintf("Packer_%s_Allow_%s_%s", commType, config.ImageName, runUUID) @@ -108,7 +108,7 @@ func (s *stepSecurity) Cleanup(state multistep.StateBag) { return } - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) ui := state.Get("ui").(packer.Ui) config := state.Get("config").(*Config) diff --git a/builder/oracle/classic/step_snapshot.go b/builder/oracle/classic/step_snapshot.go index 83047ccfa..11749805b 100644 --- a/builder/oracle/classic/step_snapshot.go +++ b/builder/oracle/classic/step_snapshot.go @@ -18,7 +18,7 @@ func (s *stepSnapshot) Run(_ context.Context, state multistep.StateBag) multiste ui := state.Get("ui").(packer.Ui) ui.Say("Creating Snapshot...") config := state.Get("config").(*Config) - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) instanceID := state.Get("instance_id").(string) // get instances client @@ -55,7 +55,7 @@ func (s *stepSnapshot) Cleanup(state multistep.StateBag) { ui := state.Get("ui").(packer.Ui) ui.Say("Deleting Snapshot...") - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) snapClient := client.Snapshots() snapInput := compute.DeleteSnapshotInput{ Snapshot: snap.Name, diff --git a/builder/oracle/classic/step_terminate_pv_master.go b/builder/oracle/classic/step_terminate_pv_master.go index f4de4282d..f894ba883 100644 --- a/builder/oracle/classic/step_terminate_pv_master.go +++ b/builder/oracle/classic/step_terminate_pv_master.go @@ -17,7 +17,7 @@ func (s *stepTerminatePVMaster) Run(_ context.Context, state multistep.StateBag) ui := state.Get("ui").(packer.Ui) ui.Say("Deleting master Instance...") - client := state.Get("client").(*compute.ComputeClient) + client := state.Get("client").(*compute.Client) instanceInfo := state.Get("master_instance_info").(*compute.InstanceInfo) // get instances client