Conversation
ekohl
left a comment
There was a problem hiding this comment.
I haven't reviewed all the details, this is just a superficial review.
36bba07 to
0402e3f
Compare
0402e3f to
f5495f3
Compare
ekohl
left a comment
There was a problem hiding this comment.
I'm wondering about the design so I'm making various comments inline.
Rather than implementing separate attach and detach ISO requests, should it have a requests to reconfigure the cdrom device where the source file is an optional parameter?
|
|
||
| private | ||
|
|
||
| def attach_cdrom_xml(iso_path, target_dev, bus) |
There was a problem hiding this comment.
This doesn't actually attach anything and is only the CDROM XML so naming wise I'd suggest.
| def attach_cdrom_xml(iso_path, target_dev, bus) | |
| def cdrom_xml(iso_path, target_dev, bus) |
| private | ||
|
|
||
| def attach_cdrom_xml(iso_path, target_dev, bus) | ||
| Nokogiri::XML::Builder.new do |x| |
There was a problem hiding this comment.
This is a different implementation than what's default when a host is created:
fog-libvirt/lib/fog/libvirt/models/compute/server.rb
Lines 410 to 416 in f5495f3
If the host already has a cdrom drive, shouldn't it reuse that?
| module Fog | ||
| module Libvirt | ||
| module Util | ||
| DEFAULT_CDROM_TARGET_DEV = "sdc".freeze |
There was a problem hiding this comment.
When a host is created with a cdrom it uses sda as the default:
fog-libvirt/lib/fog/libvirt/models/compute/server.rb
Lines 410 to 416 in f5495f3
| return flags unless domain_active | ||
|
|
||
| flags | ::Libvirt::Domain::AFFECT_LIVE | ||
| rescue ::Libvirt::Error |
There was a problem hiding this comment.
When is this raised? I don't see API calls here so what could raise an exception?
No description provided.