libvirt_ffi 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d8688af0ed128266c17bf8048e3c3d570df7c99bee5eda4b891ccf4fef34992
4
- data.tar.gz: ec56f38a36470d403b345b6787130e28c75e594a323d704e7df714cba1f122fb
3
+ metadata.gz: 2a2337cfa3a044b561ab70fe277e7fafff9f39919c494edc64e0f24dabce256d
4
+ data.tar.gz: a2dbb17ebb8eca45d0336293da344f1b6959f5afdbcee394d87ad5c103a9406a
5
5
  SHA512:
6
- metadata.gz: 9045b8acca247352c607417cac3108ffb5e44bc4383b56659c6cd6b34f9c0e8fdba4e2c1872fdc53aa44c3fa641814e3abeb64e2d5ceeb8cff044a75bab80429
7
- data.tar.gz: 5da8c3e8dbb676956355d3271785fc85adf6a2d156dfcb3d81e02ffb151cf6bf73761aa2927460d35c63ad15e7693d1e0f3bcd601d4c9b70b6f09f0bf24a6faf
6
+ metadata.gz: 3e1354133c74a9fe27affc1414f2e8a466fd1c97664e3ed365736c7f3c574d9e7e1530bd15af5d229442437e33cfcf4f18d48b8e538af7e62a49975d92d7b591
7
+ data.tar.gz: 57d42fe97ad18a5827710d63eec68d0681ec1282d97168a71f1ce27263cc69c8f0063c4374543bb8baf0ff707a587080f23530b0fbc1d7ce8f158a46f57f62a4
@@ -79,6 +79,13 @@ module Libvirt
79
79
  result.zero?
80
80
  end
81
81
 
82
+ def free_memory
83
+ result = FFI::Host.virNodeGetFreeMemory(@conn_ptr)
84
+ raise Errors::LibError, "Couldn't set connection keep_alive" if result.negative?
85
+
86
+ result
87
+ end
88
+
82
89
  def to_s
83
90
  "#<#{self.class}:0x#{object_id.to_s(16)} @uri=#{@uri.inspect} @conn_ptr=0x#{@conn_ptr.address.to_s(16)}>"
84
91
  end
@@ -117,6 +117,11 @@ module Libvirt
117
117
  # virConnectPtr conn
118
118
  # )
119
119
  attach_function :virConnectRef, [:pointer], :int
120
+
121
+ # unsigned long long virNodeGetFreeMemory (
122
+ # virConnectPtr conn
123
+ # )
124
+ attach_function :virNodeGetFreeMemory, [:pointer], :u_long_long
120
125
  end
121
126
  end
122
127
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libvirt
4
- VERSION = '0.5.2'
4
+ VERSION = '0.5.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libvirt_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich