-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
client.templates fails if filtered_api = true #110
Comments
The difference is due to class Client
def templates(opts={})
path = "/templates"
path += search_url(opts) unless unfiltered_api
result = http_get(path).xpath('/templates/template')
puts "DEBUG: #{result.class.name}"
http_get(path).xpath('/templates/template').collect do |t|
OVIRT::Template::new(self, t)
end.compact
end |
Perhaps we should skip the template if xml id is "00000000-0000-0000-0000-000000000000". def parse_xml_attributes!(xml)
## etc etc
@cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href])
## Template "00000000-0000-0000-0000-000000000000" xml/'cluster'.first is nil I propose either remove the Blank template from the collection or def parse_xml_attributes!(xml)
@description = ((xml/'description').first.text rescue '')
@comment = ((xml/'comment').first.text rescue '')
@version = TemplateVersion.new((xml/'version').first)
@status = ((xml/'status').first.text rescue 'unknown')
@memory = (xml/'memory').first.text
@profile = (xml/'type').first.text
if (xml/'cluster').first
@cluster = Link::new(@client, (xml/'cluster').first[:id], (xml/'cluster').first[:href])
end Tested and works with vagrant-ovirt3 1.9.1. |
Go ahead and create a PR for this. Later, |
Resolved by #111 |
ovirt 3.6.5, rbovirt 0.1.1
The text was updated successfully, but these errors were encountered: