Revision 54c83f7a
Added by Shira Maximov almost 6 years ago
app/models/compute_resources/foreman/model/ovirt.rb | ||
---|---|---|
def create_vm(args = {})
|
||
args[:comment] = args[:user_data] if args[:user_data]
|
||
args[:template] = args[:image_id] if args[:image_id]
|
||
|
||
sanitize_inherited_vm_attributes(args)
|
||
|
||
preallocate_disks(args) if args[:volumes_attributes].present?
|
||
... | ... | |
end
|
||
end
|
||
|
||
def vm_instance_defaults
|
||
super.merge(
|
||
:memory => 1024.megabytes,
|
||
:cores => '1',
|
||
:sockets => '1'
|
||
)
|
||
end
|
||
|
||
def new_vm(attr = {})
|
||
vm = super
|
||
interfaces = nested_attributes_for :interfaces, attr[:interfaces_attributes]
|
Also available in: Unified diff
Fixes #23196 - Add default values for cores and socket in VM