fix identifier changes from oracle sdk

This commit is contained in:
Matthew Hooker 2018-10-24 14:08:11 -07:00
parent ab723eaf78
commit c42be62d90
No known key found for this signature in database
GPG Key ID: 7B5F933D9CE8C6A1
12 changed files with 22 additions and 22 deletions

View File

@ -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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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