lib/libvirt/domain.rb in libvirt_ffi-0.5.4 vs lib/libvirt/domain.rb in libvirt_ffi-0.5.5

- old
+ new

@@ -177,9 +177,16 @@ raise Errors::LibError, "Couldn't get domain metadata" if result.nil? result end + def persistent? + result = FFI::Domain.virDomainIsPersistent(@dom_ptr) + raise Errors::LibError, "Couldn't set domain metadata" if result.negative? + + result == 1 + end + private def dbg(&block) Util.log(:debug, 'Libvirt::Domain', &block) end