diff --git a/lib/ovirt/base_object.rb b/lib/ovirt/base_object.rb
index <HASH>..<HASH> 100644
--- a/lib/ovirt/base_object.rb
+++ b/lib/ovirt/base_object.rb
@@ -12,5 +12,11 @@ module OVIRT
     def parse_version xml
       (xml/'version').first[:major] +"."+ (xml/'version').first[:minor]
     end
+
+    def parse_bool text
+      return true if text =~ /^true$/i
+      return false if text =~ /^false$/i
+      raise ArgumentError.new %Q[The string "#{text}" isn't a valid boolean, it should be "true" or "false"]
+    end
   end
-end
\ No newline at end of file
+end
Add method to parse XML booleans

Currently we don't convert boolean objects returned by the server to the
Ruby representation of booleans. This complicates further treatment of
these values, as they have to be treated as strings. To avoid that this
patch introduces a new "parse_bool" method in the base object class
intended to convert the boolean representation used by the server into
the Ruby representation. This method will be used in later changes.