Project

General

Profile

« Previous | Next » 

Revision 1af68074

Added by Daniel Lobato Garcia almost 9 years ago

Fixes #10867 - OpenStack boot_from_volume is true only when checked

(cherry picked from commit 776cff93637b006cb69063fecf142e776acd1378)

View differences:

app/models/compute_resources/foreman/model/openstack.rb
end
def create_vm(args = {})
boot_from_volume(args) if args[:boot_from_volume]
boot_from_volume(args) if Foreman::Cast.to_bool(args[:boot_from_volume])
network = args.delete(:network)
# fix internal network format for fog.
args[:nics].delete_if(&:blank?)
args[:nics].map! {|nic| { 'net_id' => nic } }
vm = super(args)
vm = super(args)
if network.present?
address = allocate_address(network)
assign_floating_ip(address, vm)
......
end
def vm_instance_defaults
super.merge(
:key_name => key_pair.name
)
super.merge(:key_name => key_pair.name)
end
def assign_floating_ip(address, vm)

Also available in: Unified diff