ruby-libvirt 0.5.2 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/COPYING +1 -1
- data/NEWS +38 -2
- data/Rakefile +3 -4
- data/ext/libvirt/_libvirt.c +8 -8
- data/ext/libvirt/common.c +27 -13
- data/ext/libvirt/common.h +12 -2
- data/ext/libvirt/connect.c +336 -159
- data/ext/libvirt/domain.c +571 -185
- data/ext/libvirt/extconf.h +393 -0
- data/ext/libvirt/extconf.rb +53 -44
- data/ext/libvirt/interface.c +15 -15
- data/ext/libvirt/network.c +120 -19
- data/ext/libvirt/nodedevice.c +19 -19
- data/ext/libvirt/nwfilter.c +10 -10
- data/ext/libvirt/secret.c +18 -18
- data/ext/libvirt/storage.c +90 -62
- data/ext/libvirt/stream.c +15 -15
- data/tests/test_conn.rb +13 -15
- data/tests/test_domain.rb +18 -13
- data/tests/test_interface.rb +4 -4
- data/tests/test_network.rb +1 -1
- data/tests/test_nwfilter.rb +1 -1
- data/tests/test_storage.rb +5 -5
- data/tests/test_stream.rb +1 -1
- data/tests/test_utils.rb +29 -10
- metadata +14 -14
data/ext/libvirt/connect.c
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* connect.c: virConnect methods
|
3
3
|
*
|
4
4
|
* Copyright (C) 2007,2010 Red Hat Inc.
|
5
|
-
* Copyright (C) 2013 Chris Lalancette <clalancette@gmail.com>
|
5
|
+
* Copyright (C) 2013-2016 Chris Lalancette <clalancette@gmail.com>
|
6
6
|
*
|
7
7
|
* This library is free software; you can redistribute it and/or
|
8
8
|
* modify it under the terms of the GNU Lesser General Public
|
@@ -112,7 +112,7 @@ virConnectPtr ruby_libvirt_connect_get(VALUE c)
|
|
112
112
|
* call-seq:
|
113
113
|
* conn.close -> nil
|
114
114
|
*
|
115
|
-
* Call virConnectClose[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectClose]
|
115
|
+
* Call virConnectClose[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectClose]
|
116
116
|
* to close the connection.
|
117
117
|
*/
|
118
118
|
static VALUE libvirt_connect_close(VALUE c)
|
@@ -143,9 +143,9 @@ static VALUE libvirt_connect_closed_p(VALUE c)
|
|
143
143
|
|
144
144
|
/*
|
145
145
|
* call-seq:
|
146
|
-
* conn.type ->
|
146
|
+
* conn.type -> String
|
147
147
|
*
|
148
|
-
* Call virConnectGetType[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetType]
|
148
|
+
* Call virConnectGetType[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetType]
|
149
149
|
* to retrieve the type of hypervisor for this connection.
|
150
150
|
*/
|
151
151
|
static VALUE libvirt_connect_type(VALUE c)
|
@@ -157,9 +157,9 @@ static VALUE libvirt_connect_type(VALUE c)
|
|
157
157
|
|
158
158
|
/*
|
159
159
|
* call-seq:
|
160
|
-
* conn.version ->
|
160
|
+
* conn.version -> Fixnum
|
161
161
|
*
|
162
|
-
* Call virConnectGetVersion[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetVersion]
|
162
|
+
* Call virConnectGetVersion[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetVersion]
|
163
163
|
* to retrieve the version of the hypervisor for this connection.
|
164
164
|
*/
|
165
165
|
static VALUE libvirt_connect_version(VALUE c)
|
@@ -177,9 +177,9 @@ static VALUE libvirt_connect_version(VALUE c)
|
|
177
177
|
#if HAVE_VIRCONNECTGETLIBVERSION
|
178
178
|
/*
|
179
179
|
* call-seq:
|
180
|
-
* conn.libversion ->
|
180
|
+
* conn.libversion -> Fixnum
|
181
181
|
*
|
182
|
-
* Call virConnectGetLibVersion[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetLibVersion]
|
182
|
+
* Call virConnectGetLibVersion[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetLibVersion]
|
183
183
|
* to retrieve the version of the libvirt library for this connection.
|
184
184
|
*/
|
185
185
|
static VALUE libvirt_connect_libversion(VALUE c)
|
@@ -198,9 +198,9 @@ static VALUE libvirt_connect_libversion(VALUE c)
|
|
198
198
|
|
199
199
|
/*
|
200
200
|
* call-seq:
|
201
|
-
* conn.hostname ->
|
201
|
+
* conn.hostname -> String
|
202
202
|
*
|
203
|
-
* Call virConnectGetHostname[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetHostname]
|
203
|
+
* Call virConnectGetHostname[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetHostname]
|
204
204
|
* to retrieve the hostname of the hypervisor for this connection.
|
205
205
|
*/
|
206
206
|
static VALUE libvirt_connect_hostname(VALUE c)
|
@@ -212,9 +212,9 @@ static VALUE libvirt_connect_hostname(VALUE c)
|
|
212
212
|
|
213
213
|
/*
|
214
214
|
* call-seq:
|
215
|
-
* conn.uri ->
|
215
|
+
* conn.uri -> String
|
216
216
|
*
|
217
|
-
* Call virConnectGetURI[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetURI]
|
217
|
+
* Call virConnectGetURI[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetURI]
|
218
218
|
* to retrieve the canonical URI for this connection.
|
219
219
|
*/
|
220
220
|
static VALUE libvirt_connect_uri(VALUE c)
|
@@ -226,9 +226,9 @@ static VALUE libvirt_connect_uri(VALUE c)
|
|
226
226
|
|
227
227
|
/*
|
228
228
|
* call-seq:
|
229
|
-
* conn.max_vcpus(type=nil) ->
|
229
|
+
* conn.max_vcpus(type=nil) -> Fixnum
|
230
230
|
*
|
231
|
-
* Call virConnectGetMaxVcpus[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetMaxVcpus]
|
231
|
+
* Call virConnectGetMaxVcpus[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetMaxVcpus]
|
232
232
|
* to retrieve the maximum number of virtual cpus supported by the hypervisor
|
233
233
|
* for this connection.
|
234
234
|
*/
|
@@ -248,7 +248,7 @@ static VALUE libvirt_connect_max_vcpus(int argc, VALUE *argv, VALUE c)
|
|
248
248
|
* call-seq:
|
249
249
|
* conn.node_info -> Libvirt::Connect::Nodeinfo
|
250
250
|
*
|
251
|
-
* Call virNodeGetInfo[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetInfo]
|
251
|
+
* Call virNodeGetInfo[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetInfo]
|
252
252
|
* to retrieve information about the node for this connection.
|
253
253
|
*/
|
254
254
|
static VALUE libvirt_connect_node_info(VALUE c)
|
@@ -276,9 +276,9 @@ static VALUE libvirt_connect_node_info(VALUE c)
|
|
276
276
|
|
277
277
|
/*
|
278
278
|
* call-seq:
|
279
|
-
* conn.node_free_memory ->
|
279
|
+
* conn.node_free_memory -> Fixnum
|
280
280
|
*
|
281
|
-
* Call virNodeGetFreeMemory[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetFreeMemory]
|
281
|
+
* Call virNodeGetFreeMemory[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreeMemory]
|
282
282
|
* to retrieve the amount of free memory available on the host for this
|
283
283
|
* connection.
|
284
284
|
*/
|
@@ -299,7 +299,7 @@ static VALUE libvirt_connect_node_free_memory(VALUE c)
|
|
299
299
|
* call-seq:
|
300
300
|
* conn.node_cells_free_memory(startCell=0, maxCells=#nodeCells) -> list
|
301
301
|
*
|
302
|
-
* Call virNodeGetCellsFreeMemory[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetCellsFreeMemory]
|
302
|
+
* Call virNodeGetCellsFreeMemory[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCellsFreeMemory]
|
303
303
|
* to retrieve the amount of free memory in each NUMA cell on the host for
|
304
304
|
* this connection.
|
305
305
|
*/
|
@@ -352,7 +352,7 @@ static VALUE libvirt_connect_node_cells_free_memory(int argc, VALUE *argv,
|
|
352
352
|
* call-seq:
|
353
353
|
* conn.node_security_model -> Libvirt::Connect::NodeSecurityModel
|
354
354
|
*
|
355
|
-
* Call virNodeGetSecurityModel[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetSecurityModel]
|
355
|
+
* Call virNodeGetSecurityModel[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetSecurityModel]
|
356
356
|
* to retrieve the security model in use on the host for this connection.
|
357
357
|
*/
|
358
358
|
static VALUE libvirt_connect_node_security_model(VALUE c)
|
@@ -379,7 +379,7 @@ static VALUE libvirt_connect_node_security_model(VALUE c)
|
|
379
379
|
* call-seq:
|
380
380
|
* conn.encrypted? -> [True|False]
|
381
381
|
*
|
382
|
-
* Call virConnectIsEncrypted[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectIsEncrypted]
|
382
|
+
* Call virConnectIsEncrypted[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectIsEncrypted]
|
383
383
|
* to determine if the connection is encrypted.
|
384
384
|
*/
|
385
385
|
static VALUE libvirt_connect_encrypted_p(VALUE c)
|
@@ -395,7 +395,7 @@ static VALUE libvirt_connect_encrypted_p(VALUE c)
|
|
395
395
|
* call-seq:
|
396
396
|
* conn.secure? -> [True|False]
|
397
397
|
*
|
398
|
-
* Call virConnectIsSecure[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectIsSecure]
|
398
|
+
* Call virConnectIsSecure[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectIsSecure]
|
399
399
|
* to determine if the connection is secure.
|
400
400
|
*/
|
401
401
|
static VALUE libvirt_connect_secure_p(VALUE c)
|
@@ -408,9 +408,9 @@ static VALUE libvirt_connect_secure_p(VALUE c)
|
|
408
408
|
|
409
409
|
/*
|
410
410
|
* call-seq:
|
411
|
-
* conn.capabilities ->
|
411
|
+
* conn.capabilities -> String
|
412
412
|
*
|
413
|
-
* Call virConnectGetCapabilities[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetCapabilities]
|
413
|
+
* Call virConnectGetCapabilities[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCapabilities]
|
414
414
|
* to retrieve the capabilities XML for this connection.
|
415
415
|
*/
|
416
416
|
static VALUE libvirt_connect_capabilities(VALUE c)
|
@@ -425,7 +425,7 @@ static VALUE libvirt_connect_capabilities(VALUE c)
|
|
425
425
|
* call-seq:
|
426
426
|
* conn.compare_cpu(xml, flags=0) -> compareflag
|
427
427
|
*
|
428
|
-
* Call virConnectCompareCPU[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectCompareCPU]
|
428
|
+
* Call virConnectCompareCPU[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectCompareCPU]
|
429
429
|
* to compare the host CPU with the XML contained in xml. Returns one of
|
430
430
|
* Libvirt::CPU_COMPARE_ERROR, Libvirt::CPU_COMPARE_INCOMPATIBLE,
|
431
431
|
* Libvirt::CPU_COMPARE_IDENTICAL, or Libvirt::CPU_COMPARE_SUPERSET.
|
@@ -450,7 +450,7 @@ static VALUE libvirt_connect_compare_cpu(int argc, VALUE *argv, VALUE c)
|
|
450
450
|
* call-seq:
|
451
451
|
* conn.baseline_cpu([xml, xml2, ...], flags=0) -> XML
|
452
452
|
*
|
453
|
-
* Call virConnectBaselineCPU[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectBaselineCPU]
|
453
|
+
* Call virConnectBaselineCPU[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectBaselineCPU]
|
454
454
|
* to compare the most feature-rich CPU which is compatible with all
|
455
455
|
* given host CPUs.
|
456
456
|
*/
|
@@ -786,9 +786,9 @@ static int domain_event_graphics_callback(virConnectPtr conn, virDomainPtr dom,
|
|
786
786
|
|
787
787
|
/*
|
788
788
|
* call-seq:
|
789
|
-
* conn.domain_event_register_any(eventID, callback, dom=nil, opaque=nil) ->
|
789
|
+
* conn.domain_event_register_any(eventID, callback, dom=nil, opaque=nil) -> Fixnum
|
790
790
|
*
|
791
|
-
* Call virConnectDomainEventRegisterAny[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventRegisterAny]
|
791
|
+
* Call virConnectDomainEventRegisterAny[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventRegisterAny]
|
792
792
|
* to register callback for eventID with libvirt. The eventID must be one of
|
793
793
|
* the Libvirt::Connect::DOMAIN_EVENT_ID_* constants. The callback can either
|
794
794
|
* be a Symbol (that is the name of a method to callback) or a Proc. Note that
|
@@ -873,7 +873,7 @@ static VALUE libvirt_connect_domain_event_register_any(int argc, VALUE *argv,
|
|
873
873
|
* call-seq:
|
874
874
|
* conn.domain_event_deregister_any(callbackID) -> nil
|
875
875
|
*
|
876
|
-
* Call virConnectDomainEventDeregisterAny[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventDeregisterAny]
|
876
|
+
* Call virConnectDomainEventDeregisterAny[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventDeregisterAny]
|
877
877
|
* to deregister a callback from libvirt. The callbackID must be a
|
878
878
|
* libvirt-specific handle returned by domain_event_register_any.
|
879
879
|
*/
|
@@ -905,7 +905,7 @@ static int domain_event_callback(virConnectPtr conn,
|
|
905
905
|
* call-seq:
|
906
906
|
* conn.domain_event_register(callback, opaque=nil) -> nil
|
907
907
|
*
|
908
|
-
* Call virConnectDomainEventRegister[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventRegister]
|
908
|
+
* Call virConnectDomainEventRegister[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventRegister]
|
909
909
|
* to register callback for domain lifecycle events with libvirt. The
|
910
910
|
* callback can either be a Symbol (that is the name of a method to callback)
|
911
911
|
* or a Proc. The callback must accept 5 parameters: Libvirt::Connect,
|
@@ -941,7 +941,7 @@ static VALUE libvirt_connect_domain_event_register(int argc, VALUE *argv,
|
|
941
941
|
* call-seq:
|
942
942
|
* conn.domain_event_deregister(callback) -> nil
|
943
943
|
*
|
944
|
-
* Call virConnectDomainEventDeregister[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainEventDeregister]
|
944
|
+
* Call virConnectDomainEventDeregister[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventDeregister]
|
945
945
|
* to deregister the event callback from libvirt. This method is deprecated
|
946
946
|
* in favor of domain_event_deregister_any (though they cannot be mixed; if
|
947
947
|
* the callback was registered with domain_event_register, it must be
|
@@ -958,9 +958,9 @@ static VALUE libvirt_connect_domain_event_deregister(VALUE c)
|
|
958
958
|
|
959
959
|
/*
|
960
960
|
* call-seq:
|
961
|
-
* conn.num_of_domains ->
|
961
|
+
* conn.num_of_domains -> Fixnum
|
962
962
|
*
|
963
|
-
* Call virConnectNumOfDomains[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDomains]
|
963
|
+
* Call virConnectNumOfDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectNumOfDomains]
|
964
964
|
* to retrieve the number of active domains on this connection.
|
965
965
|
*/
|
966
966
|
static VALUE libvirt_connect_num_of_domains(VALUE c)
|
@@ -972,7 +972,7 @@ static VALUE libvirt_connect_num_of_domains(VALUE c)
|
|
972
972
|
* call-seq:
|
973
973
|
* conn.list_domains -> list
|
974
974
|
*
|
975
|
-
* Call virConnectListDomains[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDomains]
|
975
|
+
* Call virConnectListDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectListDomains]
|
976
976
|
* to retrieve a list of active domain IDs on this connection.
|
977
977
|
*/
|
978
978
|
static VALUE libvirt_connect_list_domains(VALUE c)
|
@@ -1006,9 +1006,9 @@ static VALUE libvirt_connect_list_domains(VALUE c)
|
|
1006
1006
|
|
1007
1007
|
/*
|
1008
1008
|
* call-seq:
|
1009
|
-
* conn.num_of_defined_domains ->
|
1009
|
+
* conn.num_of_defined_domains -> Fixnum
|
1010
1010
|
*
|
1011
|
-
* Call virConnectNumOfDefinedDomains[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedDomains]
|
1011
|
+
* Call virConnectNumOfDefinedDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectNumOfDefinedDomains]
|
1012
1012
|
* to retrieve the number of inactive domains on this connection.
|
1013
1013
|
*/
|
1014
1014
|
static VALUE libvirt_connect_num_of_defined_domains(VALUE c)
|
@@ -1020,7 +1020,7 @@ static VALUE libvirt_connect_num_of_defined_domains(VALUE c)
|
|
1020
1020
|
* call-seq:
|
1021
1021
|
* conn.list_defined_domains -> list
|
1022
1022
|
*
|
1023
|
-
* Call virConnectListDefinedDomains[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedDomains]
|
1023
|
+
* Call virConnectListDefinedDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectListDefinedDomains]
|
1024
1024
|
* to retrieve a list of inactive domain names on this connection.
|
1025
1025
|
*/
|
1026
1026
|
static VALUE libvirt_connect_list_defined_domains(VALUE c)
|
@@ -1032,7 +1032,7 @@ static VALUE libvirt_connect_list_defined_domains(VALUE c)
|
|
1032
1032
|
* call-seq:
|
1033
1033
|
* conn.create_domain_linux(xml, flags=0) -> Libvirt::Domain
|
1034
1034
|
*
|
1035
|
-
* Call virDomainCreateLinux[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreateLinux]
|
1035
|
+
* Call virDomainCreateLinux[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateLinux]
|
1036
1036
|
* to start a transient domain from the given XML. Deprecated; use
|
1037
1037
|
* conn.create_domain_xml instead.
|
1038
1038
|
*/
|
@@ -1057,7 +1057,7 @@ static VALUE libvirt_connect_create_linux(int argc, VALUE *argv, VALUE c)
|
|
1057
1057
|
* call-seq:
|
1058
1058
|
* conn.create_domain_xml(xml, flags=0) -> Libvirt::Domain
|
1059
1059
|
*
|
1060
|
-
* Call virDomainCreateXML[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreateXML]
|
1060
|
+
* Call virDomainCreateXML[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXML]
|
1061
1061
|
* to start a transient domain from the given XML.
|
1062
1062
|
*/
|
1063
1063
|
static VALUE libvirt_connect_create_domain_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1080,7 +1080,7 @@ static VALUE libvirt_connect_create_domain_xml(int argc, VALUE *argv, VALUE c)
|
|
1080
1080
|
* call-seq:
|
1081
1081
|
* conn.lookup_domain_by_name(name) -> Libvirt::Domain
|
1082
1082
|
*
|
1083
|
-
* Call virDomainLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByName]
|
1083
|
+
* Call virDomainLookupByName[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByName]
|
1084
1084
|
* to retrieve a domain object for name.
|
1085
1085
|
*/
|
1086
1086
|
static VALUE libvirt_connect_lookup_domain_by_name(VALUE c, VALUE name)
|
@@ -1100,7 +1100,7 @@ static VALUE libvirt_connect_lookup_domain_by_name(VALUE c, VALUE name)
|
|
1100
1100
|
* call-seq:
|
1101
1101
|
* conn.lookup_domain_by_id(id) -> Libvirt::Domain
|
1102
1102
|
*
|
1103
|
-
* Call virDomainLookupByID[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByID]
|
1103
|
+
* Call virDomainLookupByID[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByID]
|
1104
1104
|
* to retrieve a domain object for id.
|
1105
1105
|
*/
|
1106
1106
|
static VALUE libvirt_connect_lookup_domain_by_id(VALUE c, VALUE id)
|
@@ -1119,7 +1119,7 @@ static VALUE libvirt_connect_lookup_domain_by_id(VALUE c, VALUE id)
|
|
1119
1119
|
* call-seq:
|
1120
1120
|
* conn.lookup_domain_by_uuid(uuid) -> Libvirt::Domain
|
1121
1121
|
*
|
1122
|
-
* Call virDomainLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainLookupByUUIDString]
|
1122
|
+
* Call virDomainLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString]
|
1123
1123
|
* to retrieve a domain object for uuid.
|
1124
1124
|
*/
|
1125
1125
|
static VALUE libvirt_connect_lookup_domain_by_uuid(VALUE c, VALUE uuid)
|
@@ -1137,16 +1137,30 @@ static VALUE libvirt_connect_lookup_domain_by_uuid(VALUE c, VALUE uuid)
|
|
1137
1137
|
|
1138
1138
|
/*
|
1139
1139
|
* call-seq:
|
1140
|
-
* conn.define_domain_xml(xml) -> Libvirt::Domain
|
1140
|
+
* conn.define_domain_xml(xml, flags=0) -> Libvirt::Domain
|
1141
1141
|
*
|
1142
|
-
* Call virDomainDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainDefineXML]
|
1142
|
+
* Call virDomainDefineXML[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainDefineXML]
|
1143
1143
|
* to define a permanent domain on this connection.
|
1144
1144
|
*/
|
1145
|
-
static VALUE libvirt_connect_define_domain_xml(VALUE
|
1145
|
+
static VALUE libvirt_connect_define_domain_xml(int argc, VALUE *argv, VALUE c)
|
1146
1146
|
{
|
1147
1147
|
virDomainPtr dom;
|
1148
|
+
VALUE xml;
|
1149
|
+
VALUE flags;
|
1150
|
+
|
1151
|
+
rb_scan_args(argc, argv, "11", &xml, &flags);
|
1148
1152
|
|
1153
|
+
#if HAVE_VIRDOMAINDEFINEXMLFLAGS
|
1154
|
+
dom = virDomainDefineXMLFlags(ruby_libvirt_connect_get(c),
|
1155
|
+
StringValueCStr(xml),
|
1156
|
+
ruby_libvirt_value_to_uint(flags));
|
1157
|
+
#else
|
1158
|
+
if (ruby_libvirt_value_to_uint(flags) != 0) {
|
1159
|
+
rb_raise(e_NoSupportError, "Non-zero flags not supported");
|
1160
|
+
}
|
1149
1161
|
dom = virDomainDefineXML(ruby_libvirt_connect_get(c), StringValueCStr(xml));
|
1162
|
+
#endif
|
1163
|
+
|
1150
1164
|
ruby_libvirt_raise_error_if(dom == NULL, e_DefinitionError,
|
1151
1165
|
"virDomainDefineXML",
|
1152
1166
|
ruby_libvirt_connect_get(c));
|
@@ -1157,9 +1171,9 @@ static VALUE libvirt_connect_define_domain_xml(VALUE c, VALUE xml)
|
|
1157
1171
|
#if HAVE_VIRCONNECTDOMAINXMLFROMNATIVE
|
1158
1172
|
/*
|
1159
1173
|
* call-seq:
|
1160
|
-
* conn.domain_xml_from_native(nativeFormat, xml, flags=0) ->
|
1174
|
+
* conn.domain_xml_from_native(nativeFormat, xml, flags=0) -> String
|
1161
1175
|
*
|
1162
|
-
* Call virConnectDomainXMLFromNative[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainXMLFromNative]
|
1176
|
+
* Call virConnectDomainXMLFromNative[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainXMLFromNative]
|
1163
1177
|
* to convert a native hypervisor domain representation to libvirt XML.
|
1164
1178
|
*/
|
1165
1179
|
static VALUE libvirt_connect_domain_xml_from_native(int argc, VALUE *argv,
|
@@ -1181,9 +1195,9 @@ static VALUE libvirt_connect_domain_xml_from_native(int argc, VALUE *argv,
|
|
1181
1195
|
#if HAVE_VIRCONNECTDOMAINXMLTONATIVE
|
1182
1196
|
/*
|
1183
1197
|
* call-seq:
|
1184
|
-
* conn.domain_xml_to_native(nativeFormat, xml, flags=0) ->
|
1198
|
+
* conn.domain_xml_to_native(nativeFormat, xml, flags=0) -> String
|
1185
1199
|
*
|
1186
|
-
* Call virConnectDomainXMLToNative[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectDomainXMLToNative]
|
1200
|
+
* Call virConnectDomainXMLToNative[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainXMLToNative]
|
1187
1201
|
* to convert libvirt XML to a native domain hypervisor representation.
|
1188
1202
|
*/
|
1189
1203
|
static VALUE libvirt_connect_domain_xml_to_native(int argc, VALUE *argv,
|
@@ -1205,9 +1219,9 @@ static VALUE libvirt_connect_domain_xml_to_native(int argc, VALUE *argv,
|
|
1205
1219
|
#if HAVE_TYPE_VIRINTERFACEPTR
|
1206
1220
|
/*
|
1207
1221
|
* call-seq:
|
1208
|
-
* conn.num_of_interfaces ->
|
1222
|
+
* conn.num_of_interfaces -> Fixnum
|
1209
1223
|
*
|
1210
|
-
* Call virConnectNumOfInterfaces[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfInterfaces]
|
1224
|
+
* Call virConnectNumOfInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectNumOfInterfaces]
|
1211
1225
|
* to retrieve the number of active interfaces on this connection.
|
1212
1226
|
*/
|
1213
1227
|
static VALUE libvirt_connect_num_of_interfaces(VALUE c)
|
@@ -1219,7 +1233,7 @@ static VALUE libvirt_connect_num_of_interfaces(VALUE c)
|
|
1219
1233
|
* call-seq:
|
1220
1234
|
* conn.list_interfaces -> list
|
1221
1235
|
*
|
1222
|
-
* Call virConnectListInterfaces[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListInterfaces]
|
1236
|
+
* Call virConnectListInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectListInterfaces]
|
1223
1237
|
* to retrieve a list of active interface names on this connection.
|
1224
1238
|
*/
|
1225
1239
|
static VALUE libvirt_connect_list_interfaces(VALUE c)
|
@@ -1229,9 +1243,9 @@ static VALUE libvirt_connect_list_interfaces(VALUE c)
|
|
1229
1243
|
|
1230
1244
|
/*
|
1231
1245
|
* call-seq:
|
1232
|
-
* conn.num_of_defined_interfaces ->
|
1246
|
+
* conn.num_of_defined_interfaces -> Fixnum
|
1233
1247
|
*
|
1234
|
-
* Call virConnectNumOfDefinedInterfaces[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedInterfaces]
|
1248
|
+
* Call virConnectNumOfDefinedInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectNumOfDefinedInterfaces]
|
1235
1249
|
* to retrieve the number of inactive interfaces on this connection.
|
1236
1250
|
*/
|
1237
1251
|
static VALUE libvirt_connect_num_of_defined_interfaces(VALUE c)
|
@@ -1243,7 +1257,7 @@ static VALUE libvirt_connect_num_of_defined_interfaces(VALUE c)
|
|
1243
1257
|
* call-seq:
|
1244
1258
|
* conn.list_defined_interfaces -> list
|
1245
1259
|
*
|
1246
|
-
* Call virConnectListDefinedInterfaces[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedInterfaces]
|
1260
|
+
* Call virConnectListDefinedInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectListDefinedInterfaces]
|
1247
1261
|
* to retrieve a list of inactive interface names on this connection.
|
1248
1262
|
*/
|
1249
1263
|
static VALUE libvirt_connect_list_defined_interfaces(VALUE c)
|
@@ -1255,7 +1269,7 @@ static VALUE libvirt_connect_list_defined_interfaces(VALUE c)
|
|
1255
1269
|
* call-seq:
|
1256
1270
|
* conn.lookup_interface_by_name(name) -> Libvirt::Interface
|
1257
1271
|
*
|
1258
|
-
* Call virInterfaceLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceLookupByName]
|
1272
|
+
* Call virInterfaceLookupByName[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceLookupByName]
|
1259
1273
|
* to retrieve an interface object by name.
|
1260
1274
|
*/
|
1261
1275
|
static VALUE libvirt_connect_lookup_interface_by_name(VALUE c, VALUE name)
|
@@ -1275,7 +1289,7 @@ static VALUE libvirt_connect_lookup_interface_by_name(VALUE c, VALUE name)
|
|
1275
1289
|
* call-seq:
|
1276
1290
|
* conn.lookup_interface_by_mac(mac) -> Libvirt::Interface
|
1277
1291
|
*
|
1278
|
-
* Call virInterfaceLookupByMACString[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceLookupByMACString]
|
1292
|
+
* Call virInterfaceLookupByMACString[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceLookupByMACString]
|
1279
1293
|
* to retrieve an interface object by MAC address.
|
1280
1294
|
*/
|
1281
1295
|
static VALUE libvirt_connect_lookup_interface_by_mac(VALUE c, VALUE mac)
|
@@ -1295,7 +1309,7 @@ static VALUE libvirt_connect_lookup_interface_by_mac(VALUE c, VALUE mac)
|
|
1295
1309
|
* call-seq:
|
1296
1310
|
* conn.define_interface_xml(xml, flags=0) -> Libvirt::Interface
|
1297
1311
|
*
|
1298
|
-
* Call virInterfaceDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceDefineXML]
|
1312
|
+
* Call virInterfaceDefineXML[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefineXML]
|
1299
1313
|
* to define a new interface from xml.
|
1300
1314
|
*/
|
1301
1315
|
static VALUE libvirt_connect_define_interface_xml(int argc, VALUE *argv,
|
@@ -1319,9 +1333,9 @@ static VALUE libvirt_connect_define_interface_xml(int argc, VALUE *argv,
|
|
1319
1333
|
|
1320
1334
|
/*
|
1321
1335
|
* call-seq:
|
1322
|
-
* conn.num_of_networks ->
|
1336
|
+
* conn.num_of_networks -> Fixnum
|
1323
1337
|
*
|
1324
|
-
* Call virConnectNumOfNetworks[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfNetworks]
|
1338
|
+
* Call virConnectNumOfNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectNumOfNetworks]
|
1325
1339
|
* to retrieve the number of active networks on this connection.
|
1326
1340
|
*/
|
1327
1341
|
static VALUE libvirt_connect_num_of_networks(VALUE c)
|
@@ -1333,7 +1347,7 @@ static VALUE libvirt_connect_num_of_networks(VALUE c)
|
|
1333
1347
|
* call-seq:
|
1334
1348
|
* conn.list_networks -> list
|
1335
1349
|
*
|
1336
|
-
* Call virConnectListNetworks[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListNetworks]
|
1350
|
+
* Call virConnectListNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectListNetworks]
|
1337
1351
|
* to retrieve a list of active network names on this connection.
|
1338
1352
|
*/
|
1339
1353
|
static VALUE libvirt_connect_list_networks(VALUE c)
|
@@ -1343,9 +1357,9 @@ static VALUE libvirt_connect_list_networks(VALUE c)
|
|
1343
1357
|
|
1344
1358
|
/*
|
1345
1359
|
* call-seq:
|
1346
|
-
* conn.num_of_defined_networks ->
|
1360
|
+
* conn.num_of_defined_networks -> Fixnum
|
1347
1361
|
*
|
1348
|
-
* Call virConnectNumOfDefinedNetworks[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedNetworks]
|
1362
|
+
* Call virConnectNumOfDefinedNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectNumOfDefinedNetworks]
|
1349
1363
|
* to retrieve the number of inactive networks on this connection.
|
1350
1364
|
*/
|
1351
1365
|
static VALUE libvirt_connect_num_of_defined_networks(VALUE c)
|
@@ -1357,7 +1371,7 @@ static VALUE libvirt_connect_num_of_defined_networks(VALUE c)
|
|
1357
1371
|
* call-seq:
|
1358
1372
|
* conn.list_of_defined_networks -> list
|
1359
1373
|
*
|
1360
|
-
* Call virConnectListDefinedNetworks[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedNetworks]
|
1374
|
+
* Call virConnectListDefinedNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectListDefinedNetworks]
|
1361
1375
|
* to retrieve a list of inactive network names on this connection.
|
1362
1376
|
*/
|
1363
1377
|
static VALUE libvirt_connect_list_defined_networks(VALUE c)
|
@@ -1369,7 +1383,7 @@ static VALUE libvirt_connect_list_defined_networks(VALUE c)
|
|
1369
1383
|
* call-seq:
|
1370
1384
|
* conn.lookup_network_by_name(name) -> Libvirt::Network
|
1371
1385
|
*
|
1372
|
-
* Call virNetworkLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByName]
|
1386
|
+
* Call virNetworkLookupByName[http://www.libvirt.org/html/libvirt-libvirt-network.html#virNetworkLookupByName]
|
1373
1387
|
* to retrieve a network object by name.
|
1374
1388
|
*/
|
1375
1389
|
static VALUE libvirt_connect_lookup_network_by_name(VALUE c, VALUE name)
|
@@ -1389,7 +1403,7 @@ static VALUE libvirt_connect_lookup_network_by_name(VALUE c, VALUE name)
|
|
1389
1403
|
* call-seq:
|
1390
1404
|
* conn.lookup_network_by_uuid(uuid) -> Libvirt::Network
|
1391
1405
|
*
|
1392
|
-
* Call virNetworkLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkLookupByUUIDString]
|
1406
|
+
* Call virNetworkLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt-network.html#virNetworkLookupByUUIDString]
|
1393
1407
|
* to retrieve a network object by UUID.
|
1394
1408
|
*/
|
1395
1409
|
static VALUE libvirt_connect_lookup_network_by_uuid(VALUE c, VALUE uuid)
|
@@ -1409,7 +1423,7 @@ static VALUE libvirt_connect_lookup_network_by_uuid(VALUE c, VALUE uuid)
|
|
1409
1423
|
* call-seq:
|
1410
1424
|
* conn.create_network_xml(xml) -> Libvirt::Network
|
1411
1425
|
*
|
1412
|
-
* Call virNetworkCreateXML[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkCreateXML]
|
1426
|
+
* Call virNetworkCreateXML[http://www.libvirt.org/html/libvirt-libvirt-network.html#virNetworkCreateXML]
|
1413
1427
|
* to start a new transient network from xml.
|
1414
1428
|
*/
|
1415
1429
|
static VALUE libvirt_connect_create_network_xml(VALUE c, VALUE xml)
|
@@ -1428,7 +1442,7 @@ static VALUE libvirt_connect_create_network_xml(VALUE c, VALUE xml)
|
|
1428
1442
|
* call-seq:
|
1429
1443
|
* conn.define_network_xml(xml) -> Libvirt::Network
|
1430
1444
|
*
|
1431
|
-
* Call virNetworkDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virNetworkDefineXML]
|
1445
|
+
* Call virNetworkDefineXML[http://www.libvirt.org/html/libvirt-libvirt-network.html#virNetworkDefineXML]
|
1432
1446
|
* to define a new permanent network from xml.
|
1433
1447
|
*/
|
1434
1448
|
static VALUE libvirt_connect_define_network_xml(VALUE c, VALUE xml)
|
@@ -1448,9 +1462,9 @@ static VALUE libvirt_connect_define_network_xml(VALUE c, VALUE xml)
|
|
1448
1462
|
|
1449
1463
|
/*
|
1450
1464
|
* call-seq:
|
1451
|
-
* conn.num_of_nodedevices(cap=nil, flags=0) ->
|
1465
|
+
* conn.num_of_nodedevices(cap=nil, flags=0) -> Fixnum
|
1452
1466
|
*
|
1453
|
-
* Call virNodeNumOfDevices[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeNumOfDevices]
|
1467
|
+
* Call virNodeNumOfDevices[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeNumOfDevices]
|
1454
1468
|
* to retrieve the number of node devices on this connection.
|
1455
1469
|
*/
|
1456
1470
|
static VALUE libvirt_connect_num_of_nodedevices(int argc, VALUE *argv, VALUE c)
|
@@ -1474,7 +1488,7 @@ static VALUE libvirt_connect_num_of_nodedevices(int argc, VALUE *argv, VALUE c)
|
|
1474
1488
|
* call-seq:
|
1475
1489
|
* conn.list_nodedevices(cap=nil, flags=0) -> list
|
1476
1490
|
*
|
1477
|
-
* Call virNodeListDevices[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeListDevices]
|
1491
|
+
* Call virNodeListDevices[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeListDevices]
|
1478
1492
|
* to retrieve a list of node device names on this connection.
|
1479
1493
|
*/
|
1480
1494
|
static VALUE libvirt_connect_list_nodedevices(int argc, VALUE *argv, VALUE c)
|
@@ -1515,7 +1529,7 @@ static VALUE libvirt_connect_list_nodedevices(int argc, VALUE *argv, VALUE c)
|
|
1515
1529
|
* call-seq:
|
1516
1530
|
* conn.lookup_nodedevice_by_name(name) -> Libvirt::NodeDevice
|
1517
1531
|
*
|
1518
|
-
* Call virNodeDeviceLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeDeviceLookupByName]
|
1532
|
+
* Call virNodeDeviceLookupByName[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceLookupByName]
|
1519
1533
|
* to retrieve a nodedevice object by name.
|
1520
1534
|
*/
|
1521
1535
|
static VALUE libvirt_connect_lookup_nodedevice_by_name(VALUE c, VALUE name)
|
@@ -1537,7 +1551,7 @@ static VALUE libvirt_connect_lookup_nodedevice_by_name(VALUE c, VALUE name)
|
|
1537
1551
|
* call-seq:
|
1538
1552
|
* conn.create_nodedevice_xml(xml, flags=0) -> Libvirt::NodeDevice
|
1539
1553
|
*
|
1540
|
-
* Call virNodeDeviceCreateXML[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeDeviceCreateXML]
|
1554
|
+
* Call virNodeDeviceCreateXML[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceCreateXML]
|
1541
1555
|
* to create a new node device from xml.
|
1542
1556
|
*/
|
1543
1557
|
static VALUE libvirt_connect_create_nodedevice_xml(int argc, VALUE *argv,
|
@@ -1564,9 +1578,9 @@ static VALUE libvirt_connect_create_nodedevice_xml(int argc, VALUE *argv,
|
|
1564
1578
|
|
1565
1579
|
/*
|
1566
1580
|
* call-seq:
|
1567
|
-
* conn.num_of_nwfilters ->
|
1581
|
+
* conn.num_of_nwfilters -> Fixnum
|
1568
1582
|
*
|
1569
|
-
* Call virConnectNumOfNWFilters[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfNWFilters]
|
1583
|
+
* Call virConnectNumOfNWFilters[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectNumOfNWFilters]
|
1570
1584
|
* to retrieve the number of network filters on this connection.
|
1571
1585
|
*/
|
1572
1586
|
static VALUE libvirt_connect_num_of_nwfilters(VALUE c)
|
@@ -1578,7 +1592,7 @@ static VALUE libvirt_connect_num_of_nwfilters(VALUE c)
|
|
1578
1592
|
* call-seq:
|
1579
1593
|
* conn.list_nwfilters -> list
|
1580
1594
|
*
|
1581
|
-
* Call virConnectListNWFilters[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListNWFilters]
|
1595
|
+
* Call virConnectListNWFilters[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListNWFilters]
|
1582
1596
|
* to retrieve a list of network filter names on this connection.
|
1583
1597
|
*/
|
1584
1598
|
static VALUE libvirt_connect_list_nwfilters(VALUE c)
|
@@ -1590,7 +1604,7 @@ static VALUE libvirt_connect_list_nwfilters(VALUE c)
|
|
1590
1604
|
* call-seq:
|
1591
1605
|
* conn.lookup_nwfilter_by_name(name) -> Libvirt::NWFilter
|
1592
1606
|
*
|
1593
|
-
* Call virNWFilterLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterLookupByName]
|
1607
|
+
* Call virNWFilterLookupByName[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterLookupByName]
|
1594
1608
|
* to retrieve a network filter object by name.
|
1595
1609
|
*/
|
1596
1610
|
static VALUE libvirt_connect_lookup_nwfilter_by_name(VALUE c, VALUE name)
|
@@ -1610,7 +1624,7 @@ static VALUE libvirt_connect_lookup_nwfilter_by_name(VALUE c, VALUE name)
|
|
1610
1624
|
* call-seq:
|
1611
1625
|
* conn.lookup_nwfilter_by_uuid(uuid) -> Libvirt::NWFilter
|
1612
1626
|
*
|
1613
|
-
* Call virNWFilterLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterLookupByUUIDString]
|
1627
|
+
* Call virNWFilterLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterLookupByUUIDString]
|
1614
1628
|
* to retrieve a network filter object by UUID.
|
1615
1629
|
*/
|
1616
1630
|
static VALUE libvirt_connect_lookup_nwfilter_by_uuid(VALUE c, VALUE uuid)
|
@@ -1630,7 +1644,7 @@ static VALUE libvirt_connect_lookup_nwfilter_by_uuid(VALUE c, VALUE uuid)
|
|
1630
1644
|
* call-seq:
|
1631
1645
|
* conn.define_nwfilter_xml(xml) -> Libvirt::NWFilter
|
1632
1646
|
*
|
1633
|
-
* Call virNWFilterDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virNWFilterDefineXML]
|
1647
|
+
* Call virNWFilterDefineXML[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterDefineXML]
|
1634
1648
|
* to define a new network filter from xml.
|
1635
1649
|
*/
|
1636
1650
|
static VALUE libvirt_connect_define_nwfilter_xml(VALUE c, VALUE xml)
|
@@ -1651,9 +1665,9 @@ static VALUE libvirt_connect_define_nwfilter_xml(VALUE c, VALUE xml)
|
|
1651
1665
|
|
1652
1666
|
/*
|
1653
1667
|
* call-seq:
|
1654
|
-
* conn.num_of_secrets ->
|
1668
|
+
* conn.num_of_secrets -> Fixnum
|
1655
1669
|
*
|
1656
|
-
* Call virConnectNumOfSecrets[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfSecrets]
|
1670
|
+
* Call virConnectNumOfSecrets[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virConnectNumOfSecrets]
|
1657
1671
|
* to retrieve the number of secrets on this connection.
|
1658
1672
|
*/
|
1659
1673
|
static VALUE libvirt_connect_num_of_secrets(VALUE c)
|
@@ -1665,7 +1679,7 @@ static VALUE libvirt_connect_num_of_secrets(VALUE c)
|
|
1665
1679
|
* call-seq:
|
1666
1680
|
* conn.list_secrets -> list
|
1667
1681
|
*
|
1668
|
-
* Call virConnectListSecrets[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListSecrets]
|
1682
|
+
* Call virConnectListSecrets[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virConnectListSecrets]
|
1669
1683
|
* to retrieve a list of secret UUIDs on this connection.
|
1670
1684
|
*/
|
1671
1685
|
static VALUE libvirt_connect_list_secrets(VALUE c)
|
@@ -1677,7 +1691,7 @@ static VALUE libvirt_connect_list_secrets(VALUE c)
|
|
1677
1691
|
* call-seq:
|
1678
1692
|
* conn.lookup_secret_by_uuid(uuid) -> Libvirt::Secret
|
1679
1693
|
*
|
1680
|
-
* Call virSecretLookupByUUID[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretLookupByUUID]
|
1694
|
+
* Call virSecretLookupByUUID[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virSecretLookupByUUID]
|
1681
1695
|
* to retrieve a network object from uuid.
|
1682
1696
|
*/
|
1683
1697
|
static VALUE libvirt_connect_lookup_secret_by_uuid(VALUE c, VALUE uuid)
|
@@ -1697,7 +1711,7 @@ static VALUE libvirt_connect_lookup_secret_by_uuid(VALUE c, VALUE uuid)
|
|
1697
1711
|
* call-seq:
|
1698
1712
|
* conn.lookup_secret_by_usage(usagetype, usageID) -> Libvirt::Secret
|
1699
1713
|
*
|
1700
|
-
* Call virSecretLookupByUsage[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretLookupByUsage]
|
1714
|
+
* Call virSecretLookupByUsage[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virSecretLookupByUsage]
|
1701
1715
|
* to retrieve a secret by usagetype.
|
1702
1716
|
*/
|
1703
1717
|
static VALUE libvirt_connect_lookup_secret_by_usage(VALUE c, VALUE usagetype,
|
@@ -1719,7 +1733,7 @@ static VALUE libvirt_connect_lookup_secret_by_usage(VALUE c, VALUE usagetype,
|
|
1719
1733
|
* call-seq:
|
1720
1734
|
* conn.define_secret_xml(xml, flags=0) -> Libvirt::Secret
|
1721
1735
|
*
|
1722
|
-
* Call virSecretDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virSecretDefineXML]
|
1736
|
+
* Call virSecretDefineXML[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virSecretDefineXML]
|
1723
1737
|
* to define a new secret from xml.
|
1724
1738
|
*/
|
1725
1739
|
static VALUE libvirt_connect_define_secret_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1748,7 +1762,7 @@ VALUE pool_new(virStoragePoolPtr n, VALUE conn);
|
|
1748
1762
|
* call-seq:
|
1749
1763
|
* conn.list_storage_pools -> list
|
1750
1764
|
*
|
1751
|
-
* Call virConnectListStoragePools[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListStoragePools]
|
1765
|
+
* Call virConnectListStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectListStoragePools]
|
1752
1766
|
* to retrieve a list of active storage pool names on this connection.
|
1753
1767
|
*/
|
1754
1768
|
static VALUE libvirt_connect_list_storage_pools(VALUE c)
|
@@ -1758,9 +1772,9 @@ static VALUE libvirt_connect_list_storage_pools(VALUE c)
|
|
1758
1772
|
|
1759
1773
|
/*
|
1760
1774
|
* call-seq:
|
1761
|
-
* conn.num_of_storage_pools ->
|
1775
|
+
* conn.num_of_storage_pools -> Fixnum
|
1762
1776
|
*
|
1763
|
-
* Call virConnectNumOfStoragePools[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfStoragePools]
|
1777
|
+
* Call virConnectNumOfStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectNumOfStoragePools]
|
1764
1778
|
* to retrieve the number of active storage pools on this connection.
|
1765
1779
|
*/
|
1766
1780
|
static VALUE libvirt_connect_num_of_storage_pools(VALUE c)
|
@@ -1772,7 +1786,7 @@ static VALUE libvirt_connect_num_of_storage_pools(VALUE c)
|
|
1772
1786
|
* call-seq:
|
1773
1787
|
* conn.list_defined_storage_pools -> list
|
1774
1788
|
*
|
1775
|
-
* Call virConnectListDefinedStoragePools[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListDefinedStoragePools]
|
1789
|
+
* Call virConnectListDefinedStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectListDefinedStoragePools]
|
1776
1790
|
* to retrieve a list of inactive storage pool names on this connection.
|
1777
1791
|
*/
|
1778
1792
|
static VALUE libvirt_connect_list_defined_storage_pools(VALUE c)
|
@@ -1782,9 +1796,9 @@ static VALUE libvirt_connect_list_defined_storage_pools(VALUE c)
|
|
1782
1796
|
|
1783
1797
|
/*
|
1784
1798
|
* call-seq:
|
1785
|
-
* conn.num_of_defined_storage_pools ->
|
1799
|
+
* conn.num_of_defined_storage_pools -> Fixnum
|
1786
1800
|
*
|
1787
|
-
* Call virConnectNumOfDefinedStoragePools[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectNumOfDefinedStoragePools]
|
1801
|
+
* Call virConnectNumOfDefinedStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectNumOfDefinedStoragePools]
|
1788
1802
|
* to retrieve the number of inactive storage pools on this connection.
|
1789
1803
|
*/
|
1790
1804
|
static VALUE libvirt_connect_num_of_defined_storage_pools(VALUE c)
|
@@ -1796,7 +1810,7 @@ static VALUE libvirt_connect_num_of_defined_storage_pools(VALUE c)
|
|
1796
1810
|
* call-seq:
|
1797
1811
|
* conn.lookup_storage_pool_by_name(name) -> Libvirt::StoragePool
|
1798
1812
|
*
|
1799
|
-
* Call virStoragePoolLookupByName[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolLookupByName]
|
1813
|
+
* Call virStoragePoolLookupByName[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolLookupByName]
|
1800
1814
|
* to retrieve a storage pool object by name.
|
1801
1815
|
*/
|
1802
1816
|
static VALUE libvirt_connect_lookup_pool_by_name(VALUE c, VALUE name)
|
@@ -1816,7 +1830,7 @@ static VALUE libvirt_connect_lookup_pool_by_name(VALUE c, VALUE name)
|
|
1816
1830
|
* call-seq:
|
1817
1831
|
* conn.lookup_storage_pool_by_uuid(uuid) -> Libvirt::StoragePool
|
1818
1832
|
*
|
1819
|
-
* Call virStoragePoolLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolLookupByUUIDString]
|
1833
|
+
* Call virStoragePoolLookupByUUIDString[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolLookupByUUIDString]
|
1820
1834
|
* to retrieve a storage pool object by uuid.
|
1821
1835
|
*/
|
1822
1836
|
static VALUE libvirt_connect_lookup_pool_by_uuid(VALUE c, VALUE uuid)
|
@@ -1836,7 +1850,7 @@ static VALUE libvirt_connect_lookup_pool_by_uuid(VALUE c, VALUE uuid)
|
|
1836
1850
|
* call-seq:
|
1837
1851
|
* conn.create_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
|
1838
1852
|
*
|
1839
|
-
* Call virStoragePoolCreateXML[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolCreateXML]
|
1853
|
+
* Call virStoragePoolCreateXML[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolCreateXML]
|
1840
1854
|
* to start a new transient storage pool from xml.
|
1841
1855
|
*/
|
1842
1856
|
static VALUE libvirt_connect_create_pool_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1860,7 +1874,7 @@ static VALUE libvirt_connect_create_pool_xml(int argc, VALUE *argv, VALUE c)
|
|
1860
1874
|
* call-seq:
|
1861
1875
|
* conn.define_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
|
1862
1876
|
*
|
1863
|
-
* Call virStoragePoolDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virStoragePoolDefineXML]
|
1877
|
+
* Call virStoragePoolDefineXML[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolDefineXML]
|
1864
1878
|
* to define a permanent storage pool from xml.
|
1865
1879
|
*/
|
1866
1880
|
static VALUE libvirt_connect_define_pool_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1882,9 +1896,9 @@ static VALUE libvirt_connect_define_pool_xml(int argc, VALUE *argv, VALUE c)
|
|
1882
1896
|
|
1883
1897
|
/*
|
1884
1898
|
* call-seq:
|
1885
|
-
* conn.discover_storage_pool_sources(type, srcSpec=nil, flags=0) ->
|
1899
|
+
* conn.discover_storage_pool_sources(type, srcSpec=nil, flags=0) -> String
|
1886
1900
|
*
|
1887
|
-
* Call virConnectFindStoragePoolSources[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectFindStoragePoolSources]
|
1901
|
+
* Call virConnectFindStoragePoolSources[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectFindStoragePoolSources]
|
1888
1902
|
* to find the storage pool sources corresponding to type.
|
1889
1903
|
*/
|
1890
1904
|
static VALUE libvirt_connect_find_storage_pool_sources(int argc, VALUE *argv,
|
@@ -1906,9 +1920,9 @@ static VALUE libvirt_connect_find_storage_pool_sources(int argc, VALUE *argv,
|
|
1906
1920
|
#if HAVE_VIRCONNECTGETSYSINFO
|
1907
1921
|
/*
|
1908
1922
|
* call-seq:
|
1909
|
-
* conn.sys_info(flags=0) ->
|
1923
|
+
* conn.sys_info(flags=0) -> String
|
1910
1924
|
*
|
1911
|
-
* Call virConnectGetSysinfo[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetSysinfo]
|
1925
|
+
* Call virConnectGetSysinfo[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetSysinfo]
|
1912
1926
|
* to get machine-specific information about the hypervisor. This may include
|
1913
1927
|
* data such as the host UUID, the BIOS version, etc.
|
1914
1928
|
*/
|
@@ -1931,7 +1945,7 @@ static VALUE libvirt_connect_sys_info(int argc, VALUE *argv, VALUE c)
|
|
1931
1945
|
* call-seq:
|
1932
1946
|
* conn.stream(flags=0) -> Libvirt::Stream
|
1933
1947
|
*
|
1934
|
-
* Call virStreamNew[http://www.libvirt.org/html/libvirt-libvirt.html#virStreamNew]
|
1948
|
+
* Call virStreamNew[http://www.libvirt.org/html/libvirt-libvirt-stream.html#virStreamNew]
|
1935
1949
|
* to create a new stream.
|
1936
1950
|
*/
|
1937
1951
|
static VALUE libvirt_connect_stream(int argc, VALUE *argv, VALUE c)
|
@@ -1956,7 +1970,7 @@ static VALUE libvirt_connect_stream(int argc, VALUE *argv, VALUE c)
|
|
1956
1970
|
* call-seq:
|
1957
1971
|
* conn.interface_change_begin(flags=0) -> nil
|
1958
1972
|
*
|
1959
|
-
* Call virInterfaceChangeBegin[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeBegin]
|
1973
|
+
* Call virInterfaceChangeBegin[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeBegin]
|
1960
1974
|
* to create a restore point for interface changes. Once changes have been
|
1961
1975
|
* made, conn.interface_change_commit can be used to commit the result or
|
1962
1976
|
* conn.interface_change_rollback can be used to rollback to this restore point.
|
@@ -1978,7 +1992,7 @@ static VALUE libvirt_connect_interface_change_begin(int argc, VALUE *argv,
|
|
1978
1992
|
* call-seq:
|
1979
1993
|
* conn.interface_change_commit(flags=0) -> nil
|
1980
1994
|
*
|
1981
|
-
* Call virInterfaceChangeCommit[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeCommit]
|
1995
|
+
* Call virInterfaceChangeCommit[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeCommit]
|
1982
1996
|
* to commit the interface changes since the last conn.interface_change_begin.
|
1983
1997
|
*/
|
1984
1998
|
static VALUE libvirt_connect_interface_change_commit(int argc, VALUE *argv,
|
@@ -1998,7 +2012,7 @@ static VALUE libvirt_connect_interface_change_commit(int argc, VALUE *argv,
|
|
1998
2012
|
* call-seq:
|
1999
2013
|
* conn.interface_change_rollback(flags=0) -> nil
|
2000
2014
|
*
|
2001
|
-
* Call virInterfaceChangeRollback[http://www.libvirt.org/html/libvirt-libvirt.html#virInterfaceChangeRollback]
|
2015
|
+
* Call virInterfaceChangeRollback[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeRollback]
|
2002
2016
|
* to rollback to the restore point saved by conn.interface_change_begin.
|
2003
2017
|
*/
|
2004
2018
|
static VALUE libvirt_connect_interface_change_rollback(int argc, VALUE *argv,
|
@@ -2055,7 +2069,7 @@ static const char *cpu_stats_get(VALUE d, unsigned int flags, void *voidparams,
|
|
2055
2069
|
* call-seq:
|
2056
2070
|
* conn.node_cpu_stats(cpuNum=-1, flags=0) -> Hash
|
2057
2071
|
*
|
2058
|
-
* Call virNodeGetCPUStats[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetCPUStats]
|
2072
|
+
* Call virNodeGetCPUStats[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUStats]
|
2059
2073
|
* to retrieve cpu statistics from the virtualization host.
|
2060
2074
|
*/
|
2061
2075
|
static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
|
@@ -2065,7 +2079,12 @@ static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
|
|
2065
2079
|
|
2066
2080
|
rb_scan_args(argc, argv, "02", &intparam, &flags);
|
2067
2081
|
|
2068
|
-
|
2082
|
+
if (NIL_P(intparam)) {
|
2083
|
+
tmp = -1;
|
2084
|
+
}
|
2085
|
+
else {
|
2086
|
+
tmp = ruby_libvirt_value_to_int(intparam);
|
2087
|
+
}
|
2069
2088
|
|
2070
2089
|
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
|
2071
2090
|
(void *)&tmp, sizeof(virNodeCPUStats),
|
@@ -2115,7 +2134,7 @@ static const char *memory_stats_get(VALUE d, unsigned int flags,
|
|
2115
2134
|
* call-seq:
|
2116
2135
|
* conn.node_memory_stats(cellNum=-1, flags=0) -> Hash
|
2117
2136
|
*
|
2118
|
-
* Call virNodeGetMemoryStats[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetMemoryStats]
|
2137
|
+
* Call virNodeGetMemoryStats[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryStats]
|
2119
2138
|
* to retrieve memory statistics from the virtualization host.
|
2120
2139
|
*/
|
2121
2140
|
static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
|
@@ -2125,7 +2144,12 @@ static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
|
|
2125
2144
|
|
2126
2145
|
rb_scan_args(argc, argv, "02", &intparam, &flags);
|
2127
2146
|
|
2128
|
-
|
2147
|
+
if (NIL_P(intparam)) {
|
2148
|
+
tmp = -1;
|
2149
|
+
}
|
2150
|
+
else {
|
2151
|
+
tmp = ruby_libvirt_value_to_int(intparam);
|
2152
|
+
}
|
2129
2153
|
|
2130
2154
|
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
|
2131
2155
|
(void *)&tmp, sizeof(virNodeMemoryStats),
|
@@ -2137,9 +2161,9 @@ static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
|
|
2137
2161
|
#if HAVE_VIRDOMAINSAVEIMAGEGETXMLDESC
|
2138
2162
|
/*
|
2139
2163
|
* call-seq:
|
2140
|
-
* conn.save_image_xml_desc(filename, flags=0) ->
|
2164
|
+
* conn.save_image_xml_desc(filename, flags=0) -> String
|
2141
2165
|
*
|
2142
|
-
* Call virDomainSaveImageGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSaveImageGetXMLDesc]
|
2166
|
+
* Call virDomainSaveImageGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageGetXMLDesc]
|
2143
2167
|
* to get the XML corresponding to a save file.
|
2144
2168
|
*/
|
2145
2169
|
static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
|
@@ -2159,7 +2183,7 @@ static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
|
|
2159
2183
|
* call-seq:
|
2160
2184
|
* conn.define_save_image_xml(filename, newxml, flags=0) -> nil
|
2161
2185
|
*
|
2162
|
-
* Call virDomainSaveImageDefineXML[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainSaveImageDefineXML]
|
2186
|
+
* Call virDomainSaveImageDefineXML[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageDefineXML]
|
2163
2187
|
* to define new XML for a saved image.
|
2164
2188
|
*/
|
2165
2189
|
static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
|
@@ -2183,7 +2207,7 @@ static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
|
|
2183
2207
|
* call-seq:
|
2184
2208
|
* conn.node_suspend_for_duration(target, duration, flags=0) -> nil
|
2185
2209
|
*
|
2186
|
-
* Call virNodeSuspendForDuration[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeSuspendForDuration]
|
2210
|
+
* Call virNodeSuspendForDuration[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeSuspendForDuration]
|
2187
2211
|
* to suspend the hypervisor for the specified duration.
|
2188
2212
|
*/
|
2189
2213
|
static VALUE libvirt_connect_node_suspend_for_duration(int argc, VALUE *argv,
|
@@ -2242,7 +2266,7 @@ static const char *node_memory_set(VALUE d, unsigned int flags,
|
|
2242
2266
|
* call-seq:
|
2243
2267
|
* conn.node_memory_parameters(flags=0) -> Hash
|
2244
2268
|
*
|
2245
|
-
* Call virNodeGetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetMemoryParameters]
|
2269
|
+
* Call virNodeGetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryParameters]
|
2246
2270
|
* to get information about memory on the host node.
|
2247
2271
|
*/
|
2248
2272
|
static VALUE libvirt_connect_node_memory_parameters(int argc, VALUE *argv,
|
@@ -2266,16 +2290,14 @@ static struct ruby_libvirt_typed_param memory_allowed[] = {
|
|
2266
2290
|
{VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED, VIR_TYPED_PARAM_ULLONG},
|
2267
2291
|
{VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE, VIR_TYPED_PARAM_ULLONG},
|
2268
2292
|
{VIR_NODE_MEMORY_SHARED_FULL_SCANS, VIR_TYPED_PARAM_ULLONG},
|
2269
|
-
#if HAVE_CONST_VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES
|
2270
2293
|
{VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES, VIR_TYPED_PARAM_UINT},
|
2271
|
-
#endif
|
2272
2294
|
};
|
2273
2295
|
|
2274
2296
|
/*
|
2275
2297
|
* call-seq:
|
2276
2298
|
* conn.node_memory_parameters = Hash,flags=0
|
2277
2299
|
*
|
2278
|
-
* Call virNodeSetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeSetMemoryParameters]
|
2300
|
+
* Call virNodeSetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeSetMemoryParameters]
|
2279
2301
|
* to set the memory parameters for this host node.
|
2280
2302
|
*/
|
2281
2303
|
static VALUE libvirt_connect_node_memory_parameters_equal(VALUE c, VALUE input)
|
@@ -2313,7 +2335,7 @@ static VALUE cpu_map_field_to_value(VALUE input)
|
|
2313
2335
|
* call-seq:
|
2314
2336
|
* conn.node_cpu_map -> Hash
|
2315
2337
|
*
|
2316
|
-
* Call virNodeGetCPUMap[http://www.libvirt.org/html/libvirt-libvirt.html#virNodeGetCPUMap]
|
2338
|
+
* Call virNodeGetCPUMap[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUMap]
|
2317
2339
|
* to get a map of online host CPUs.
|
2318
2340
|
*/
|
2319
2341
|
static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
|
@@ -2353,9 +2375,9 @@ static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
|
|
2353
2375
|
#if HAVE_VIRCONNECTSETKEEPALIVE
|
2354
2376
|
/*
|
2355
2377
|
* call-seq:
|
2356
|
-
* conn.set_keepalive(interval, count) ->
|
2378
|
+
* conn.set_keepalive(interval, count) -> Fixnum
|
2357
2379
|
*
|
2358
|
-
* Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectSetKeepAlive]
|
2380
|
+
* Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
|
2359
2381
|
* to start sending keepalive messages. Deprecated; use conn.keepalive=
|
2360
2382
|
* instead.
|
2361
2383
|
*/
|
@@ -2371,7 +2393,7 @@ static VALUE libvirt_connect_set_keepalive(VALUE c, VALUE interval, VALUE count)
|
|
2371
2393
|
* call-seq:
|
2372
2394
|
* conn.keepalive = interval,count
|
2373
2395
|
*
|
2374
|
-
* Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectSetKeepAlive]
|
2396
|
+
* Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
|
2375
2397
|
* to start sending keepalive messages.
|
2376
2398
|
*/
|
2377
2399
|
static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
|
@@ -2398,9 +2420,9 @@ static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
|
|
2398
2420
|
#if HAVE_VIRCONNECTLISTALLDOMAINS
|
2399
2421
|
/*
|
2400
2422
|
* call-seq:
|
2401
|
-
* conn.list_all_domains(flags=0) ->
|
2423
|
+
* conn.list_all_domains(flags=0) -> Array
|
2402
2424
|
*
|
2403
|
-
* Call virConnectListAllDomains[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllDomains]
|
2425
|
+
* Call virConnectListAllDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectListAllDomains]
|
2404
2426
|
* to get an array of domain objects for all domains.
|
2405
2427
|
*/
|
2406
2428
|
static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
|
@@ -2415,9 +2437,9 @@ static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
|
|
2415
2437
|
#if HAVE_VIRCONNECTLISTALLNETWORKS
|
2416
2438
|
/*
|
2417
2439
|
* call-seq:
|
2418
|
-
* conn.list_all_networks(flags=0) ->
|
2440
|
+
* conn.list_all_networks(flags=0) -> Array
|
2419
2441
|
*
|
2420
|
-
* Call virConnectListAllNetworks[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllNetworks]
|
2442
|
+
* Call virConnectListAllNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks]
|
2421
2443
|
* to get an array of network objects for all networks.
|
2422
2444
|
*/
|
2423
2445
|
static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
|
@@ -2433,9 +2455,9 @@ static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
|
|
2433
2455
|
#if HAVE_VIRCONNECTLISTALLINTERFACES
|
2434
2456
|
/*
|
2435
2457
|
* call-seq:
|
2436
|
-
* conn.list_all_interfaces(flags=0) ->
|
2458
|
+
* conn.list_all_interfaces(flags=0) -> Array
|
2437
2459
|
*
|
2438
|
-
* Call virConnectListAllInterfaces[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllInterfaces]
|
2460
|
+
* Call virConnectListAllInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectListAllInterfaces]
|
2439
2461
|
* to get an array of interface objects for all interfaces.
|
2440
2462
|
*/
|
2441
2463
|
static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
|
@@ -2451,9 +2473,9 @@ static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
|
|
2451
2473
|
#if HAVE_VIRCONNECTLISTALLSECRETS
|
2452
2474
|
/*
|
2453
2475
|
* call-seq:
|
2454
|
-
* conn.list_all_secrets(flags=0) ->
|
2476
|
+
* conn.list_all_secrets(flags=0) -> Array
|
2455
2477
|
*
|
2456
|
-
* Call virConnectListAllSecrets[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllSecrets]
|
2478
|
+
* Call virConnectListAllSecrets[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virConnectListAllSecrets]
|
2457
2479
|
* to get an array of secret objects for all secrets.
|
2458
2480
|
*/
|
2459
2481
|
static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
|
@@ -2468,9 +2490,9 @@ static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
|
|
2468
2490
|
#if HAVE_VIRCONNECTLISTALLNODEDEVICES
|
2469
2491
|
/*
|
2470
2492
|
* call-seq:
|
2471
|
-
* conn.list_all_nodedevices(flags=0) ->
|
2493
|
+
* conn.list_all_nodedevices(flags=0) -> Array
|
2472
2494
|
*
|
2473
|
-
* Call virConnectListAllNodeDevices[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllNodeDevices]
|
2495
|
+
* Call virConnectListAllNodeDevices[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virConnectListAllNodeDevices]
|
2474
2496
|
* to get an array of nodedevice objects for all nodedevices.
|
2475
2497
|
*/
|
2476
2498
|
static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
|
@@ -2487,9 +2509,9 @@ static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
|
|
2487
2509
|
#if HAVE_VIRCONNECTLISTALLSTORAGEPOOLS
|
2488
2510
|
/*
|
2489
2511
|
* call-seq:
|
2490
|
-
* conn.list_all_storage_pools(flags=0) ->
|
2512
|
+
* conn.list_all_storage_pools(flags=0) -> Array
|
2491
2513
|
*
|
2492
|
-
* Call virConnectListAllStoragePools[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllStoragePools]
|
2514
|
+
* Call virConnectListAllStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectListAllStoragePools]
|
2493
2515
|
* to get an array of storage pool objects for all storage pools.
|
2494
2516
|
*/
|
2495
2517
|
static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
|
@@ -2505,9 +2527,9 @@ static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
|
|
2505
2527
|
#if HAVE_VIRCONNECTLISTALLNWFILTERS
|
2506
2528
|
/*
|
2507
2529
|
* call-seq:
|
2508
|
-
* conn.list_all_nwfilters(flags=0) ->
|
2530
|
+
* conn.list_all_nwfilters(flags=0) -> Array
|
2509
2531
|
*
|
2510
|
-
* Call virConnectListAllNWFilters[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectListAllNWFilters]
|
2532
|
+
* Call virConnectListAllNWFilters[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListAllNWFilters]
|
2511
2533
|
* to get an array of nwfilters for all nwfilter objects.
|
2512
2534
|
*/
|
2513
2535
|
static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
|
@@ -2525,7 +2547,7 @@ static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
|
|
2525
2547
|
* call-seq:
|
2526
2548
|
* conn.alive? -> [True|False]
|
2527
2549
|
*
|
2528
|
-
* Call virConnectIsAlive[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectIsAlive]
|
2550
|
+
* Call virConnectIsAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectIsAlive]
|
2529
2551
|
* to determine if the connection is alive.
|
2530
2552
|
*/
|
2531
2553
|
static VALUE libvirt_connect_alive_p(VALUE c)
|
@@ -2541,7 +2563,7 @@ static VALUE libvirt_connect_alive_p(VALUE c)
|
|
2541
2563
|
* call-seq:
|
2542
2564
|
* conn.create_domain_xml_with_files(xml, fds=nil, flags=0) -> Libvirt::Domain
|
2543
2565
|
*
|
2544
|
-
* Call virDomainCreateXMLWithFiles[http://www.libvirt.org/html/libvirt-libvirt.html#virDomainCreateXMLWithFiles]
|
2566
|
+
* Call virDomainCreateXMLWithFiles[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXMLWithFiles]
|
2545
2567
|
* to launch a new guest domain with a set of open file descriptors.
|
2546
2568
|
*/
|
2547
2569
|
static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
|
@@ -2588,7 +2610,7 @@ static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
|
|
2588
2610
|
* call-seq:
|
2589
2611
|
* conn.qemu_attach(pid, flags=0) -> Libvirt::Domain
|
2590
2612
|
*
|
2591
|
-
* Call virDomainQemuAttach
|
2613
|
+
* Call virDomainQemuAttach
|
2592
2614
|
* to attach to the Qemu process pid.
|
2593
2615
|
*/
|
2594
2616
|
static VALUE libvirt_connect_qemu_attach(int argc, VALUE *argv, VALUE c)
|
@@ -2608,29 +2630,11 @@ static VALUE libvirt_connect_qemu_attach(int argc, VALUE *argv, VALUE c)
|
|
2608
2630
|
#endif
|
2609
2631
|
|
2610
2632
|
#if HAVE_VIRCONNECTGETCPUMODELNAMES
|
2611
|
-
struct model_name_args {
|
2612
|
-
VALUE result;
|
2613
|
-
int i;
|
2614
|
-
char *value;
|
2615
|
-
};
|
2616
|
-
|
2617
|
-
static VALUE model_name_wrap(VALUE arg)
|
2618
|
-
{
|
2619
|
-
struct model_name_args *e = (struct model_name_args *)arg;
|
2620
|
-
VALUE elem;
|
2621
|
-
|
2622
|
-
elem = rb_str_new2(e->value);
|
2623
|
-
|
2624
|
-
rb_ary_store(e->result, e->i, elem);
|
2625
|
-
|
2626
|
-
return Qnil;
|
2627
|
-
}
|
2628
|
-
|
2629
2633
|
/*
|
2630
2634
|
* call-seq:
|
2631
2635
|
* conn.cpu_model_names(arch, flags=0) -> Array
|
2632
2636
|
*
|
2633
|
-
* Call virConnectGetCPUModelNames[http://www.libvirt.org/html/libvirt-libvirt.html#virConnectGetCPUModelNames]
|
2637
|
+
* Call virConnectGetCPUModelNames[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCPUModelNames]
|
2634
2638
|
* to get an array of CPU model names.
|
2635
2639
|
*/
|
2636
2640
|
static VALUE libvirt_connect_cpu_model_names(int argc, VALUE *argv, VALUE c)
|
@@ -2638,7 +2642,7 @@ static VALUE libvirt_connect_cpu_model_names(int argc, VALUE *argv, VALUE c)
|
|
2638
2642
|
VALUE arch, flags, result;
|
2639
2643
|
char **models;
|
2640
2644
|
int i = 0, j, elems = 0;
|
2641
|
-
struct
|
2645
|
+
struct ruby_libvirt_str_new2_and_ary_store_arg args;
|
2642
2646
|
int exception;
|
2643
2647
|
|
2644
2648
|
rb_scan_args(argc, argv, "11", &arch, &flags);
|
@@ -2656,11 +2660,12 @@ static VALUE libvirt_connect_cpu_model_names(int argc, VALUE *argv, VALUE c)
|
|
2656
2660
|
}
|
2657
2661
|
|
2658
2662
|
for (i = 0; i < elems; i++) {
|
2659
|
-
args.
|
2660
|
-
args.
|
2663
|
+
args.arr = result;
|
2664
|
+
args.index = i;
|
2661
2665
|
args.value = models[i];
|
2662
2666
|
|
2663
|
-
rb_protect(
|
2667
|
+
rb_protect(ruby_libvirt_str_new2_and_ary_store_wrap, (VALUE)&args,
|
2668
|
+
&exception);
|
2664
2669
|
if (exception) {
|
2665
2670
|
goto error;
|
2666
2671
|
}
|
@@ -2681,6 +2686,145 @@ error:
|
|
2681
2686
|
}
|
2682
2687
|
#endif
|
2683
2688
|
|
2689
|
+
#if HAVE_VIRNODEALLOCPAGES
|
2690
|
+
/*
|
2691
|
+
* call-seq:
|
2692
|
+
* conn.node_alloc_pages(page_arr, cells=nil, flags=0) -> Fixnum
|
2693
|
+
*
|
2694
|
+
* Call virNodeAllocPages[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeAllocPages]
|
2695
|
+
* to reserve huge pages in the system pool.
|
2696
|
+
*/
|
2697
|
+
static VALUE libvirt_connect_node_alloc_pages(int argc, VALUE *argv, VALUE c)
|
2698
|
+
{
|
2699
|
+
VALUE page_arr, cells, flags, entry, size, count, tmp;
|
2700
|
+
int i, arraylen, start_cell, ret;
|
2701
|
+
unsigned int *page_sizes;
|
2702
|
+
unsigned long long *page_counts;
|
2703
|
+
unsigned int cell_count;
|
2704
|
+
|
2705
|
+
rb_scan_args(argc, argv, "12", &page_arr, &cells, &flags);
|
2706
|
+
|
2707
|
+
Check_Type(page_arr, T_ARRAY);
|
2708
|
+
|
2709
|
+
arraylen = RARRAY_LEN(page_arr);
|
2710
|
+
|
2711
|
+
page_sizes = alloca(arraylen * sizeof(unsigned int));
|
2712
|
+
page_counts = alloca(arraylen * sizeof(unsigned long long));
|
2713
|
+
|
2714
|
+
for (i = 0; i < arraylen; i++) {
|
2715
|
+
entry = rb_ary_entry(page_arr, i);
|
2716
|
+
Check_Type(entry, T_HASH);
|
2717
|
+
|
2718
|
+
size = rb_hash_aref(entry, rb_str_new2("size"));
|
2719
|
+
Check_Type(size, T_FIXNUM);
|
2720
|
+
|
2721
|
+
count = rb_hash_aref(entry, rb_str_new2("count"));
|
2722
|
+
Check_Type(count, T_FIXNUM);
|
2723
|
+
|
2724
|
+
page_sizes[i] = NUM2UINT(size);
|
2725
|
+
page_counts[i] = NUM2ULL(count);
|
2726
|
+
}
|
2727
|
+
|
2728
|
+
if (NIL_P(cells)) {
|
2729
|
+
start_cell = -1;
|
2730
|
+
cell_count = 0;
|
2731
|
+
}
|
2732
|
+
else {
|
2733
|
+
Check_Type(cells, T_HASH);
|
2734
|
+
|
2735
|
+
tmp = rb_hash_aref(cells, rb_str_new2("start"));
|
2736
|
+
Check_Type(tmp, T_FIXNUM);
|
2737
|
+
start_cell = NUM2INT(tmp);
|
2738
|
+
|
2739
|
+
tmp = rb_hash_aref(cells, rb_str_new2("count"));
|
2740
|
+
Check_Type(tmp, T_FIXNUM);
|
2741
|
+
cell_count = NUM2UINT(tmp);
|
2742
|
+
}
|
2743
|
+
|
2744
|
+
ret = virNodeAllocPages(ruby_libvirt_connect_get(c), arraylen, page_sizes,
|
2745
|
+
page_counts, start_cell, cell_count,
|
2746
|
+
ruby_libvirt_value_to_uint(flags));
|
2747
|
+
ruby_libvirt_raise_error_if(ret < 0, e_Error,
|
2748
|
+
"virNodeAllocPages",
|
2749
|
+
ruby_libvirt_connect_get(c));
|
2750
|
+
|
2751
|
+
return INT2NUM(ret);
|
2752
|
+
}
|
2753
|
+
#endif
|
2754
|
+
|
2755
|
+
#if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
|
2756
|
+
/*
|
2757
|
+
* call-seq:
|
2758
|
+
* conn.domain_capabilities(emulatorbin, arch, machine, virttype, flags=0) -> String
|
2759
|
+
*
|
2760
|
+
* Call virConnectGetDomainCapabilities[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities]
|
2761
|
+
* to get the capabilities of the underlying emulator.
|
2762
|
+
*/
|
2763
|
+
static VALUE libvirt_connect_domain_capabilities(int argc, VALUE *argv, VALUE c)
|
2764
|
+
{
|
2765
|
+
VALUE emulatorbin, arch, machine, virttype, flags;
|
2766
|
+
|
2767
|
+
rb_scan_args(argc, argv, "41", &emulatorbin, &arch, &machine, &virttype,
|
2768
|
+
&flags);
|
2769
|
+
|
2770
|
+
ruby_libvirt_generate_call_string(virConnectGetDomainCapabilities,
|
2771
|
+
ruby_libvirt_connect_get(c), 1,
|
2772
|
+
ruby_libvirt_connect_get(c),
|
2773
|
+
ruby_libvirt_get_cstring_or_null(emulatorbin),
|
2774
|
+
ruby_libvirt_get_cstring_or_null(arch),
|
2775
|
+
ruby_libvirt_get_cstring_or_null(machine),
|
2776
|
+
ruby_libvirt_get_cstring_or_null(virttype),
|
2777
|
+
NUM2UINT(flags));
|
2778
|
+
}
|
2779
|
+
#endif
|
2780
|
+
|
2781
|
+
#if HAVE_VIRNODEGETFREEPAGES
|
2782
|
+
/*
|
2783
|
+
* call-seq:
|
2784
|
+
* conn.node_free_pages(pages, cells, flags=0) -> Hash
|
2785
|
+
*
|
2786
|
+
* Call virNodeGetFreePages[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreePages]
|
2787
|
+
* to query the host system on free pages of specified size.
|
2788
|
+
*/
|
2789
|
+
static VALUE libvirt_connect_node_free_pages(int argc, VALUE *argv, VALUE c)
|
2790
|
+
{
|
2791
|
+
VALUE pageArr = RUBY_Qnil, cells = RUBY_Qnil, flags = RUBY_Qnil, result;
|
2792
|
+
unsigned int *pages;
|
2793
|
+
unsigned int npages, i, cellCount;
|
2794
|
+
int startCell, ret;
|
2795
|
+
unsigned long long *counts;
|
2796
|
+
|
2797
|
+
rb_scan_args(argc, argv, "21", &pageArr, &cells, &flags);
|
2798
|
+
|
2799
|
+
Check_Type(pageArr, T_ARRAY);
|
2800
|
+
Check_Type(cells, T_HASH);
|
2801
|
+
|
2802
|
+
npages = RARRAY_LEN(pageArr);
|
2803
|
+
pages = alloca(npages);
|
2804
|
+
for (i = 0; i < npages; i++) {
|
2805
|
+
pages[i] = NUM2UINT(rb_ary_entry(pageArr, i));
|
2806
|
+
}
|
2807
|
+
|
2808
|
+
startCell = NUM2INT(rb_hash_aref(cells, rb_str_new2("startCell")));
|
2809
|
+
cellCount = NUM2UINT(rb_hash_aref(cells, rb_str_new2("cellCount")));
|
2810
|
+
|
2811
|
+
counts = alloca(npages * cellCount * sizeof(long long));
|
2812
|
+
|
2813
|
+
ret = virNodeGetFreePages(ruby_libvirt_connect_get(c), npages, pages,
|
2814
|
+
startCell, cellCount, counts,
|
2815
|
+
ruby_libvirt_value_to_uint(flags));
|
2816
|
+
ruby_libvirt_raise_error_if(ret < 0, e_Error, "virNodeGetFreePages",
|
2817
|
+
ruby_libvirt_connect_get(c));
|
2818
|
+
|
2819
|
+
result = rb_hash_new();
|
2820
|
+
for (i = 0; i < npages; i++) {
|
2821
|
+
rb_hash_aset(result, UINT2NUM(pages[i]), ULL2NUM(counts[i]));
|
2822
|
+
}
|
2823
|
+
|
2824
|
+
return result;
|
2825
|
+
}
|
2826
|
+
#endif
|
2827
|
+
|
2684
2828
|
/*
|
2685
2829
|
* Class Libvirt::Connect
|
2686
2830
|
*/
|
@@ -2754,6 +2898,11 @@ void ruby_libvirt_connect_init(void)
|
|
2754
2898
|
rb_define_method(c_connect, "compare_cpu", libvirt_connect_compare_cpu, -1);
|
2755
2899
|
#endif
|
2756
2900
|
|
2901
|
+
#if HAVE_CONST_VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE
|
2902
|
+
rb_define_const(c_connect, "COMPARE_CPU_FAIL_INCOMPATIBLE",
|
2903
|
+
INT2NUM(VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE));
|
2904
|
+
#endif
|
2905
|
+
|
2757
2906
|
#if HAVE_VIRCONNECTBASELINECPU
|
2758
2907
|
rb_define_method(c_connect, "baseline_cpu", libvirt_connect_baseline_cpu,
|
2759
2908
|
-1);
|
@@ -2981,8 +3130,12 @@ void ruby_libvirt_connect_init(void)
|
|
2981
3130
|
libvirt_connect_lookup_domain_by_id, 1);
|
2982
3131
|
rb_define_method(c_connect, "lookup_domain_by_uuid",
|
2983
3132
|
libvirt_connect_lookup_domain_by_uuid, 1);
|
3133
|
+
#if HAVE_CONST_VIR_DOMAIN_DEFINE_VALIDATE
|
3134
|
+
rb_define_const(c_connect, "DOMAIN_DEFINE_VALIDATE",
|
3135
|
+
INT2NUM(VIR_DOMAIN_DEFINE_VALIDATE));
|
3136
|
+
#endif
|
2984
3137
|
rb_define_method(c_connect, "define_domain_xml",
|
2985
|
-
libvirt_connect_define_domain_xml, 1);
|
3138
|
+
libvirt_connect_define_domain_xml, -1);
|
2986
3139
|
|
2987
3140
|
#if HAVE_VIRCONNECTDOMAINXMLFROMNATIVE
|
2988
3141
|
rb_define_method(c_connect, "domain_xml_from_native",
|
@@ -3301,6 +3454,14 @@ void ruby_libvirt_connect_init(void)
|
|
3301
3454
|
rb_define_method(c_connect, "list_all_storage_pools",
|
3302
3455
|
libvirt_connect_list_all_storage_pools, -1);
|
3303
3456
|
#endif
|
3457
|
+
#if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER
|
3458
|
+
rb_define_const(c_connect, "LIST_STORAGE_POOLS_GLUSTER",
|
3459
|
+
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER));
|
3460
|
+
#endif
|
3461
|
+
#if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_ZFS
|
3462
|
+
rb_define_const(c_connect, "LIST_STORAGE_POOLS_ZFS",
|
3463
|
+
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_ZFS));
|
3464
|
+
#endif
|
3304
3465
|
#if HAVE_VIRCONNECTLISTALLNWFILTERS
|
3305
3466
|
rb_define_method(c_connect, "list_all_nwfilters",
|
3306
3467
|
libvirt_connect_list_all_nwfilters, -1);
|
@@ -3319,4 +3480,20 @@ void ruby_libvirt_connect_init(void)
|
|
3319
3480
|
rb_define_method(c_connect, "cpu_model_names",
|
3320
3481
|
libvirt_connect_cpu_model_names, -1);
|
3321
3482
|
#endif
|
3483
|
+
#if HAVE_VIRNODEALLOCPAGES
|
3484
|
+
rb_define_const(c_connect, "NODE_ALLOC_PAGES_ADD",
|
3485
|
+
INT2NUM(VIR_NODE_ALLOC_PAGES_ADD));
|
3486
|
+
rb_define_const(c_connect, "NODE_ALLOC_PAGES_SET",
|
3487
|
+
INT2NUM(VIR_NODE_ALLOC_PAGES_SET));
|
3488
|
+
rb_define_method(c_connect, "node_alloc_pages",
|
3489
|
+
libvirt_connect_node_alloc_pages, -1);
|
3490
|
+
#endif
|
3491
|
+
#if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
|
3492
|
+
rb_define_method(c_connect, "domain_capabilities",
|
3493
|
+
libvirt_connect_domain_capabilities, -1);
|
3494
|
+
#endif
|
3495
|
+
#if HAVE_VIRNODEGETFREEPAGES
|
3496
|
+
rb_define_method(c_connect, "node_free_pages",
|
3497
|
+
libvirt_connect_node_free_pages, -1);
|
3498
|
+
#endif
|
3322
3499
|
}
|