lib/fog/ovirt/compute/v4.rb in fog-ovirt-1.1.5 vs lib/fog/ovirt/compute/v4.rb in fog-ovirt-1.1.6
- old
+ new
@@ -49,11 +49,11 @@
obj.instance_variables.each do |v|
key = v.to_s.delete("@").to_sym
value = obj.instance_variable_get(v)
if key == :network
- opts[key] = client.follow_link(obj.vnic_profile).network.id
+ opts[key] = obj.vnic_profile.present? ? client.follow_link(obj.vnic_profile).network.id : value
next
end
if key == :provisioned_size
opts[:size] = value.to_s
@@ -96,9 +96,11 @@
:port => value.port,
:secure_port => value.secure_port,
:subject => subject,
:monitors => value.monitors
}
+ when OvirtSDK4::Console
+ { :enabled => value.enabled }
else
if value.class.respond_to?(:parent) && value.class.parent == OvirtSDK4
value.id if value.respond_to?(:id)
else
value.to_s.strip