lib/rbovirt.rb in rbovirt-0.0.12 vs lib/rbovirt.rb in rbovirt-0.0.13

- old
+ new

@@ -51,10 +51,15 @@ def api_version?(major) api_version.split('.')[0] == major end + def floppy_hook? + xml = http_get("/capabilities") + !(xml/"version/custom_properties/custom_property[@name='floppyinject']").empty? + end + private def current_datacenter @current_datacenter ||= self.datacenter_id ? datacenter(self.datacenter_id) : datacenters.first end @@ -144,6 +149,6 @@ xml = Client::parse_response(OVIRT::client(@client.base_url)[@href].get(@client.auth_header)) object_class = ::OVIRT.const_get(xml.root.name.camelize) object_class.new(@client, (xml.root)) end end -end \ No newline at end of file +end