ruby-libvirt 0.7.1 → 0.8.1
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/NEWS +13 -0
- data/README +1 -1
- data/README.rdoc +1 -1
- data/Rakefile +3 -3
- data/ext/libvirt/_libvirt.c +10 -100
- data/ext/libvirt/common.c +9 -6
- data/ext/libvirt/common.h +1 -1
- data/ext/libvirt/connect.c +122 -358
- data/ext/libvirt/domain.c +267 -961
- data/ext/libvirt/extconf.h +0 -389
- data/ext/libvirt/extconf.rb +6 -490
- data/ext/libvirt/interface.c +8 -18
- data/ext/libvirt/network.c +15 -46
- data/ext/libvirt/nodedevice.c +22 -41
- data/ext/libvirt/nwfilter.c +5 -9
- data/ext/libvirt/secret.c +9 -20
- data/ext/libvirt/storage.c +36 -129
- data/ext/libvirt/stream.c +10 -14
- data/tests/test_domain.rb +2 -0
- data/tests/test_utils.rb +18 -0
- metadata +8 -9
data/ext/libvirt/connect.c
CHANGED
@@ -21,9 +21,7 @@
|
|
21
21
|
|
22
22
|
#include <ruby.h>
|
23
23
|
#include <libvirt/libvirt.h>
|
24
|
-
#if HAVE_VIRDOMAINQEMUATTACH
|
25
24
|
#include <libvirt/libvirt-qemu.h>
|
26
|
-
#endif
|
27
25
|
#include <libvirt/virterror.h>
|
28
26
|
#include "extconf.h"
|
29
27
|
#include "common.h"
|
@@ -112,7 +110,7 @@ virConnectPtr ruby_libvirt_connect_get(VALUE c)
|
|
112
110
|
* call-seq:
|
113
111
|
* conn.close -> nil
|
114
112
|
*
|
115
|
-
* Call virConnectClose[
|
113
|
+
* Call virConnectClose[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectClose]
|
116
114
|
* to close the connection.
|
117
115
|
*/
|
118
116
|
static VALUE libvirt_connect_close(VALUE c)
|
@@ -145,7 +143,7 @@ static VALUE libvirt_connect_closed_p(VALUE c)
|
|
145
143
|
* call-seq:
|
146
144
|
* conn.type -> String
|
147
145
|
*
|
148
|
-
* Call virConnectGetType[
|
146
|
+
* Call virConnectGetType[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetType]
|
149
147
|
* to retrieve the type of hypervisor for this connection.
|
150
148
|
*/
|
151
149
|
static VALUE libvirt_connect_type(VALUE c)
|
@@ -159,7 +157,7 @@ static VALUE libvirt_connect_type(VALUE c)
|
|
159
157
|
* call-seq:
|
160
158
|
* conn.version -> Fixnum
|
161
159
|
*
|
162
|
-
* Call virConnectGetVersion[
|
160
|
+
* Call virConnectGetVersion[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetVersion]
|
163
161
|
* to retrieve the version of the hypervisor for this connection.
|
164
162
|
*/
|
165
163
|
static VALUE libvirt_connect_version(VALUE c)
|
@@ -174,12 +172,11 @@ static VALUE libvirt_connect_version(VALUE c)
|
|
174
172
|
return ULONG2NUM(v);
|
175
173
|
}
|
176
174
|
|
177
|
-
#if HAVE_VIRCONNECTGETLIBVERSION
|
178
175
|
/*
|
179
176
|
* call-seq:
|
180
177
|
* conn.libversion -> Fixnum
|
181
178
|
*
|
182
|
-
* Call virConnectGetLibVersion[
|
179
|
+
* Call virConnectGetLibVersion[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetLibVersion]
|
183
180
|
* to retrieve the version of the libvirt library for this connection.
|
184
181
|
*/
|
185
182
|
static VALUE libvirt_connect_libversion(VALUE c)
|
@@ -194,13 +191,12 @@ static VALUE libvirt_connect_libversion(VALUE c)
|
|
194
191
|
|
195
192
|
return ULONG2NUM(v);
|
196
193
|
}
|
197
|
-
#endif
|
198
194
|
|
199
195
|
/*
|
200
196
|
* call-seq:
|
201
197
|
* conn.hostname -> String
|
202
198
|
*
|
203
|
-
* Call virConnectGetHostname[
|
199
|
+
* Call virConnectGetHostname[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetHostname]
|
204
200
|
* to retrieve the hostname of the hypervisor for this connection.
|
205
201
|
*/
|
206
202
|
static VALUE libvirt_connect_hostname(VALUE c)
|
@@ -214,7 +210,7 @@ static VALUE libvirt_connect_hostname(VALUE c)
|
|
214
210
|
* call-seq:
|
215
211
|
* conn.uri -> String
|
216
212
|
*
|
217
|
-
* Call virConnectGetURI[
|
213
|
+
* Call virConnectGetURI[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetURI]
|
218
214
|
* to retrieve the canonical URI for this connection.
|
219
215
|
*/
|
220
216
|
static VALUE libvirt_connect_uri(VALUE c)
|
@@ -228,7 +224,7 @@ static VALUE libvirt_connect_uri(VALUE c)
|
|
228
224
|
* call-seq:
|
229
225
|
* conn.max_vcpus(type=nil) -> Fixnum
|
230
226
|
*
|
231
|
-
* Call virConnectGetMaxVcpus[
|
227
|
+
* Call virConnectGetMaxVcpus[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetMaxVcpus]
|
232
228
|
* to retrieve the maximum number of virtual cpus supported by the hypervisor
|
233
229
|
* for this connection.
|
234
230
|
*/
|
@@ -248,7 +244,7 @@ static VALUE libvirt_connect_max_vcpus(int argc, VALUE *argv, VALUE c)
|
|
248
244
|
* call-seq:
|
249
245
|
* conn.node_info -> Libvirt::Connect::Nodeinfo
|
250
246
|
*
|
251
|
-
* Call virNodeGetInfo[
|
247
|
+
* Call virNodeGetInfo[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetInfo]
|
252
248
|
* to retrieve information about the node for this connection.
|
253
249
|
*/
|
254
250
|
static VALUE libvirt_connect_node_info(VALUE c)
|
@@ -278,7 +274,7 @@ static VALUE libvirt_connect_node_info(VALUE c)
|
|
278
274
|
* call-seq:
|
279
275
|
* conn.node_free_memory -> Fixnum
|
280
276
|
*
|
281
|
-
* Call virNodeGetFreeMemory[
|
277
|
+
* Call virNodeGetFreeMemory[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreeMemory]
|
282
278
|
* to retrieve the amount of free memory available on the host for this
|
283
279
|
* connection.
|
284
280
|
*/
|
@@ -299,7 +295,7 @@ static VALUE libvirt_connect_node_free_memory(VALUE c)
|
|
299
295
|
* call-seq:
|
300
296
|
* conn.node_cells_free_memory(startCell=0, maxCells=#nodeCells) -> list
|
301
297
|
*
|
302
|
-
* Call virNodeGetCellsFreeMemory[
|
298
|
+
* Call virNodeGetCellsFreeMemory[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCellsFreeMemory]
|
303
299
|
* to retrieve the amount of free memory in each NUMA cell on the host for
|
304
300
|
* this connection.
|
305
301
|
*/
|
@@ -347,12 +343,11 @@ static VALUE libvirt_connect_node_cells_free_memory(int argc, VALUE *argv,
|
|
347
343
|
return cells;
|
348
344
|
}
|
349
345
|
|
350
|
-
#if HAVE_VIRNODEGETSECURITYMODEL
|
351
346
|
/*
|
352
347
|
* call-seq:
|
353
348
|
* conn.node_security_model -> Libvirt::Connect::NodeSecurityModel
|
354
349
|
*
|
355
|
-
* Call virNodeGetSecurityModel[
|
350
|
+
* Call virNodeGetSecurityModel[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetSecurityModel]
|
356
351
|
* to retrieve the security model in use on the host for this connection.
|
357
352
|
*/
|
358
353
|
static VALUE libvirt_connect_node_security_model(VALUE c)
|
@@ -372,14 +367,12 @@ static VALUE libvirt_connect_node_security_model(VALUE c)
|
|
372
367
|
|
373
368
|
return result;
|
374
369
|
}
|
375
|
-
#endif
|
376
370
|
|
377
|
-
#if HAVE_VIRCONNECTISENCRYPTED
|
378
371
|
/*
|
379
372
|
* call-seq:
|
380
373
|
* conn.encrypted? -> [True|False]
|
381
374
|
*
|
382
|
-
* Call virConnectIsEncrypted[
|
375
|
+
* Call virConnectIsEncrypted[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsEncrypted]
|
383
376
|
* to determine if the connection is encrypted.
|
384
377
|
*/
|
385
378
|
static VALUE libvirt_connect_encrypted_p(VALUE c)
|
@@ -388,14 +381,12 @@ static VALUE libvirt_connect_encrypted_p(VALUE c)
|
|
388
381
|
ruby_libvirt_connect_get(c),
|
389
382
|
ruby_libvirt_connect_get(c));
|
390
383
|
}
|
391
|
-
#endif
|
392
384
|
|
393
|
-
#if HAVE_VIRCONNECTISSECURE
|
394
385
|
/*
|
395
386
|
* call-seq:
|
396
387
|
* conn.secure? -> [True|False]
|
397
388
|
*
|
398
|
-
* Call virConnectIsSecure[
|
389
|
+
* Call virConnectIsSecure[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsSecure]
|
399
390
|
* to determine if the connection is secure.
|
400
391
|
*/
|
401
392
|
static VALUE libvirt_connect_secure_p(VALUE c)
|
@@ -404,13 +395,12 @@ static VALUE libvirt_connect_secure_p(VALUE c)
|
|
404
395
|
ruby_libvirt_connect_get(c),
|
405
396
|
ruby_libvirt_connect_get(c));
|
406
397
|
}
|
407
|
-
#endif
|
408
398
|
|
409
399
|
/*
|
410
400
|
* call-seq:
|
411
401
|
* conn.capabilities -> String
|
412
402
|
*
|
413
|
-
* Call virConnectGetCapabilities[
|
403
|
+
* Call virConnectGetCapabilities[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCapabilities]
|
414
404
|
* to retrieve the capabilities XML for this connection.
|
415
405
|
*/
|
416
406
|
static VALUE libvirt_connect_capabilities(VALUE c)
|
@@ -420,12 +410,11 @@ static VALUE libvirt_connect_capabilities(VALUE c)
|
|
420
410
|
ruby_libvirt_connect_get(c));
|
421
411
|
}
|
422
412
|
|
423
|
-
#if HAVE_VIRCONNECTCOMPARECPU
|
424
413
|
/*
|
425
414
|
* call-seq:
|
426
415
|
* conn.compare_cpu(xml, flags=0) -> compareflag
|
427
416
|
*
|
428
|
-
* Call virConnectCompareCPU[
|
417
|
+
* Call virConnectCompareCPU[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectCompareCPU]
|
429
418
|
* to compare the host CPU with the XML contained in xml. Returns one of
|
430
419
|
* Libvirt::CPU_COMPARE_ERROR, Libvirt::CPU_COMPARE_INCOMPATIBLE,
|
431
420
|
* Libvirt::CPU_COMPARE_IDENTICAL, or Libvirt::CPU_COMPARE_SUPERSET.
|
@@ -442,15 +431,12 @@ static VALUE libvirt_connect_compare_cpu(int argc, VALUE *argv, VALUE c)
|
|
442
431
|
StringValueCStr(xml),
|
443
432
|
ruby_libvirt_value_to_uint(flags));
|
444
433
|
}
|
445
|
-
#endif
|
446
434
|
|
447
|
-
|
448
|
-
#if HAVE_VIRCONNECTBASELINECPU
|
449
435
|
/*
|
450
436
|
* call-seq:
|
451
437
|
* conn.baseline_cpu([xml, xml2, ...], flags=0) -> XML
|
452
438
|
*
|
453
|
-
* Call virConnectBaselineCPU[
|
439
|
+
* Call virConnectBaselineCPU[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectBaselineCPU]
|
454
440
|
* to compare the most feature-rich CPU which is compatible with all
|
455
441
|
* given host CPUs.
|
456
442
|
*/
|
@@ -495,9 +481,7 @@ static VALUE libvirt_connect_baseline_cpu(int argc, VALUE *argv, VALUE c)
|
|
495
481
|
|
496
482
|
return retval;
|
497
483
|
}
|
498
|
-
#endif
|
499
484
|
|
500
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY || HAVE_VIRCONNECTDOMAINEVENTREGISTER
|
501
485
|
static int domain_event_lifecycle_callback(virConnectPtr conn,
|
502
486
|
virDomainPtr dom, int event,
|
503
487
|
int detail, void *opaque)
|
@@ -533,9 +517,7 @@ static int domain_event_lifecycle_callback(virConnectPtr conn,
|
|
533
517
|
|
534
518
|
return 0;
|
535
519
|
}
|
536
|
-
#endif
|
537
520
|
|
538
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY
|
539
521
|
static int domain_event_reboot_callback(virConnectPtr conn, virDomainPtr dom,
|
540
522
|
void *opaque)
|
541
523
|
{
|
@@ -788,7 +770,7 @@ static int domain_event_graphics_callback(virConnectPtr conn, virDomainPtr dom,
|
|
788
770
|
* call-seq:
|
789
771
|
* conn.domain_event_register_any(eventID, callback, dom=nil, opaque=nil) -> Fixnum
|
790
772
|
*
|
791
|
-
* Call virConnectDomainEventRegisterAny[
|
773
|
+
* Call virConnectDomainEventRegisterAny[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventRegisterAny]
|
792
774
|
* to register callback for eventID with libvirt. The eventID must be one of
|
793
775
|
* the Libvirt::Connect::DOMAIN_EVENT_ID_* constants. The callback can either
|
794
776
|
* be a Symbol (that is the name of a method to callback) or a Proc. Note that
|
@@ -873,7 +855,7 @@ static VALUE libvirt_connect_domain_event_register_any(int argc, VALUE *argv,
|
|
873
855
|
* call-seq:
|
874
856
|
* conn.domain_event_deregister_any(callbackID) -> nil
|
875
857
|
*
|
876
|
-
* Call virConnectDomainEventDeregisterAny[
|
858
|
+
* Call virConnectDomainEventDeregisterAny[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventDeregisterAny]
|
877
859
|
* to deregister a callback from libvirt. The callbackID must be a
|
878
860
|
* libvirt-specific handle returned by domain_event_register_any.
|
879
861
|
*/
|
@@ -885,9 +867,7 @@ static VALUE libvirt_connect_domain_event_deregister_any(VALUE c,
|
|
885
867
|
ruby_libvirt_connect_get(c),
|
886
868
|
NUM2INT(callbackID));
|
887
869
|
}
|
888
|
-
#endif
|
889
870
|
|
890
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTER
|
891
871
|
/*
|
892
872
|
* this is a bit of silliness. Because libvirt internals track the address
|
893
873
|
* of the function pointer, trying to use domain_event_lifecycle_callback
|
@@ -905,7 +885,7 @@ static int domain_event_callback(virConnectPtr conn,
|
|
905
885
|
* call-seq:
|
906
886
|
* conn.domain_event_register(callback, opaque=nil) -> nil
|
907
887
|
*
|
908
|
-
* Call virConnectDomainEventRegister[
|
888
|
+
* Call virConnectDomainEventRegister[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventRegister]
|
909
889
|
* to register callback for domain lifecycle events with libvirt. The
|
910
890
|
* callback can either be a Symbol (that is the name of a method to callback)
|
911
891
|
* or a Proc. The callback must accept 5 parameters: Libvirt::Connect,
|
@@ -941,7 +921,7 @@ static VALUE libvirt_connect_domain_event_register(int argc, VALUE *argv,
|
|
941
921
|
* call-seq:
|
942
922
|
* conn.domain_event_deregister(callback) -> nil
|
943
923
|
*
|
944
|
-
* Call virConnectDomainEventDeregister[
|
924
|
+
* Call virConnectDomainEventDeregister[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainEventDeregister]
|
945
925
|
* to deregister the event callback from libvirt. This method is deprecated
|
946
926
|
* in favor of domain_event_deregister_any (though they cannot be mixed; if
|
947
927
|
* the callback was registered with domain_event_register, it must be
|
@@ -954,13 +934,12 @@ static VALUE libvirt_connect_domain_event_deregister(VALUE c)
|
|
954
934
|
ruby_libvirt_connect_get(c),
|
955
935
|
domain_event_callback);
|
956
936
|
}
|
957
|
-
#endif
|
958
937
|
|
959
938
|
/*
|
960
939
|
* call-seq:
|
961
940
|
* conn.num_of_domains -> Fixnum
|
962
941
|
*
|
963
|
-
* Call virConnectNumOfDomains[
|
942
|
+
* Call virConnectNumOfDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectNumOfDomains]
|
964
943
|
* to retrieve the number of active domains on this connection.
|
965
944
|
*/
|
966
945
|
static VALUE libvirt_connect_num_of_domains(VALUE c)
|
@@ -972,7 +951,7 @@ static VALUE libvirt_connect_num_of_domains(VALUE c)
|
|
972
951
|
* call-seq:
|
973
952
|
* conn.list_domains -> list
|
974
953
|
*
|
975
|
-
* Call virConnectListDomains[
|
954
|
+
* Call virConnectListDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectListDomains]
|
976
955
|
* to retrieve a list of active domain IDs on this connection.
|
977
956
|
*/
|
978
957
|
static VALUE libvirt_connect_list_domains(VALUE c)
|
@@ -1008,7 +987,7 @@ static VALUE libvirt_connect_list_domains(VALUE c)
|
|
1008
987
|
* call-seq:
|
1009
988
|
* conn.num_of_defined_domains -> Fixnum
|
1010
989
|
*
|
1011
|
-
* Call virConnectNumOfDefinedDomains[
|
990
|
+
* Call virConnectNumOfDefinedDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectNumOfDefinedDomains]
|
1012
991
|
* to retrieve the number of inactive domains on this connection.
|
1013
992
|
*/
|
1014
993
|
static VALUE libvirt_connect_num_of_defined_domains(VALUE c)
|
@@ -1020,7 +999,7 @@ static VALUE libvirt_connect_num_of_defined_domains(VALUE c)
|
|
1020
999
|
* call-seq:
|
1021
1000
|
* conn.list_defined_domains -> list
|
1022
1001
|
*
|
1023
|
-
* Call virConnectListDefinedDomains[
|
1002
|
+
* Call virConnectListDefinedDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectListDefinedDomains]
|
1024
1003
|
* to retrieve a list of inactive domain names on this connection.
|
1025
1004
|
*/
|
1026
1005
|
static VALUE libvirt_connect_list_defined_domains(VALUE c)
|
@@ -1032,7 +1011,7 @@ static VALUE libvirt_connect_list_defined_domains(VALUE c)
|
|
1032
1011
|
* call-seq:
|
1033
1012
|
* conn.create_domain_linux(xml, flags=0) -> Libvirt::Domain
|
1034
1013
|
*
|
1035
|
-
* Call virDomainCreateLinux[
|
1014
|
+
* Call virDomainCreateLinux[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateLinux]
|
1036
1015
|
* to start a transient domain from the given XML. Deprecated; use
|
1037
1016
|
* conn.create_domain_xml instead.
|
1038
1017
|
*/
|
@@ -1052,12 +1031,11 @@ static VALUE libvirt_connect_create_linux(int argc, VALUE *argv, VALUE c)
|
|
1052
1031
|
return ruby_libvirt_domain_new(dom, c);
|
1053
1032
|
}
|
1054
1033
|
|
1055
|
-
#if HAVE_VIRDOMAINCREATEXML
|
1056
1034
|
/*
|
1057
1035
|
* call-seq:
|
1058
1036
|
* conn.create_domain_xml(xml, flags=0) -> Libvirt::Domain
|
1059
1037
|
*
|
1060
|
-
* Call virDomainCreateXML[
|
1038
|
+
* Call virDomainCreateXML[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXML]
|
1061
1039
|
* to start a transient domain from the given XML.
|
1062
1040
|
*/
|
1063
1041
|
static VALUE libvirt_connect_create_domain_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1074,13 +1052,12 @@ static VALUE libvirt_connect_create_domain_xml(int argc, VALUE *argv, VALUE c)
|
|
1074
1052
|
|
1075
1053
|
return ruby_libvirt_domain_new(dom, c);
|
1076
1054
|
}
|
1077
|
-
#endif
|
1078
1055
|
|
1079
1056
|
/*
|
1080
1057
|
* call-seq:
|
1081
1058
|
* conn.lookup_domain_by_name(name) -> Libvirt::Domain
|
1082
1059
|
*
|
1083
|
-
* Call virDomainLookupByName[
|
1060
|
+
* Call virDomainLookupByName[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByName]
|
1084
1061
|
* to retrieve a domain object for name.
|
1085
1062
|
*/
|
1086
1063
|
static VALUE libvirt_connect_lookup_domain_by_name(VALUE c, VALUE name)
|
@@ -1100,7 +1077,7 @@ static VALUE libvirt_connect_lookup_domain_by_name(VALUE c, VALUE name)
|
|
1100
1077
|
* call-seq:
|
1101
1078
|
* conn.lookup_domain_by_id(id) -> Libvirt::Domain
|
1102
1079
|
*
|
1103
|
-
* Call virDomainLookupByID[
|
1080
|
+
* Call virDomainLookupByID[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByID]
|
1104
1081
|
* to retrieve a domain object for id.
|
1105
1082
|
*/
|
1106
1083
|
static VALUE libvirt_connect_lookup_domain_by_id(VALUE c, VALUE id)
|
@@ -1119,7 +1096,7 @@ static VALUE libvirt_connect_lookup_domain_by_id(VALUE c, VALUE id)
|
|
1119
1096
|
* call-seq:
|
1120
1097
|
* conn.lookup_domain_by_uuid(uuid) -> Libvirt::Domain
|
1121
1098
|
*
|
1122
|
-
* Call virDomainLookupByUUIDString[
|
1099
|
+
* Call virDomainLookupByUUIDString[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainLookupByUUIDString]
|
1123
1100
|
* to retrieve a domain object for uuid.
|
1124
1101
|
*/
|
1125
1102
|
static VALUE libvirt_connect_lookup_domain_by_uuid(VALUE c, VALUE uuid)
|
@@ -1139,7 +1116,7 @@ static VALUE libvirt_connect_lookup_domain_by_uuid(VALUE c, VALUE uuid)
|
|
1139
1116
|
* call-seq:
|
1140
1117
|
* conn.define_domain_xml(xml, flags=0) -> Libvirt::Domain
|
1141
1118
|
*
|
1142
|
-
* Call virDomainDefineXML[
|
1119
|
+
* Call virDomainDefineXML[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainDefineXML]
|
1143
1120
|
* to define a permanent domain on this connection.
|
1144
1121
|
*/
|
1145
1122
|
static VALUE libvirt_connect_define_domain_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1150,16 +1127,14 @@ static VALUE libvirt_connect_define_domain_xml(int argc, VALUE *argv, VALUE c)
|
|
1150
1127
|
|
1151
1128
|
rb_scan_args(argc, argv, "11", &xml, &flags);
|
1152
1129
|
|
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
1130
|
if (ruby_libvirt_value_to_uint(flags) != 0) {
|
1159
|
-
|
1131
|
+
dom = virDomainDefineXMLFlags(ruby_libvirt_connect_get(c),
|
1132
|
+
StringValueCStr(xml),
|
1133
|
+
ruby_libvirt_value_to_uint(flags));
|
1134
|
+
} else {
|
1135
|
+
dom = virDomainDefineXML(ruby_libvirt_connect_get(c),
|
1136
|
+
StringValueCStr(xml));
|
1160
1137
|
}
|
1161
|
-
dom = virDomainDefineXML(ruby_libvirt_connect_get(c), StringValueCStr(xml));
|
1162
|
-
#endif
|
1163
1138
|
|
1164
1139
|
ruby_libvirt_raise_error_if(dom == NULL, e_DefinitionError,
|
1165
1140
|
"virDomainDefineXML",
|
@@ -1168,12 +1143,11 @@ static VALUE libvirt_connect_define_domain_xml(int argc, VALUE *argv, VALUE c)
|
|
1168
1143
|
return ruby_libvirt_domain_new(dom, c);
|
1169
1144
|
}
|
1170
1145
|
|
1171
|
-
#if HAVE_VIRCONNECTDOMAINXMLFROMNATIVE
|
1172
1146
|
/*
|
1173
1147
|
* call-seq:
|
1174
1148
|
* conn.domain_xml_from_native(nativeFormat, xml, flags=0) -> String
|
1175
1149
|
*
|
1176
|
-
* Call virConnectDomainXMLFromNative[
|
1150
|
+
* Call virConnectDomainXMLFromNative[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainXMLFromNative]
|
1177
1151
|
* to convert a native hypervisor domain representation to libvirt XML.
|
1178
1152
|
*/
|
1179
1153
|
static VALUE libvirt_connect_domain_xml_from_native(int argc, VALUE *argv,
|
@@ -1190,14 +1164,12 @@ static VALUE libvirt_connect_domain_xml_from_native(int argc, VALUE *argv,
|
|
1190
1164
|
StringValueCStr(xml),
|
1191
1165
|
ruby_libvirt_value_to_uint(flags));
|
1192
1166
|
}
|
1193
|
-
#endif
|
1194
1167
|
|
1195
|
-
#if HAVE_VIRCONNECTDOMAINXMLTONATIVE
|
1196
1168
|
/*
|
1197
1169
|
* call-seq:
|
1198
1170
|
* conn.domain_xml_to_native(nativeFormat, xml, flags=0) -> String
|
1199
1171
|
*
|
1200
|
-
* Call virConnectDomainXMLToNative[
|
1172
|
+
* Call virConnectDomainXMLToNative[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectDomainXMLToNative]
|
1201
1173
|
* to convert libvirt XML to a native domain hypervisor representation.
|
1202
1174
|
*/
|
1203
1175
|
static VALUE libvirt_connect_domain_xml_to_native(int argc, VALUE *argv,
|
@@ -1214,14 +1186,12 @@ static VALUE libvirt_connect_domain_xml_to_native(int argc, VALUE *argv,
|
|
1214
1186
|
StringValueCStr(xml),
|
1215
1187
|
ruby_libvirt_value_to_uint(flags));
|
1216
1188
|
}
|
1217
|
-
#endif
|
1218
1189
|
|
1219
|
-
#if HAVE_TYPE_VIRINTERFACEPTR
|
1220
1190
|
/*
|
1221
1191
|
* call-seq:
|
1222
1192
|
* conn.num_of_interfaces -> Fixnum
|
1223
1193
|
*
|
1224
|
-
* Call virConnectNumOfInterfaces[
|
1194
|
+
* Call virConnectNumOfInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectNumOfInterfaces]
|
1225
1195
|
* to retrieve the number of active interfaces on this connection.
|
1226
1196
|
*/
|
1227
1197
|
static VALUE libvirt_connect_num_of_interfaces(VALUE c)
|
@@ -1233,7 +1203,7 @@ static VALUE libvirt_connect_num_of_interfaces(VALUE c)
|
|
1233
1203
|
* call-seq:
|
1234
1204
|
* conn.list_interfaces -> list
|
1235
1205
|
*
|
1236
|
-
* Call virConnectListInterfaces[
|
1206
|
+
* Call virConnectListInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectListInterfaces]
|
1237
1207
|
* to retrieve a list of active interface names on this connection.
|
1238
1208
|
*/
|
1239
1209
|
static VALUE libvirt_connect_list_interfaces(VALUE c)
|
@@ -1245,7 +1215,7 @@ static VALUE libvirt_connect_list_interfaces(VALUE c)
|
|
1245
1215
|
* call-seq:
|
1246
1216
|
* conn.num_of_defined_interfaces -> Fixnum
|
1247
1217
|
*
|
1248
|
-
* Call virConnectNumOfDefinedInterfaces[
|
1218
|
+
* Call virConnectNumOfDefinedInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectNumOfDefinedInterfaces]
|
1249
1219
|
* to retrieve the number of inactive interfaces on this connection.
|
1250
1220
|
*/
|
1251
1221
|
static VALUE libvirt_connect_num_of_defined_interfaces(VALUE c)
|
@@ -1257,7 +1227,7 @@ static VALUE libvirt_connect_num_of_defined_interfaces(VALUE c)
|
|
1257
1227
|
* call-seq:
|
1258
1228
|
* conn.list_defined_interfaces -> list
|
1259
1229
|
*
|
1260
|
-
* Call virConnectListDefinedInterfaces[
|
1230
|
+
* Call virConnectListDefinedInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectListDefinedInterfaces]
|
1261
1231
|
* to retrieve a list of inactive interface names on this connection.
|
1262
1232
|
*/
|
1263
1233
|
static VALUE libvirt_connect_list_defined_interfaces(VALUE c)
|
@@ -1269,7 +1239,7 @@ static VALUE libvirt_connect_list_defined_interfaces(VALUE c)
|
|
1269
1239
|
* call-seq:
|
1270
1240
|
* conn.lookup_interface_by_name(name) -> Libvirt::Interface
|
1271
1241
|
*
|
1272
|
-
* Call virInterfaceLookupByName[
|
1242
|
+
* Call virInterfaceLookupByName[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceLookupByName]
|
1273
1243
|
* to retrieve an interface object by name.
|
1274
1244
|
*/
|
1275
1245
|
static VALUE libvirt_connect_lookup_interface_by_name(VALUE c, VALUE name)
|
@@ -1289,7 +1259,7 @@ static VALUE libvirt_connect_lookup_interface_by_name(VALUE c, VALUE name)
|
|
1289
1259
|
* call-seq:
|
1290
1260
|
* conn.lookup_interface_by_mac(mac) -> Libvirt::Interface
|
1291
1261
|
*
|
1292
|
-
* Call virInterfaceLookupByMACString[
|
1262
|
+
* Call virInterfaceLookupByMACString[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceLookupByMACString]
|
1293
1263
|
* to retrieve an interface object by MAC address.
|
1294
1264
|
*/
|
1295
1265
|
static VALUE libvirt_connect_lookup_interface_by_mac(VALUE c, VALUE mac)
|
@@ -1309,7 +1279,7 @@ static VALUE libvirt_connect_lookup_interface_by_mac(VALUE c, VALUE mac)
|
|
1309
1279
|
* call-seq:
|
1310
1280
|
* conn.define_interface_xml(xml, flags=0) -> Libvirt::Interface
|
1311
1281
|
*
|
1312
|
-
* Call virInterfaceDefineXML[
|
1282
|
+
* Call virInterfaceDefineXML[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceDefineXML]
|
1313
1283
|
* to define a new interface from xml.
|
1314
1284
|
*/
|
1315
1285
|
static VALUE libvirt_connect_define_interface_xml(int argc, VALUE *argv,
|
@@ -1329,13 +1299,12 @@ static VALUE libvirt_connect_define_interface_xml(int argc, VALUE *argv,
|
|
1329
1299
|
|
1330
1300
|
return ruby_libvirt_interface_new(iface, c);
|
1331
1301
|
}
|
1332
|
-
#endif
|
1333
1302
|
|
1334
1303
|
/*
|
1335
1304
|
* call-seq:
|
1336
1305
|
* conn.num_of_networks -> Fixnum
|
1337
1306
|
*
|
1338
|
-
* Call virConnectNumOfNetworks[
|
1307
|
+
* Call virConnectNumOfNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectNumOfNetworks]
|
1339
1308
|
* to retrieve the number of active networks on this connection.
|
1340
1309
|
*/
|
1341
1310
|
static VALUE libvirt_connect_num_of_networks(VALUE c)
|
@@ -1347,7 +1316,7 @@ static VALUE libvirt_connect_num_of_networks(VALUE c)
|
|
1347
1316
|
* call-seq:
|
1348
1317
|
* conn.list_networks -> list
|
1349
1318
|
*
|
1350
|
-
* Call virConnectListNetworks[
|
1319
|
+
* Call virConnectListNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListNetworks]
|
1351
1320
|
* to retrieve a list of active network names on this connection.
|
1352
1321
|
*/
|
1353
1322
|
static VALUE libvirt_connect_list_networks(VALUE c)
|
@@ -1359,7 +1328,7 @@ static VALUE libvirt_connect_list_networks(VALUE c)
|
|
1359
1328
|
* call-seq:
|
1360
1329
|
* conn.num_of_defined_networks -> Fixnum
|
1361
1330
|
*
|
1362
|
-
* Call virConnectNumOfDefinedNetworks[
|
1331
|
+
* Call virConnectNumOfDefinedNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectNumOfDefinedNetworks]
|
1363
1332
|
* to retrieve the number of inactive networks on this connection.
|
1364
1333
|
*/
|
1365
1334
|
static VALUE libvirt_connect_num_of_defined_networks(VALUE c)
|
@@ -1371,7 +1340,7 @@ static VALUE libvirt_connect_num_of_defined_networks(VALUE c)
|
|
1371
1340
|
* call-seq:
|
1372
1341
|
* conn.list_of_defined_networks -> list
|
1373
1342
|
*
|
1374
|
-
* Call virConnectListDefinedNetworks[
|
1343
|
+
* Call virConnectListDefinedNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListDefinedNetworks]
|
1375
1344
|
* to retrieve a list of inactive network names on this connection.
|
1376
1345
|
*/
|
1377
1346
|
static VALUE libvirt_connect_list_defined_networks(VALUE c)
|
@@ -1383,7 +1352,7 @@ static VALUE libvirt_connect_list_defined_networks(VALUE c)
|
|
1383
1352
|
* call-seq:
|
1384
1353
|
* conn.lookup_network_by_name(name) -> Libvirt::Network
|
1385
1354
|
*
|
1386
|
-
* Call virNetworkLookupByName[
|
1355
|
+
* Call virNetworkLookupByName[https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkLookupByName]
|
1387
1356
|
* to retrieve a network object by name.
|
1388
1357
|
*/
|
1389
1358
|
static VALUE libvirt_connect_lookup_network_by_name(VALUE c, VALUE name)
|
@@ -1403,7 +1372,7 @@ static VALUE libvirt_connect_lookup_network_by_name(VALUE c, VALUE name)
|
|
1403
1372
|
* call-seq:
|
1404
1373
|
* conn.lookup_network_by_uuid(uuid) -> Libvirt::Network
|
1405
1374
|
*
|
1406
|
-
* Call virNetworkLookupByUUIDString[
|
1375
|
+
* Call virNetworkLookupByUUIDString[https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkLookupByUUIDString]
|
1407
1376
|
* to retrieve a network object by UUID.
|
1408
1377
|
*/
|
1409
1378
|
static VALUE libvirt_connect_lookup_network_by_uuid(VALUE c, VALUE uuid)
|
@@ -1423,7 +1392,7 @@ static VALUE libvirt_connect_lookup_network_by_uuid(VALUE c, VALUE uuid)
|
|
1423
1392
|
* call-seq:
|
1424
1393
|
* conn.create_network_xml(xml) -> Libvirt::Network
|
1425
1394
|
*
|
1426
|
-
* Call virNetworkCreateXML[
|
1395
|
+
* Call virNetworkCreateXML[https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkCreateXML]
|
1427
1396
|
* to start a new transient network from xml.
|
1428
1397
|
*/
|
1429
1398
|
static VALUE libvirt_connect_create_network_xml(VALUE c, VALUE xml)
|
@@ -1442,7 +1411,7 @@ static VALUE libvirt_connect_create_network_xml(VALUE c, VALUE xml)
|
|
1442
1411
|
* call-seq:
|
1443
1412
|
* conn.define_network_xml(xml) -> Libvirt::Network
|
1444
1413
|
*
|
1445
|
-
* Call virNetworkDefineXML[
|
1414
|
+
* Call virNetworkDefineXML[https://libvirt.org/html/libvirt-libvirt-network.html#virNetworkDefineXML]
|
1446
1415
|
* to define a new permanent network from xml.
|
1447
1416
|
*/
|
1448
1417
|
static VALUE libvirt_connect_define_network_xml(VALUE c, VALUE xml)
|
@@ -1458,13 +1427,12 @@ static VALUE libvirt_connect_define_network_xml(VALUE c, VALUE xml)
|
|
1458
1427
|
return ruby_libvirt_network_new(netw, c);
|
1459
1428
|
}
|
1460
1429
|
|
1461
|
-
#if HAVE_TYPE_VIRNODEDEVICEPTR
|
1462
1430
|
|
1463
1431
|
/*
|
1464
1432
|
* call-seq:
|
1465
1433
|
* conn.num_of_nodedevices(cap=nil, flags=0) -> Fixnum
|
1466
1434
|
*
|
1467
|
-
* Call virNodeNumOfDevices[
|
1435
|
+
* Call virNodeNumOfDevices[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeNumOfDevices]
|
1468
1436
|
* to retrieve the number of node devices on this connection.
|
1469
1437
|
*/
|
1470
1438
|
static VALUE libvirt_connect_num_of_nodedevices(int argc, VALUE *argv, VALUE c)
|
@@ -1488,7 +1456,7 @@ static VALUE libvirt_connect_num_of_nodedevices(int argc, VALUE *argv, VALUE c)
|
|
1488
1456
|
* call-seq:
|
1489
1457
|
* conn.list_nodedevices(cap=nil, flags=0) -> list
|
1490
1458
|
*
|
1491
|
-
* Call virNodeListDevices[
|
1459
|
+
* Call virNodeListDevices[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeListDevices]
|
1492
1460
|
* to retrieve a list of node device names on this connection.
|
1493
1461
|
*/
|
1494
1462
|
static VALUE libvirt_connect_list_nodedevices(int argc, VALUE *argv, VALUE c)
|
@@ -1529,7 +1497,7 @@ static VALUE libvirt_connect_list_nodedevices(int argc, VALUE *argv, VALUE c)
|
|
1529
1497
|
* call-seq:
|
1530
1498
|
* conn.lookup_nodedevice_by_name(name) -> Libvirt::NodeDevice
|
1531
1499
|
*
|
1532
|
-
* Call virNodeDeviceLookupByName[
|
1500
|
+
* Call virNodeDeviceLookupByName[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceLookupByName]
|
1533
1501
|
* to retrieve a nodedevice object by name.
|
1534
1502
|
*/
|
1535
1503
|
static VALUE libvirt_connect_lookup_nodedevice_by_name(VALUE c, VALUE name)
|
@@ -1546,12 +1514,11 @@ static VALUE libvirt_connect_lookup_nodedevice_by_name(VALUE c, VALUE name)
|
|
1546
1514
|
|
1547
1515
|
}
|
1548
1516
|
|
1549
|
-
#if HAVE_VIRNODEDEVICECREATEXML
|
1550
1517
|
/*
|
1551
1518
|
* call-seq:
|
1552
1519
|
* conn.create_nodedevice_xml(xml, flags=0) -> Libvirt::NodeDevice
|
1553
1520
|
*
|
1554
|
-
* Call virNodeDeviceCreateXML[
|
1521
|
+
* Call virNodeDeviceCreateXML[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virNodeDeviceCreateXML]
|
1555
1522
|
* to create a new node device from xml.
|
1556
1523
|
*/
|
1557
1524
|
static VALUE libvirt_connect_create_nodedevice_xml(int argc, VALUE *argv,
|
@@ -1571,16 +1538,13 @@ static VALUE libvirt_connect_create_nodedevice_xml(int argc, VALUE *argv,
|
|
1571
1538
|
|
1572
1539
|
return ruby_libvirt_nodedevice_new(nodedev, c);
|
1573
1540
|
}
|
1574
|
-
#endif
|
1575
|
-
#endif
|
1576
1541
|
|
1577
|
-
#if HAVE_TYPE_VIRNWFILTERPTR
|
1578
1542
|
|
1579
1543
|
/*
|
1580
1544
|
* call-seq:
|
1581
1545
|
* conn.num_of_nwfilters -> Fixnum
|
1582
1546
|
*
|
1583
|
-
* Call virConnectNumOfNWFilters[
|
1547
|
+
* Call virConnectNumOfNWFilters[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectNumOfNWFilters]
|
1584
1548
|
* to retrieve the number of network filters on this connection.
|
1585
1549
|
*/
|
1586
1550
|
static VALUE libvirt_connect_num_of_nwfilters(VALUE c)
|
@@ -1592,7 +1556,7 @@ static VALUE libvirt_connect_num_of_nwfilters(VALUE c)
|
|
1592
1556
|
* call-seq:
|
1593
1557
|
* conn.list_nwfilters -> list
|
1594
1558
|
*
|
1595
|
-
* Call virConnectListNWFilters[
|
1559
|
+
* Call virConnectListNWFilters[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListNWFilters]
|
1596
1560
|
* to retrieve a list of network filter names on this connection.
|
1597
1561
|
*/
|
1598
1562
|
static VALUE libvirt_connect_list_nwfilters(VALUE c)
|
@@ -1604,7 +1568,7 @@ static VALUE libvirt_connect_list_nwfilters(VALUE c)
|
|
1604
1568
|
* call-seq:
|
1605
1569
|
* conn.lookup_nwfilter_by_name(name) -> Libvirt::NWFilter
|
1606
1570
|
*
|
1607
|
-
* Call virNWFilterLookupByName[
|
1571
|
+
* Call virNWFilterLookupByName[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterLookupByName]
|
1608
1572
|
* to retrieve a network filter object by name.
|
1609
1573
|
*/
|
1610
1574
|
static VALUE libvirt_connect_lookup_nwfilter_by_name(VALUE c, VALUE name)
|
@@ -1624,7 +1588,7 @@ static VALUE libvirt_connect_lookup_nwfilter_by_name(VALUE c, VALUE name)
|
|
1624
1588
|
* call-seq:
|
1625
1589
|
* conn.lookup_nwfilter_by_uuid(uuid) -> Libvirt::NWFilter
|
1626
1590
|
*
|
1627
|
-
* Call virNWFilterLookupByUUIDString[
|
1591
|
+
* Call virNWFilterLookupByUUIDString[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterLookupByUUIDString]
|
1628
1592
|
* to retrieve a network filter object by UUID.
|
1629
1593
|
*/
|
1630
1594
|
static VALUE libvirt_connect_lookup_nwfilter_by_uuid(VALUE c, VALUE uuid)
|
@@ -1644,7 +1608,7 @@ static VALUE libvirt_connect_lookup_nwfilter_by_uuid(VALUE c, VALUE uuid)
|
|
1644
1608
|
* call-seq:
|
1645
1609
|
* conn.define_nwfilter_xml(xml) -> Libvirt::NWFilter
|
1646
1610
|
*
|
1647
|
-
* Call virNWFilterDefineXML[
|
1611
|
+
* Call virNWFilterDefineXML[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virNWFilterDefineXML]
|
1648
1612
|
* to define a new network filter from xml.
|
1649
1613
|
*/
|
1650
1614
|
static VALUE libvirt_connect_define_nwfilter_xml(VALUE c, VALUE xml)
|
@@ -1659,15 +1623,13 @@ static VALUE libvirt_connect_define_nwfilter_xml(VALUE c, VALUE xml)
|
|
1659
1623
|
|
1660
1624
|
return ruby_libvirt_nwfilter_new(nwfilter, c);
|
1661
1625
|
}
|
1662
|
-
#endif
|
1663
1626
|
|
1664
|
-
#if HAVE_TYPE_VIRSECRETPTR
|
1665
1627
|
|
1666
1628
|
/*
|
1667
1629
|
* call-seq:
|
1668
1630
|
* conn.num_of_secrets -> Fixnum
|
1669
1631
|
*
|
1670
|
-
* Call virConnectNumOfSecrets[
|
1632
|
+
* Call virConnectNumOfSecrets[https://libvirt.org/html/libvirt-libvirt-secret.html#virConnectNumOfSecrets]
|
1671
1633
|
* to retrieve the number of secrets on this connection.
|
1672
1634
|
*/
|
1673
1635
|
static VALUE libvirt_connect_num_of_secrets(VALUE c)
|
@@ -1679,7 +1641,7 @@ static VALUE libvirt_connect_num_of_secrets(VALUE c)
|
|
1679
1641
|
* call-seq:
|
1680
1642
|
* conn.list_secrets -> list
|
1681
1643
|
*
|
1682
|
-
* Call virConnectListSecrets[
|
1644
|
+
* Call virConnectListSecrets[https://libvirt.org/html/libvirt-libvirt-secret.html#virConnectListSecrets]
|
1683
1645
|
* to retrieve a list of secret UUIDs on this connection.
|
1684
1646
|
*/
|
1685
1647
|
static VALUE libvirt_connect_list_secrets(VALUE c)
|
@@ -1691,7 +1653,7 @@ static VALUE libvirt_connect_list_secrets(VALUE c)
|
|
1691
1653
|
* call-seq:
|
1692
1654
|
* conn.lookup_secret_by_uuid(uuid) -> Libvirt::Secret
|
1693
1655
|
*
|
1694
|
-
* Call virSecretLookupByUUID[
|
1656
|
+
* Call virSecretLookupByUUID[https://libvirt.org/html/libvirt-libvirt-secret.html#virSecretLookupByUUID]
|
1695
1657
|
* to retrieve a network object from uuid.
|
1696
1658
|
*/
|
1697
1659
|
static VALUE libvirt_connect_lookup_secret_by_uuid(VALUE c, VALUE uuid)
|
@@ -1711,7 +1673,7 @@ static VALUE libvirt_connect_lookup_secret_by_uuid(VALUE c, VALUE uuid)
|
|
1711
1673
|
* call-seq:
|
1712
1674
|
* conn.lookup_secret_by_usage(usagetype, usageID) -> Libvirt::Secret
|
1713
1675
|
*
|
1714
|
-
* Call virSecretLookupByUsage[
|
1676
|
+
* Call virSecretLookupByUsage[https://libvirt.org/html/libvirt-libvirt-secret.html#virSecretLookupByUsage]
|
1715
1677
|
* to retrieve a secret by usagetype.
|
1716
1678
|
*/
|
1717
1679
|
static VALUE libvirt_connect_lookup_secret_by_usage(VALUE c, VALUE usagetype,
|
@@ -1733,7 +1695,7 @@ static VALUE libvirt_connect_lookup_secret_by_usage(VALUE c, VALUE usagetype,
|
|
1733
1695
|
* call-seq:
|
1734
1696
|
* conn.define_secret_xml(xml, flags=0) -> Libvirt::Secret
|
1735
1697
|
*
|
1736
|
-
* Call virSecretDefineXML[
|
1698
|
+
* Call virSecretDefineXML[https://libvirt.org/html/libvirt-libvirt-secret.html#virSecretDefineXML]
|
1737
1699
|
* to define a new secret from xml.
|
1738
1700
|
*/
|
1739
1701
|
static VALUE libvirt_connect_define_secret_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1752,9 +1714,7 @@ static VALUE libvirt_connect_define_secret_xml(int argc, VALUE *argv, VALUE c)
|
|
1752
1714
|
|
1753
1715
|
return ruby_libvirt_secret_new(secret, c);
|
1754
1716
|
}
|
1755
|
-
#endif
|
1756
1717
|
|
1757
|
-
#if HAVE_TYPE_VIRSTORAGEPOOLPTR
|
1758
1718
|
|
1759
1719
|
VALUE pool_new(virStoragePoolPtr n, VALUE conn);
|
1760
1720
|
|
@@ -1762,7 +1722,7 @@ VALUE pool_new(virStoragePoolPtr n, VALUE conn);
|
|
1762
1722
|
* call-seq:
|
1763
1723
|
* conn.list_storage_pools -> list
|
1764
1724
|
*
|
1765
|
-
* Call virConnectListStoragePools[
|
1725
|
+
* Call virConnectListStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectListStoragePools]
|
1766
1726
|
* to retrieve a list of active storage pool names on this connection.
|
1767
1727
|
*/
|
1768
1728
|
static VALUE libvirt_connect_list_storage_pools(VALUE c)
|
@@ -1774,7 +1734,7 @@ static VALUE libvirt_connect_list_storage_pools(VALUE c)
|
|
1774
1734
|
* call-seq:
|
1775
1735
|
* conn.num_of_storage_pools -> Fixnum
|
1776
1736
|
*
|
1777
|
-
* Call virConnectNumOfStoragePools[
|
1737
|
+
* Call virConnectNumOfStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectNumOfStoragePools]
|
1778
1738
|
* to retrieve the number of active storage pools on this connection.
|
1779
1739
|
*/
|
1780
1740
|
static VALUE libvirt_connect_num_of_storage_pools(VALUE c)
|
@@ -1786,7 +1746,7 @@ static VALUE libvirt_connect_num_of_storage_pools(VALUE c)
|
|
1786
1746
|
* call-seq:
|
1787
1747
|
* conn.list_defined_storage_pools -> list
|
1788
1748
|
*
|
1789
|
-
* Call virConnectListDefinedStoragePools[
|
1749
|
+
* Call virConnectListDefinedStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectListDefinedStoragePools]
|
1790
1750
|
* to retrieve a list of inactive storage pool names on this connection.
|
1791
1751
|
*/
|
1792
1752
|
static VALUE libvirt_connect_list_defined_storage_pools(VALUE c)
|
@@ -1798,7 +1758,7 @@ static VALUE libvirt_connect_list_defined_storage_pools(VALUE c)
|
|
1798
1758
|
* call-seq:
|
1799
1759
|
* conn.num_of_defined_storage_pools -> Fixnum
|
1800
1760
|
*
|
1801
|
-
* Call virConnectNumOfDefinedStoragePools[
|
1761
|
+
* Call virConnectNumOfDefinedStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectNumOfDefinedStoragePools]
|
1802
1762
|
* to retrieve the number of inactive storage pools on this connection.
|
1803
1763
|
*/
|
1804
1764
|
static VALUE libvirt_connect_num_of_defined_storage_pools(VALUE c)
|
@@ -1810,7 +1770,7 @@ static VALUE libvirt_connect_num_of_defined_storage_pools(VALUE c)
|
|
1810
1770
|
* call-seq:
|
1811
1771
|
* conn.lookup_storage_pool_by_name(name) -> Libvirt::StoragePool
|
1812
1772
|
*
|
1813
|
-
* Call virStoragePoolLookupByName[
|
1773
|
+
* Call virStoragePoolLookupByName[https://libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolLookupByName]
|
1814
1774
|
* to retrieve a storage pool object by name.
|
1815
1775
|
*/
|
1816
1776
|
static VALUE libvirt_connect_lookup_pool_by_name(VALUE c, VALUE name)
|
@@ -1830,7 +1790,7 @@ static VALUE libvirt_connect_lookup_pool_by_name(VALUE c, VALUE name)
|
|
1830
1790
|
* call-seq:
|
1831
1791
|
* conn.lookup_storage_pool_by_uuid(uuid) -> Libvirt::StoragePool
|
1832
1792
|
*
|
1833
|
-
* Call virStoragePoolLookupByUUIDString[
|
1793
|
+
* Call virStoragePoolLookupByUUIDString[https://libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolLookupByUUIDString]
|
1834
1794
|
* to retrieve a storage pool object by uuid.
|
1835
1795
|
*/
|
1836
1796
|
static VALUE libvirt_connect_lookup_pool_by_uuid(VALUE c, VALUE uuid)
|
@@ -1850,7 +1810,7 @@ static VALUE libvirt_connect_lookup_pool_by_uuid(VALUE c, VALUE uuid)
|
|
1850
1810
|
* call-seq:
|
1851
1811
|
* conn.create_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
|
1852
1812
|
*
|
1853
|
-
* Call virStoragePoolCreateXML[
|
1813
|
+
* Call virStoragePoolCreateXML[https://libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolCreateXML]
|
1854
1814
|
* to start a new transient storage pool from xml.
|
1855
1815
|
*/
|
1856
1816
|
static VALUE libvirt_connect_create_pool_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1874,7 +1834,7 @@ static VALUE libvirt_connect_create_pool_xml(int argc, VALUE *argv, VALUE c)
|
|
1874
1834
|
* call-seq:
|
1875
1835
|
* conn.define_storage_pool_xml(xml, flags=0) -> Libvirt::StoragePool
|
1876
1836
|
*
|
1877
|
-
* Call virStoragePoolDefineXML[
|
1837
|
+
* Call virStoragePoolDefineXML[https://libvirt.org/html/libvirt-libvirt-storage.html#virStoragePoolDefineXML]
|
1878
1838
|
* to define a permanent storage pool from xml.
|
1879
1839
|
*/
|
1880
1840
|
static VALUE libvirt_connect_define_pool_xml(int argc, VALUE *argv, VALUE c)
|
@@ -1898,7 +1858,7 @@ static VALUE libvirt_connect_define_pool_xml(int argc, VALUE *argv, VALUE c)
|
|
1898
1858
|
* call-seq:
|
1899
1859
|
* conn.discover_storage_pool_sources(type, srcSpec=nil, flags=0) -> String
|
1900
1860
|
*
|
1901
|
-
* Call virConnectFindStoragePoolSources[
|
1861
|
+
* Call virConnectFindStoragePoolSources[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectFindStoragePoolSources]
|
1902
1862
|
* to find the storage pool sources corresponding to type.
|
1903
1863
|
*/
|
1904
1864
|
static VALUE libvirt_connect_find_storage_pool_sources(int argc, VALUE *argv,
|
@@ -1915,14 +1875,12 @@ static VALUE libvirt_connect_find_storage_pool_sources(int argc, VALUE *argv,
|
|
1915
1875
|
ruby_libvirt_get_cstring_or_null(srcSpec),
|
1916
1876
|
ruby_libvirt_value_to_uint(flags));
|
1917
1877
|
}
|
1918
|
-
#endif
|
1919
1878
|
|
1920
|
-
#if HAVE_VIRCONNECTGETSYSINFO
|
1921
1879
|
/*
|
1922
1880
|
* call-seq:
|
1923
1881
|
* conn.sys_info(flags=0) -> String
|
1924
1882
|
*
|
1925
|
-
* Call virConnectGetSysinfo[
|
1883
|
+
* Call virConnectGetSysinfo[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetSysinfo]
|
1926
1884
|
* to get machine-specific information about the hypervisor. This may include
|
1927
1885
|
* data such as the host UUID, the BIOS version, etc.
|
1928
1886
|
*/
|
@@ -1937,15 +1895,12 @@ static VALUE libvirt_connect_sys_info(int argc, VALUE *argv, VALUE c)
|
|
1937
1895
|
ruby_libvirt_connect_get(c),
|
1938
1896
|
ruby_libvirt_value_to_uint(flags));
|
1939
1897
|
}
|
1940
|
-
#endif
|
1941
|
-
|
1942
|
-
#if HAVE_TYPE_VIRSTREAMPTR
|
1943
1898
|
|
1944
1899
|
/*
|
1945
1900
|
* call-seq:
|
1946
1901
|
* conn.stream(flags=0) -> Libvirt::Stream
|
1947
1902
|
*
|
1948
|
-
* Call virStreamNew[
|
1903
|
+
* Call virStreamNew[https://libvirt.org/html/libvirt-libvirt-stream.html#virStreamNew]
|
1949
1904
|
* to create a new stream.
|
1950
1905
|
*/
|
1951
1906
|
static VALUE libvirt_connect_stream(int argc, VALUE *argv, VALUE c)
|
@@ -1963,14 +1918,12 @@ static VALUE libvirt_connect_stream(int argc, VALUE *argv, VALUE c)
|
|
1963
1918
|
|
1964
1919
|
return ruby_libvirt_stream_new(stream, c);
|
1965
1920
|
}
|
1966
|
-
#endif
|
1967
1921
|
|
1968
|
-
#if HAVE_VIRINTERFACECHANGEBEGIN
|
1969
1922
|
/*
|
1970
1923
|
* call-seq:
|
1971
1924
|
* conn.interface_change_begin(flags=0) -> nil
|
1972
1925
|
*
|
1973
|
-
* Call virInterfaceChangeBegin[
|
1926
|
+
* Call virInterfaceChangeBegin[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeBegin]
|
1974
1927
|
* to create a restore point for interface changes. Once changes have been
|
1975
1928
|
* made, conn.interface_change_commit can be used to commit the result or
|
1976
1929
|
* conn.interface_change_rollback can be used to rollback to this restore point.
|
@@ -1992,7 +1945,7 @@ static VALUE libvirt_connect_interface_change_begin(int argc, VALUE *argv,
|
|
1992
1945
|
* call-seq:
|
1993
1946
|
* conn.interface_change_commit(flags=0) -> nil
|
1994
1947
|
*
|
1995
|
-
* Call virInterfaceChangeCommit[
|
1948
|
+
* Call virInterfaceChangeCommit[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeCommit]
|
1996
1949
|
* to commit the interface changes since the last conn.interface_change_begin.
|
1997
1950
|
*/
|
1998
1951
|
static VALUE libvirt_connect_interface_change_commit(int argc, VALUE *argv,
|
@@ -2012,7 +1965,7 @@ static VALUE libvirt_connect_interface_change_commit(int argc, VALUE *argv,
|
|
2012
1965
|
* call-seq:
|
2013
1966
|
* conn.interface_change_rollback(flags=0) -> nil
|
2014
1967
|
*
|
2015
|
-
* Call virInterfaceChangeRollback[
|
1968
|
+
* Call virInterfaceChangeRollback[https://libvirt.org/html/libvirt-libvirt-interface.html#virInterfaceChangeRollback]
|
2016
1969
|
* to rollback to the restore point saved by conn.interface_change_begin.
|
2017
1970
|
*/
|
2018
1971
|
static VALUE libvirt_connect_interface_change_rollback(int argc, VALUE *argv,
|
@@ -2027,9 +1980,7 @@ static VALUE libvirt_connect_interface_change_rollback(int argc, VALUE *argv,
|
|
2027
1980
|
ruby_libvirt_connect_get(c),
|
2028
1981
|
ruby_libvirt_value_to_uint(flags));
|
2029
1982
|
}
|
2030
|
-
#endif
|
2031
1983
|
|
2032
|
-
#if HAVE_VIRNODEGETCPUSTATS
|
2033
1984
|
static void cpu_stats_set(void *voidparams, int i, VALUE result)
|
2034
1985
|
{
|
2035
1986
|
virNodeCPUStatsPtr params = (virNodeCPUStatsPtr)voidparams;
|
@@ -2069,7 +2020,7 @@ static const char *cpu_stats_get(VALUE d, unsigned int flags, void *voidparams,
|
|
2069
2020
|
* call-seq:
|
2070
2021
|
* conn.node_cpu_stats(cpuNum=-1, flags=0) -> Hash
|
2071
2022
|
*
|
2072
|
-
* Call virNodeGetCPUStats[
|
2023
|
+
* Call virNodeGetCPUStats[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUStats]
|
2073
2024
|
* to retrieve cpu statistics from the virtualization host.
|
2074
2025
|
*/
|
2075
2026
|
static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
|
@@ -2079,16 +2030,19 @@ static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
|
|
2079
2030
|
|
2080
2031
|
rb_scan_args(argc, argv, "02", &intparam, &flags);
|
2081
2032
|
|
2082
|
-
|
2033
|
+
if (NIL_P(intparam)) {
|
2034
|
+
tmp = -1;
|
2035
|
+
}
|
2036
|
+
else {
|
2037
|
+
tmp = ruby_libvirt_value_to_int(intparam);
|
2038
|
+
}
|
2083
2039
|
|
2084
2040
|
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
|
2085
2041
|
(void *)&tmp, sizeof(virNodeCPUStats),
|
2086
2042
|
cpu_stats_nparams, cpu_stats_get,
|
2087
2043
|
cpu_stats_set);
|
2088
2044
|
}
|
2089
|
-
#endif
|
2090
2045
|
|
2091
|
-
#if HAVE_VIRNODEGETMEMORYSTATS
|
2092
2046
|
static void memory_stats_set(void *voidparams, int i, VALUE result)
|
2093
2047
|
{
|
2094
2048
|
virNodeMemoryStatsPtr params = (virNodeMemoryStatsPtr)voidparams;
|
@@ -2129,7 +2083,7 @@ static const char *memory_stats_get(VALUE d, unsigned int flags,
|
|
2129
2083
|
* call-seq:
|
2130
2084
|
* conn.node_memory_stats(cellNum=-1, flags=0) -> Hash
|
2131
2085
|
*
|
2132
|
-
* Call virNodeGetMemoryStats[
|
2086
|
+
* Call virNodeGetMemoryStats[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryStats]
|
2133
2087
|
* to retrieve memory statistics from the virtualization host.
|
2134
2088
|
*/
|
2135
2089
|
static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
|
@@ -2139,21 +2093,24 @@ static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
|
|
2139
2093
|
|
2140
2094
|
rb_scan_args(argc, argv, "02", &intparam, &flags);
|
2141
2095
|
|
2142
|
-
|
2096
|
+
if (NIL_P(intparam)) {
|
2097
|
+
tmp = -1;
|
2098
|
+
}
|
2099
|
+
else {
|
2100
|
+
tmp = ruby_libvirt_value_to_int(intparam);
|
2101
|
+
}
|
2143
2102
|
|
2144
2103
|
return ruby_libvirt_get_parameters(c, ruby_libvirt_value_to_uint(flags),
|
2145
2104
|
(void *)&tmp, sizeof(virNodeMemoryStats),
|
2146
2105
|
memory_stats_nparams, memory_stats_get,
|
2147
2106
|
memory_stats_set);
|
2148
2107
|
}
|
2149
|
-
#endif
|
2150
2108
|
|
2151
|
-
#if HAVE_VIRDOMAINSAVEIMAGEGETXMLDESC
|
2152
2109
|
/*
|
2153
2110
|
* call-seq:
|
2154
2111
|
* conn.save_image_xml_desc(filename, flags=0) -> String
|
2155
2112
|
*
|
2156
|
-
* Call virDomainSaveImageGetXMLDesc[
|
2113
|
+
* Call virDomainSaveImageGetXMLDesc[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageGetXMLDesc]
|
2157
2114
|
* to get the XML corresponding to a save file.
|
2158
2115
|
*/
|
2159
2116
|
static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
|
@@ -2173,7 +2130,7 @@ static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
|
|
2173
2130
|
* call-seq:
|
2174
2131
|
* conn.define_save_image_xml(filename, newxml, flags=0) -> nil
|
2175
2132
|
*
|
2176
|
-
* Call virDomainSaveImageDefineXML[
|
2133
|
+
* Call virDomainSaveImageDefineXML[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageDefineXML]
|
2177
2134
|
* to define new XML for a saved image.
|
2178
2135
|
*/
|
2179
2136
|
static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
|
@@ -2190,14 +2147,12 @@ static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
|
|
2190
2147
|
StringValueCStr(newxml),
|
2191
2148
|
ruby_libvirt_value_to_uint(flags));
|
2192
2149
|
}
|
2193
|
-
#endif
|
2194
2150
|
|
2195
|
-
#if HAVE_VIRNODESUSPENDFORDURATION
|
2196
2151
|
/*
|
2197
2152
|
* call-seq:
|
2198
2153
|
* conn.node_suspend_for_duration(target, duration, flags=0) -> nil
|
2199
2154
|
*
|
2200
|
-
* Call virNodeSuspendForDuration[
|
2155
|
+
* Call virNodeSuspendForDuration[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeSuspendForDuration]
|
2201
2156
|
* to suspend the hypervisor for the specified duration.
|
2202
2157
|
*/
|
2203
2158
|
static VALUE libvirt_connect_node_suspend_for_duration(int argc, VALUE *argv,
|
@@ -2213,9 +2168,7 @@ static VALUE libvirt_connect_node_suspend_for_duration(int argc, VALUE *argv,
|
|
2213
2168
|
NUM2UINT(target), NUM2ULL(duration),
|
2214
2169
|
ruby_libvirt_value_to_uint(flags));
|
2215
2170
|
}
|
2216
|
-
#endif
|
2217
2171
|
|
2218
|
-
#if HAVE_VIRNODEGETMEMORYPARAMETERS
|
2219
2172
|
static const char *node_memory_nparams(VALUE d, unsigned int flags,
|
2220
2173
|
void *RUBY_LIBVIRT_UNUSED(opaque),
|
2221
2174
|
int *nparams)
|
@@ -2256,7 +2209,7 @@ static const char *node_memory_set(VALUE d, unsigned int flags,
|
|
2256
2209
|
* call-seq:
|
2257
2210
|
* conn.node_memory_parameters(flags=0) -> Hash
|
2258
2211
|
*
|
2259
|
-
* Call virNodeGetMemoryParameters[
|
2212
|
+
* Call virNodeGetMemoryParameters[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryParameters]
|
2260
2213
|
* to get information about memory on the host node.
|
2261
2214
|
*/
|
2262
2215
|
static VALUE libvirt_connect_node_memory_parameters(int argc, VALUE *argv,
|
@@ -2280,16 +2233,14 @@ static struct ruby_libvirt_typed_param memory_allowed[] = {
|
|
2280
2233
|
{VIR_NODE_MEMORY_SHARED_PAGES_UNSHARED, VIR_TYPED_PARAM_ULLONG},
|
2281
2234
|
{VIR_NODE_MEMORY_SHARED_PAGES_VOLATILE, VIR_TYPED_PARAM_ULLONG},
|
2282
2235
|
{VIR_NODE_MEMORY_SHARED_FULL_SCANS, VIR_TYPED_PARAM_ULLONG},
|
2283
|
-
#if HAVE_CONST_VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES
|
2284
2236
|
{VIR_NODE_MEMORY_SHARED_MERGE_ACROSS_NODES, VIR_TYPED_PARAM_UINT},
|
2285
|
-
#endif
|
2286
2237
|
};
|
2287
2238
|
|
2288
2239
|
/*
|
2289
2240
|
* call-seq:
|
2290
2241
|
* conn.node_memory_parameters = Hash,flags=0
|
2291
2242
|
*
|
2292
|
-
* Call virNodeSetMemoryParameters[
|
2243
|
+
* Call virNodeSetMemoryParameters[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeSetMemoryParameters]
|
2293
2244
|
* to set the memory parameters for this host node.
|
2294
2245
|
*/
|
2295
2246
|
static VALUE libvirt_connect_node_memory_parameters_equal(VALUE c, VALUE input)
|
@@ -2303,9 +2254,7 @@ static VALUE libvirt_connect_node_memory_parameters_equal(VALUE c, VALUE input)
|
|
2303
2254
|
ARRAY_SIZE(memory_allowed),
|
2304
2255
|
node_memory_set);
|
2305
2256
|
}
|
2306
|
-
#endif
|
2307
2257
|
|
2308
|
-
#if HAVE_VIRNODEGETCPUMAP
|
2309
2258
|
struct cpu_map_field_to_value {
|
2310
2259
|
VALUE result;
|
2311
2260
|
int cpu;
|
@@ -2327,7 +2276,7 @@ static VALUE cpu_map_field_to_value(VALUE input)
|
|
2327
2276
|
* call-seq:
|
2328
2277
|
* conn.node_cpu_map -> Hash
|
2329
2278
|
*
|
2330
|
-
* Call virNodeGetCPUMap[
|
2279
|
+
* Call virNodeGetCPUMap[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUMap]
|
2331
2280
|
* to get a map of online host CPUs.
|
2332
2281
|
*/
|
2333
2282
|
static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
|
@@ -2362,14 +2311,12 @@ static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
|
|
2362
2311
|
|
2363
2312
|
return result;
|
2364
2313
|
}
|
2365
|
-
#endif
|
2366
2314
|
|
2367
|
-
#if HAVE_VIRCONNECTSETKEEPALIVE
|
2368
2315
|
/*
|
2369
2316
|
* call-seq:
|
2370
2317
|
* conn.set_keepalive(interval, count) -> Fixnum
|
2371
2318
|
*
|
2372
|
-
* Call virConnectSetKeepAlive[
|
2319
|
+
* Call virConnectSetKeepAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
|
2373
2320
|
* to start sending keepalive messages. Deprecated; use conn.keepalive=
|
2374
2321
|
* instead.
|
2375
2322
|
*/
|
@@ -2385,7 +2332,7 @@ static VALUE libvirt_connect_set_keepalive(VALUE c, VALUE interval, VALUE count)
|
|
2385
2332
|
* call-seq:
|
2386
2333
|
* conn.keepalive = interval,count
|
2387
2334
|
*
|
2388
|
-
* Call virConnectSetKeepAlive[
|
2335
|
+
* Call virConnectSetKeepAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
|
2389
2336
|
* to start sending keepalive messages.
|
2390
2337
|
*/
|
2391
2338
|
static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
|
@@ -2407,14 +2354,12 @@ static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
|
|
2407
2354
|
ruby_libvirt_connect_get(c),
|
2408
2355
|
NUM2INT(interval), NUM2UINT(count));
|
2409
2356
|
}
|
2410
|
-
#endif
|
2411
2357
|
|
2412
|
-
#if HAVE_VIRCONNECTLISTALLDOMAINS
|
2413
2358
|
/*
|
2414
2359
|
* call-seq:
|
2415
2360
|
* conn.list_all_domains(flags=0) -> Array
|
2416
2361
|
*
|
2417
|
-
* Call virConnectListAllDomains[
|
2362
|
+
* Call virConnectListAllDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectListAllDomains]
|
2418
2363
|
* to get an array of domain objects for all domains.
|
2419
2364
|
*/
|
2420
2365
|
static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
|
@@ -2424,14 +2369,12 @@ static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
|
|
2424
2369
|
ruby_libvirt_connect_get(c), c,
|
2425
2370
|
ruby_libvirt_domain_new, virDomainFree);
|
2426
2371
|
}
|
2427
|
-
#endif
|
2428
2372
|
|
2429
|
-
#if HAVE_VIRCONNECTLISTALLNETWORKS
|
2430
2373
|
/*
|
2431
2374
|
* call-seq:
|
2432
2375
|
* conn.list_all_networks(flags=0) -> Array
|
2433
2376
|
*
|
2434
|
-
* Call virConnectListAllNetworks[
|
2377
|
+
* Call virConnectListAllNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks]
|
2435
2378
|
* to get an array of network objects for all networks.
|
2436
2379
|
*/
|
2437
2380
|
static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
|
@@ -2442,14 +2385,12 @@ static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
|
|
2442
2385
|
ruby_libvirt_network_new,
|
2443
2386
|
virNetworkFree);
|
2444
2387
|
}
|
2445
|
-
#endif
|
2446
2388
|
|
2447
|
-
#if HAVE_VIRCONNECTLISTALLINTERFACES
|
2448
2389
|
/*
|
2449
2390
|
* call-seq:
|
2450
2391
|
* conn.list_all_interfaces(flags=0) -> Array
|
2451
2392
|
*
|
2452
|
-
* Call virConnectListAllInterfaces[
|
2393
|
+
* Call virConnectListAllInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectListAllInterfaces]
|
2453
2394
|
* to get an array of interface objects for all interfaces.
|
2454
2395
|
*/
|
2455
2396
|
static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
|
@@ -2460,14 +2401,12 @@ static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
|
|
2460
2401
|
ruby_libvirt_interface_new,
|
2461
2402
|
virInterfaceFree);
|
2462
2403
|
}
|
2463
|
-
#endif
|
2464
2404
|
|
2465
|
-
#if HAVE_VIRCONNECTLISTALLSECRETS
|
2466
2405
|
/*
|
2467
2406
|
* call-seq:
|
2468
2407
|
* conn.list_all_secrets(flags=0) -> Array
|
2469
2408
|
*
|
2470
|
-
* Call virConnectListAllSecrets[
|
2409
|
+
* Call virConnectListAllSecrets[https://libvirt.org/html/libvirt-libvirt-secret.html#virConnectListAllSecrets]
|
2471
2410
|
* to get an array of secret objects for all secrets.
|
2472
2411
|
*/
|
2473
2412
|
static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
|
@@ -2477,14 +2416,12 @@ static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
|
|
2477
2416
|
ruby_libvirt_connect_get(c), c,
|
2478
2417
|
ruby_libvirt_secret_new, virSecretFree);
|
2479
2418
|
}
|
2480
|
-
#endif
|
2481
2419
|
|
2482
|
-
#if HAVE_VIRCONNECTLISTALLNODEDEVICES
|
2483
2420
|
/*
|
2484
2421
|
* call-seq:
|
2485
2422
|
* conn.list_all_nodedevices(flags=0) -> Array
|
2486
2423
|
*
|
2487
|
-
* Call virConnectListAllNodeDevices[
|
2424
|
+
* Call virConnectListAllNodeDevices[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virConnectListAllNodeDevices]
|
2488
2425
|
* to get an array of nodedevice objects for all nodedevices.
|
2489
2426
|
*/
|
2490
2427
|
static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
|
@@ -2496,14 +2433,12 @@ static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
|
|
2496
2433
|
ruby_libvirt_nodedevice_new,
|
2497
2434
|
virNodeDeviceFree);
|
2498
2435
|
}
|
2499
|
-
#endif
|
2500
2436
|
|
2501
|
-
#if HAVE_VIRCONNECTLISTALLSTORAGEPOOLS
|
2502
2437
|
/*
|
2503
2438
|
* call-seq:
|
2504
2439
|
* conn.list_all_storage_pools(flags=0) -> Array
|
2505
2440
|
*
|
2506
|
-
* Call virConnectListAllStoragePools[
|
2441
|
+
* Call virConnectListAllStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectListAllStoragePools]
|
2507
2442
|
* to get an array of storage pool objects for all storage pools.
|
2508
2443
|
*/
|
2509
2444
|
static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
|
@@ -2514,14 +2449,12 @@ static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
|
|
2514
2449
|
ruby_libvirt_connect_get(c), c,
|
2515
2450
|
pool_new, virStoragePoolFree);
|
2516
2451
|
}
|
2517
|
-
#endif
|
2518
2452
|
|
2519
|
-
#if HAVE_VIRCONNECTLISTALLNWFILTERS
|
2520
2453
|
/*
|
2521
2454
|
* call-seq:
|
2522
2455
|
* conn.list_all_nwfilters(flags=0) -> Array
|
2523
2456
|
*
|
2524
|
-
* Call virConnectListAllNWFilters[
|
2457
|
+
* Call virConnectListAllNWFilters[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListAllNWFilters]
|
2525
2458
|
* to get an array of nwfilters for all nwfilter objects.
|
2526
2459
|
*/
|
2527
2460
|
static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
|
@@ -2532,14 +2465,12 @@ static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
|
|
2532
2465
|
ruby_libvirt_nwfilter_new,
|
2533
2466
|
virNWFilterFree);
|
2534
2467
|
}
|
2535
|
-
#endif
|
2536
2468
|
|
2537
|
-
#if HAVE_VIRCONNECTISALIVE
|
2538
2469
|
/*
|
2539
2470
|
* call-seq:
|
2540
2471
|
* conn.alive? -> [True|False]
|
2541
2472
|
*
|
2542
|
-
* Call virConnectIsAlive[
|
2473
|
+
* Call virConnectIsAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsAlive]
|
2543
2474
|
* to determine if the connection is alive.
|
2544
2475
|
*/
|
2545
2476
|
static VALUE libvirt_connect_alive_p(VALUE c)
|
@@ -2548,14 +2479,12 @@ static VALUE libvirt_connect_alive_p(VALUE c)
|
|
2548
2479
|
ruby_libvirt_connect_get(c),
|
2549
2480
|
ruby_libvirt_connect_get(c));
|
2550
2481
|
}
|
2551
|
-
#endif
|
2552
2482
|
|
2553
|
-
#if HAVE_VIRDOMAINCREATEXMLWITHFILES
|
2554
2483
|
/*
|
2555
2484
|
* call-seq:
|
2556
2485
|
* conn.create_domain_xml_with_files(xml, fds=nil, flags=0) -> Libvirt::Domain
|
2557
2486
|
*
|
2558
|
-
* Call virDomainCreateXMLWithFiles[
|
2487
|
+
* Call virDomainCreateXMLWithFiles[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXMLWithFiles]
|
2559
2488
|
* to launch a new guest domain with a set of open file descriptors.
|
2560
2489
|
*/
|
2561
2490
|
static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
|
@@ -2595,9 +2524,7 @@ static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
|
|
2595
2524
|
|
2596
2525
|
return ruby_libvirt_domain_new(dom, c);
|
2597
2526
|
}
|
2598
|
-
#endif
|
2599
2527
|
|
2600
|
-
#if HAVE_VIRDOMAINQEMUATTACH
|
2601
2528
|
/*
|
2602
2529
|
* call-seq:
|
2603
2530
|
* conn.qemu_attach(pid, flags=0) -> Libvirt::Domain
|
@@ -2619,14 +2546,12 @@ static VALUE libvirt_connect_qemu_attach(int argc, VALUE *argv, VALUE c)
|
|
2619
2546
|
|
2620
2547
|
return ruby_libvirt_domain_new(dom, c);
|
2621
2548
|
}
|
2622
|
-
#endif
|
2623
2549
|
|
2624
|
-
#if HAVE_VIRCONNECTGETCPUMODELNAMES
|
2625
2550
|
/*
|
2626
2551
|
* call-seq:
|
2627
2552
|
* conn.cpu_model_names(arch, flags=0) -> Array
|
2628
2553
|
*
|
2629
|
-
* Call virConnectGetCPUModelNames[
|
2554
|
+
* Call virConnectGetCPUModelNames[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCPUModelNames]
|
2630
2555
|
* to get an array of CPU model names.
|
2631
2556
|
*/
|
2632
2557
|
static VALUE libvirt_connect_cpu_model_names(int argc, VALUE *argv, VALUE c)
|
@@ -2676,14 +2601,12 @@ error:
|
|
2676
2601
|
rb_jump_tag(exception);
|
2677
2602
|
return Qnil;
|
2678
2603
|
}
|
2679
|
-
#endif
|
2680
2604
|
|
2681
|
-
#if HAVE_VIRNODEALLOCPAGES
|
2682
2605
|
/*
|
2683
2606
|
* call-seq:
|
2684
2607
|
* conn.node_alloc_pages(page_arr, cells=nil, flags=0) -> Fixnum
|
2685
2608
|
*
|
2686
|
-
* Call virNodeAllocPages[
|
2609
|
+
* Call virNodeAllocPages[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeAllocPages]
|
2687
2610
|
* to reserve huge pages in the system pool.
|
2688
2611
|
*/
|
2689
2612
|
static VALUE libvirt_connect_node_alloc_pages(int argc, VALUE *argv, VALUE c)
|
@@ -2742,14 +2665,12 @@ static VALUE libvirt_connect_node_alloc_pages(int argc, VALUE *argv, VALUE c)
|
|
2742
2665
|
|
2743
2666
|
return INT2NUM(ret);
|
2744
2667
|
}
|
2745
|
-
#endif
|
2746
2668
|
|
2747
|
-
#if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
|
2748
2669
|
/*
|
2749
2670
|
* call-seq:
|
2750
2671
|
* conn.domain_capabilities(emulatorbin, arch, machine, virttype, flags=0) -> String
|
2751
2672
|
*
|
2752
|
-
* Call virConnectGetDomainCapabilities[
|
2673
|
+
* Call virConnectGetDomainCapabilities[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities]
|
2753
2674
|
* to get the capabilities of the underlying emulator.
|
2754
2675
|
*/
|
2755
2676
|
static VALUE libvirt_connect_domain_capabilities(int argc, VALUE *argv, VALUE c)
|
@@ -2768,14 +2689,12 @@ static VALUE libvirt_connect_domain_capabilities(int argc, VALUE *argv, VALUE c)
|
|
2768
2689
|
ruby_libvirt_get_cstring_or_null(virttype),
|
2769
2690
|
NUM2UINT(flags));
|
2770
2691
|
}
|
2771
|
-
#endif
|
2772
2692
|
|
2773
|
-
#if HAVE_VIRNODEGETFREEPAGES
|
2774
2693
|
/*
|
2775
2694
|
* call-seq:
|
2776
2695
|
* conn.node_free_pages(pages, cells, flags=0) -> Hash
|
2777
2696
|
*
|
2778
|
-
* Call virNodeGetFreePages[
|
2697
|
+
* Call virNodeGetFreePages[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreePages]
|
2779
2698
|
* to query the host system on free pages of specified size.
|
2780
2699
|
*/
|
2781
2700
|
static VALUE libvirt_connect_node_free_pages(int argc, VALUE *argv, VALUE c)
|
@@ -2815,7 +2734,6 @@ static VALUE libvirt_connect_node_free_pages(int argc, VALUE *argv, VALUE c)
|
|
2815
2734
|
|
2816
2735
|
return result;
|
2817
2736
|
}
|
2818
|
-
#endif
|
2819
2737
|
|
2820
2738
|
/*
|
2821
2739
|
* Class Libvirt::Connect
|
@@ -2850,9 +2768,7 @@ void ruby_libvirt_connect_init(void)
|
|
2850
2768
|
rb_define_method(c_connect, "closed?", libvirt_connect_closed_p, 0);
|
2851
2769
|
rb_define_method(c_connect, "type", libvirt_connect_type, 0);
|
2852
2770
|
rb_define_method(c_connect, "version", libvirt_connect_version, 0);
|
2853
|
-
#if HAVE_VIRCONNECTGETLIBVERSION
|
2854
2771
|
rb_define_method(c_connect, "libversion", libvirt_connect_libversion, 0);
|
2855
|
-
#endif
|
2856
2772
|
rb_define_method(c_connect, "hostname", libvirt_connect_hostname, 0);
|
2857
2773
|
rb_define_method(c_connect, "uri", libvirt_connect_uri, 0);
|
2858
2774
|
rb_define_method(c_connect, "max_vcpus", libvirt_connect_max_vcpus, -1);
|
@@ -2862,22 +2778,15 @@ void ruby_libvirt_connect_init(void)
|
|
2862
2778
|
libvirt_connect_node_free_memory, 0);
|
2863
2779
|
rb_define_method(c_connect, "node_cells_free_memory",
|
2864
2780
|
libvirt_connect_node_cells_free_memory, -1);
|
2865
|
-
#if HAVE_VIRNODEGETSECURITYMODEL
|
2866
2781
|
rb_define_method(c_connect, "node_security_model",
|
2867
2782
|
libvirt_connect_node_security_model, 0);
|
2868
2783
|
rb_define_alias(c_connect, "node_get_security_model",
|
2869
2784
|
"node_security_model");
|
2870
|
-
#endif
|
2871
|
-
#if HAVE_VIRCONNECTISENCRYPTED
|
2872
2785
|
rb_define_method(c_connect, "encrypted?", libvirt_connect_encrypted_p, 0);
|
2873
|
-
#endif
|
2874
|
-
#if HAVE_VIRCONNECTISSECURE
|
2875
2786
|
rb_define_method(c_connect, "secure?", libvirt_connect_secure_p, 0);
|
2876
|
-
#endif
|
2877
2787
|
rb_define_method(c_connect, "capabilities", libvirt_connect_capabilities,
|
2878
2788
|
0);
|
2879
2789
|
|
2880
|
-
#if HAVE_VIRCONNECTCOMPARECPU
|
2881
2790
|
rb_define_const(c_connect, "CPU_COMPARE_ERROR",
|
2882
2791
|
INT2NUM(VIR_CPU_COMPARE_ERROR));
|
2883
2792
|
rb_define_const(c_connect, "CPU_COMPARE_INCOMPATIBLE",
|
@@ -2888,32 +2797,15 @@ void ruby_libvirt_connect_init(void)
|
|
2888
2797
|
INT2NUM(VIR_CPU_COMPARE_SUPERSET));
|
2889
2798
|
|
2890
2799
|
rb_define_method(c_connect, "compare_cpu", libvirt_connect_compare_cpu, -1);
|
2891
|
-
#endif
|
2892
2800
|
|
2893
|
-
#if HAVE_CONST_VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE
|
2894
2801
|
rb_define_const(c_connect, "COMPARE_CPU_FAIL_INCOMPATIBLE",
|
2895
2802
|
INT2NUM(VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE));
|
2896
|
-
#endif
|
2897
2803
|
|
2898
|
-
#if HAVE_VIRCONNECTBASELINECPU
|
2899
2804
|
rb_define_method(c_connect, "baseline_cpu", libvirt_connect_baseline_cpu,
|
2900
2805
|
-1);
|
2901
|
-
#endif
|
2902
|
-
#if HAVE_CONST_VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES
|
2903
2806
|
rb_define_const(c_connect, "BASELINE_CPU_EXPAND_FEATURES",
|
2904
2807
|
INT2NUM(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES));
|
2905
|
-
|
2906
|
-
|
2907
|
-
/* In the libvirt development history, the events were
|
2908
|
-
* first defined in commit 1509b8027fd0b73c30aeab443f81dd5a18d80544,
|
2909
|
-
* then ADDED and REMOVED were renamed to DEFINED and UNDEFINED at
|
2910
|
-
* the same time that the details were added
|
2911
|
-
* (d3d54d2fc92e350f250eda26cee5d0342416a9cf). What this means is that
|
2912
|
-
* we have to check for HAVE_CONST_VIR_DOMAIN_EVENT_DEFINED and
|
2913
|
-
* HAVE_CONST_VIR_DOMAIN_EVENT_STARTED to untangle these, and then we
|
2914
|
-
* can make a decision for many of the events based on that.
|
2915
|
-
*/
|
2916
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_DEFINED
|
2808
|
+
|
2917
2809
|
rb_define_const(c_connect, "DOMAIN_EVENT_DEFINED",
|
2918
2810
|
INT2NUM(VIR_DOMAIN_EVENT_DEFINED));
|
2919
2811
|
rb_define_const(c_connect, "DOMAIN_EVENT_DEFINED_ADDED",
|
@@ -2950,8 +2842,6 @@ void ruby_libvirt_connect_init(void)
|
|
2950
2842
|
INT2NUM(VIR_DOMAIN_EVENT_STOPPED_SAVED));
|
2951
2843
|
rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED_FAILED",
|
2952
2844
|
INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FAILED));
|
2953
|
-
#endif
|
2954
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_STARTED
|
2955
2845
|
rb_define_const(c_connect, "DOMAIN_EVENT_STARTED",
|
2956
2846
|
INT2NUM(VIR_DOMAIN_EVENT_STARTED));
|
2957
2847
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED",
|
@@ -2960,20 +2850,14 @@ void ruby_libvirt_connect_init(void)
|
|
2960
2850
|
INT2NUM(VIR_DOMAIN_EVENT_RESUMED));
|
2961
2851
|
rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED",
|
2962
2852
|
INT2NUM(VIR_DOMAIN_EVENT_STOPPED));
|
2963
|
-
#endif
|
2964
|
-
#if HAVE_TYPE_VIRDOMAINSNAPSHOTPTR
|
2965
2853
|
rb_define_const(c_connect, "DOMAIN_EVENT_STARTED_FROM_SNAPSHOT",
|
2966
2854
|
INT2NUM(VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT));
|
2967
2855
|
rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT",
|
2968
2856
|
INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT));
|
2969
|
-
#endif
|
2970
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
|
2971
2857
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_IOERROR",
|
2972
2858
|
INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_IOERROR));
|
2973
2859
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_WATCHDOG",
|
2974
2860
|
INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG));
|
2975
|
-
#endif
|
2976
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_WATCHDOG
|
2977
2861
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_WATCHDOG",
|
2978
2862
|
INT2NUM(VIR_DOMAIN_EVENT_ID_WATCHDOG));
|
2979
2863
|
rb_define_const(c_connect, "DOMAIN_EVENT_WATCHDOG_NONE",
|
@@ -2988,8 +2872,6 @@ void ruby_libvirt_connect_init(void)
|
|
2988
2872
|
INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN));
|
2989
2873
|
rb_define_const(c_connect, "DOMAIN_EVENT_WATCHDOG_DEBUG",
|
2990
2874
|
INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_DEBUG));
|
2991
|
-
#endif
|
2992
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_IO_ERROR
|
2993
2875
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_IO_ERROR",
|
2994
2876
|
INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR));
|
2995
2877
|
rb_define_const(c_connect, "DOMAIN_EVENT_IO_ERROR_NONE",
|
@@ -2998,8 +2880,6 @@ void ruby_libvirt_connect_init(void)
|
|
2998
2880
|
INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_PAUSE));
|
2999
2881
|
rb_define_const(c_connect, "DOMAIN_EVENT_IO_ERROR_REPORT",
|
3000
2882
|
INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_REPORT));
|
3001
|
-
#endif
|
3002
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_GRAPHICS
|
3003
2883
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_GRAPHICS",
|
3004
2884
|
INT2NUM(VIR_DOMAIN_EVENT_ID_GRAPHICS));
|
3005
2885
|
rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_CONNECT",
|
@@ -3012,94 +2892,53 @@ void ruby_libvirt_connect_init(void)
|
|
3012
2892
|
INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4));
|
3013
2893
|
rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6",
|
3014
2894
|
INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6));
|
3015
|
-
#endif
|
3016
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY
|
3017
2895
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_LIFECYCLE",
|
3018
2896
|
INT2NUM(VIR_DOMAIN_EVENT_ID_LIFECYCLE));
|
3019
|
-
#endif
|
3020
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_REBOOT
|
3021
2897
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_REBOOT",
|
3022
2898
|
INT2NUM(VIR_DOMAIN_EVENT_ID_REBOOT));
|
3023
|
-
#endif
|
3024
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_RTC_CHANGE
|
3025
2899
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_RTC_CHANGE",
|
3026
2900
|
INT2NUM(VIR_DOMAIN_EVENT_ID_RTC_CHANGE));
|
3027
|
-
#endif
|
3028
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
|
3029
2901
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_IO_ERROR_REASON",
|
3030
2902
|
INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON));
|
3031
|
-
#endif
|
3032
2903
|
|
3033
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_ID_CONTROL_ERROR
|
3034
2904
|
rb_define_const(c_connect, "DOMAIN_EVENT_ID_CONTROL_ERROR",
|
3035
2905
|
INT2NUM(VIR_DOMAIN_EVENT_ID_CONTROL_ERROR));
|
3036
|
-
#endif
|
3037
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SHUTDOWN
|
3038
2906
|
rb_define_const(c_connect, "DOMAIN_EVENT_SHUTDOWN",
|
3039
2907
|
INT2NUM(VIR_DOMAIN_EVENT_SHUTDOWN));
|
3040
|
-
#endif
|
3041
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED
|
3042
2908
|
rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED",
|
3043
2909
|
INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED));
|
3044
|
-
#endif
|
3045
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_CRASHED
|
3046
2910
|
rb_define_const(c_connect, "DOMAIN_EVENT_CRASHED",
|
3047
2911
|
INT2NUM(VIR_DOMAIN_EVENT_CRASHED));
|
3048
|
-
#endif
|
3049
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_STARTED_WAKEUP
|
3050
2912
|
rb_define_const(c_connect, "DOMAIN_EVENT_STARTED_WAKEUP",
|
3051
2913
|
INT2NUM(VIR_DOMAIN_EVENT_STARTED_WAKEUP));
|
3052
|
-
#endif
|
3053
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_RESTORED
|
3054
2914
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_RESTORED",
|
3055
2915
|
INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_RESTORED));
|
3056
|
-
#endif
|
3057
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT
|
3058
2916
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT",
|
3059
2917
|
INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT));
|
3060
|
-
#endif
|
3061
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR
|
3062
2918
|
rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_API_ERROR",
|
3063
2919
|
INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR));
|
3064
|
-
#endif
|
3065
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
|
3066
2920
|
rb_define_const(c_connect, "DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT",
|
3067
2921
|
INT2NUM(VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT));
|
3068
|
-
#endif
|
3069
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED
|
3070
2922
|
rb_define_const(c_connect, "DOMAIN_EVENT_SHUTDOWN_FINISHED",
|
3071
2923
|
INT2NUM(VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED));
|
3072
|
-
#endif
|
3073
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY
|
3074
2924
|
rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED_MEMORY",
|
3075
2925
|
INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY));
|
3076
|
-
#endif
|
3077
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED_DISK
|
3078
2926
|
rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED_DISK",
|
3079
2927
|
INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED_DISK));
|
3080
|
-
#endif
|
3081
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_CRASHED_PANICKED
|
3082
2928
|
rb_define_const(c_connect, "DOMAIN_EVENT_CRASHED_PANICKED",
|
3083
2929
|
INT2NUM(VIR_DOMAIN_EVENT_CRASHED_PANICKED));
|
3084
|
-
#endif
|
3085
|
-
#if HAVE_CONST_VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX
|
3086
2930
|
rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX",
|
3087
2931
|
INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX));
|
3088
|
-
#endif
|
3089
2932
|
|
3090
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTER
|
3091
2933
|
rb_define_method(c_connect, "domain_event_register",
|
3092
2934
|
libvirt_connect_domain_event_register, -1);
|
3093
2935
|
rb_define_method(c_connect, "domain_event_deregister",
|
3094
2936
|
libvirt_connect_domain_event_deregister, 0);
|
3095
|
-
#endif
|
3096
2937
|
|
3097
|
-
#if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY
|
3098
2938
|
rb_define_method(c_connect, "domain_event_register_any",
|
3099
2939
|
libvirt_connect_domain_event_register_any, -1);
|
3100
2940
|
rb_define_method(c_connect, "domain_event_deregister_any",
|
3101
2941
|
libvirt_connect_domain_event_deregister_any, 1);
|
3102
|
-
#endif
|
3103
2942
|
|
3104
2943
|
/* Domain creation/lookup */
|
3105
2944
|
rb_define_method(c_connect, "num_of_domains",
|
@@ -3112,33 +2951,24 @@ void ruby_libvirt_connect_init(void)
|
|
3112
2951
|
libvirt_connect_list_defined_domains, 0);
|
3113
2952
|
rb_define_method(c_connect, "create_domain_linux",
|
3114
2953
|
libvirt_connect_create_linux, -1);
|
3115
|
-
#if HAVE_VIRDOMAINCREATEXML
|
3116
2954
|
rb_define_method(c_connect, "create_domain_xml",
|
3117
2955
|
libvirt_connect_create_domain_xml, -1);
|
3118
|
-
#endif
|
3119
2956
|
rb_define_method(c_connect, "lookup_domain_by_name",
|
3120
2957
|
libvirt_connect_lookup_domain_by_name, 1);
|
3121
2958
|
rb_define_method(c_connect, "lookup_domain_by_id",
|
3122
2959
|
libvirt_connect_lookup_domain_by_id, 1);
|
3123
2960
|
rb_define_method(c_connect, "lookup_domain_by_uuid",
|
3124
2961
|
libvirt_connect_lookup_domain_by_uuid, 1);
|
3125
|
-
#if HAVE_CONST_VIR_DOMAIN_DEFINE_VALIDATE
|
3126
2962
|
rb_define_const(c_connect, "DOMAIN_DEFINE_VALIDATE",
|
3127
2963
|
INT2NUM(VIR_DOMAIN_DEFINE_VALIDATE));
|
3128
|
-
#endif
|
3129
2964
|
rb_define_method(c_connect, "define_domain_xml",
|
3130
2965
|
libvirt_connect_define_domain_xml, -1);
|
3131
2966
|
|
3132
|
-
#if HAVE_VIRCONNECTDOMAINXMLFROMNATIVE
|
3133
2967
|
rb_define_method(c_connect, "domain_xml_from_native",
|
3134
2968
|
libvirt_connect_domain_xml_from_native, -1);
|
3135
|
-
#endif
|
3136
|
-
#if HAVE_VIRCONNECTDOMAINXMLTONATIVE
|
3137
2969
|
rb_define_method(c_connect, "domain_xml_to_native",
|
3138
2970
|
libvirt_connect_domain_xml_to_native, -1);
|
3139
|
-
#endif
|
3140
2971
|
|
3141
|
-
#if HAVE_TYPE_VIRINTERFACEPTR
|
3142
2972
|
/* Interface lookup/creation methods */
|
3143
2973
|
rb_define_method(c_connect, "num_of_interfaces",
|
3144
2974
|
libvirt_connect_num_of_interfaces, 0);
|
@@ -3154,7 +2984,6 @@ void ruby_libvirt_connect_init(void)
|
|
3154
2984
|
libvirt_connect_lookup_interface_by_mac, 1);
|
3155
2985
|
rb_define_method(c_connect, "define_interface_xml",
|
3156
2986
|
libvirt_connect_define_interface_xml, -1);
|
3157
|
-
#endif
|
3158
2987
|
|
3159
2988
|
/* Network lookup/creation methods */
|
3160
2989
|
rb_define_method(c_connect, "num_of_networks",
|
@@ -3175,20 +3004,15 @@ void ruby_libvirt_connect_init(void)
|
|
3175
3004
|
libvirt_connect_define_network_xml, 1);
|
3176
3005
|
|
3177
3006
|
/* Node device lookup/creation methods */
|
3178
|
-
#if HAVE_TYPE_VIRNODEDEVICEPTR
|
3179
3007
|
rb_define_method(c_connect, "num_of_nodedevices",
|
3180
3008
|
libvirt_connect_num_of_nodedevices, -1);
|
3181
3009
|
rb_define_method(c_connect, "list_nodedevices",
|
3182
3010
|
libvirt_connect_list_nodedevices, -1);
|
3183
3011
|
rb_define_method(c_connect, "lookup_nodedevice_by_name",
|
3184
3012
|
libvirt_connect_lookup_nodedevice_by_name, 1);
|
3185
|
-
#if HAVE_VIRNODEDEVICECREATEXML
|
3186
3013
|
rb_define_method(c_connect, "create_nodedevice_xml",
|
3187
3014
|
libvirt_connect_create_nodedevice_xml, -1);
|
3188
|
-
#endif
|
3189
|
-
#endif
|
3190
3015
|
|
3191
|
-
#if HAVE_TYPE_VIRNWFILTERPTR
|
3192
3016
|
/* NWFilter lookup/creation methods */
|
3193
3017
|
rb_define_method(c_connect, "num_of_nwfilters",
|
3194
3018
|
libvirt_connect_num_of_nwfilters, 0);
|
@@ -3200,9 +3024,7 @@ void ruby_libvirt_connect_init(void)
|
|
3200
3024
|
libvirt_connect_lookup_nwfilter_by_uuid, 1);
|
3201
3025
|
rb_define_method(c_connect, "define_nwfilter_xml",
|
3202
3026
|
libvirt_connect_define_nwfilter_xml, 1);
|
3203
|
-
#endif
|
3204
3027
|
|
3205
|
-
#if HAVE_TYPE_VIRSECRETPTR
|
3206
3028
|
/* Secret lookup/creation methods */
|
3207
3029
|
rb_define_method(c_connect, "num_of_secrets",
|
3208
3030
|
libvirt_connect_num_of_secrets, 0);
|
@@ -3214,9 +3036,7 @@ void ruby_libvirt_connect_init(void)
|
|
3214
3036
|
libvirt_connect_lookup_secret_by_usage, 2);
|
3215
3037
|
rb_define_method(c_connect, "define_secret_xml",
|
3216
3038
|
libvirt_connect_define_secret_xml, -1);
|
3217
|
-
#endif
|
3218
3039
|
|
3219
|
-
#if HAVE_TYPE_VIRSTORAGEPOOLPTR
|
3220
3040
|
/* StoragePool lookup/creation methods */
|
3221
3041
|
rb_define_method(c_connect, "num_of_storage_pools",
|
3222
3042
|
libvirt_connect_num_of_storage_pools, 0);
|
@@ -3236,49 +3056,31 @@ void ruby_libvirt_connect_init(void)
|
|
3236
3056
|
libvirt_connect_define_pool_xml, -1);
|
3237
3057
|
rb_define_method(c_connect, "discover_storage_pool_sources",
|
3238
3058
|
libvirt_connect_find_storage_pool_sources, -1);
|
3239
|
-
#endif
|
3240
3059
|
|
3241
|
-
#if HAVE_VIRCONNECTGETSYSINFO
|
3242
3060
|
rb_define_method(c_connect, "sys_info", libvirt_connect_sys_info, -1);
|
3243
|
-
#endif
|
3244
|
-
#if HAVE_TYPE_VIRSTREAMPTR
|
3245
3061
|
rb_define_method(c_connect, "stream", libvirt_connect_stream, -1);
|
3246
|
-
#endif
|
3247
3062
|
|
3248
|
-
#if HAVE_VIRINTERFACECHANGEBEGIN
|
3249
3063
|
rb_define_method(c_connect, "interface_change_begin",
|
3250
3064
|
libvirt_connect_interface_change_begin, -1);
|
3251
3065
|
rb_define_method(c_connect, "interface_change_commit",
|
3252
3066
|
libvirt_connect_interface_change_commit, -1);
|
3253
3067
|
rb_define_method(c_connect, "interface_change_rollback",
|
3254
3068
|
libvirt_connect_interface_change_rollback, -1);
|
3255
|
-
#endif
|
3256
3069
|
|
3257
|
-
#if HAVE_VIRNODEGETCPUSTATS
|
3258
3070
|
rb_define_method(c_connect, "node_cpu_stats",
|
3259
3071
|
libvirt_connect_node_cpu_stats, -1);
|
3260
|
-
#endif
|
3261
|
-
#if HAVE_CONST_VIR_NODE_CPU_STATS_ALL_CPUS
|
3262
3072
|
rb_define_const(c_connect, "NODE_CPU_STATS_ALL_CPUS",
|
3263
3073
|
INT2NUM(VIR_NODE_CPU_STATS_ALL_CPUS));
|
3264
|
-
#endif
|
3265
|
-
#if HAVE_VIRNODEGETMEMORYSTATS
|
3266
3074
|
rb_define_method(c_connect, "node_memory_stats",
|
3267
3075
|
libvirt_connect_node_memory_stats, -1);
|
3268
|
-
#endif
|
3269
|
-
#if HAVE_CONST_VIR_NODE_MEMORY_STATS_ALL_CELLS
|
3270
3076
|
rb_define_const(c_connect, "NODE_MEMORY_STATS_ALL_CELLS",
|
3271
3077
|
INT2NUM(VIR_NODE_MEMORY_STATS_ALL_CELLS));
|
3272
|
-
#endif
|
3273
3078
|
|
3274
|
-
#if HAVE_VIRDOMAINSAVEIMAGEGETXMLDESC
|
3275
3079
|
rb_define_method(c_connect, "save_image_xml_desc",
|
3276
3080
|
libvirt_connect_save_image_xml_desc, -1);
|
3277
3081
|
rb_define_method(c_connect, "define_save_image_xml",
|
3278
3082
|
libvirt_connect_define_save_image_xml, -1);
|
3279
|
-
#endif
|
3280
3083
|
|
3281
|
-
#if HAVE_VIRNODESUSPENDFORDURATION
|
3282
3084
|
rb_define_const(c_connect, "NODE_SUSPEND_TARGET_MEM",
|
3283
3085
|
INT2NUM(VIR_NODE_SUSPEND_TARGET_MEM));
|
3284
3086
|
rb_define_const(c_connect, "NODE_SUSPEND_TARGET_DISK",
|
@@ -3288,29 +3090,21 @@ void ruby_libvirt_connect_init(void)
|
|
3288
3090
|
|
3289
3091
|
rb_define_method(c_connect, "node_suspend_for_duration",
|
3290
3092
|
libvirt_connect_node_suspend_for_duration, -1);
|
3291
|
-
#endif
|
3292
3093
|
|
3293
|
-
#if HAVE_VIRNODEGETMEMORYPARAMETERS
|
3294
3094
|
rb_define_method(c_connect, "node_memory_parameters",
|
3295
3095
|
libvirt_connect_node_memory_parameters, -1);
|
3296
3096
|
rb_define_method(c_connect, "node_memory_parameters=",
|
3297
3097
|
libvirt_connect_node_memory_parameters_equal, 1);
|
3298
|
-
#endif
|
3299
3098
|
|
3300
|
-
#if HAVE_VIRNODEGETCPUMAP
|
3301
3099
|
rb_define_method(c_connect, "node_cpu_map",
|
3302
3100
|
libvirt_connect_node_cpu_map, -1);
|
3303
3101
|
rb_define_alias(c_connect, "node_get_cpu_map", "node_cpu_map");
|
3304
|
-
#endif
|
3305
3102
|
|
3306
|
-
#if HAVE_VIRCONNECTSETKEEPALIVE
|
3307
3103
|
rb_define_method(c_connect, "set_keepalive",
|
3308
3104
|
libvirt_connect_set_keepalive, 2);
|
3309
3105
|
rb_define_method(c_connect, "keepalive=", libvirt_connect_keepalive_equal,
|
3310
3106
|
1);
|
3311
|
-
#endif
|
3312
3107
|
|
3313
|
-
#if HAVE_VIRCONNECTLISTALLDOMAINS
|
3314
3108
|
rb_define_const(c_connect, "LIST_DOMAINS_ACTIVE",
|
3315
3109
|
INT2NUM(VIR_CONNECT_LIST_DOMAINS_ACTIVE));
|
3316
3110
|
rb_define_const(c_connect, "LIST_DOMAINS_INACTIVE",
|
@@ -3341,8 +3135,7 @@ void ruby_libvirt_connect_init(void)
|
|
3341
3135
|
INT2NUM(VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT));
|
3342
3136
|
rb_define_method(c_connect, "list_all_domains",
|
3343
3137
|
libvirt_connect_list_all_domains, -1);
|
3344
|
-
|
3345
|
-
#if HAVE_VIRCONNECTLISTALLNETWORKS
|
3138
|
+
|
3346
3139
|
rb_define_const(c_connect, "LIST_NETWORKS_ACTIVE",
|
3347
3140
|
INT2NUM(VIR_CONNECT_LIST_NETWORKS_ACTIVE));
|
3348
3141
|
rb_define_const(c_connect, "LIST_NETWORKS_INACTIVE",
|
@@ -3357,16 +3150,14 @@ void ruby_libvirt_connect_init(void)
|
|
3357
3150
|
INT2NUM(VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART));
|
3358
3151
|
rb_define_method(c_connect, "list_all_networks",
|
3359
3152
|
libvirt_connect_list_all_networks, -1);
|
3360
|
-
|
3361
|
-
#if HAVE_VIRCONNECTLISTALLINTERFACES
|
3153
|
+
|
3362
3154
|
rb_define_const(c_connect, "LIST_INTERFACES_INACTIVE",
|
3363
3155
|
INT2NUM(VIR_CONNECT_LIST_INTERFACES_INACTIVE));
|
3364
3156
|
rb_define_const(c_connect, "LIST_INTERFACES_ACTIVE",
|
3365
3157
|
INT2NUM(VIR_CONNECT_LIST_INTERFACES_ACTIVE));
|
3366
3158
|
rb_define_method(c_connect, "list_all_interfaces",
|
3367
3159
|
libvirt_connect_list_all_interfaces, -1);
|
3368
|
-
|
3369
|
-
#if HAVE_VIRCONNECTLISTALLSECRETS
|
3160
|
+
|
3370
3161
|
rb_define_const(c_connect, "LIST_SECRETS_EPHEMERAL",
|
3371
3162
|
INT2NUM(VIR_CONNECT_LIST_SECRETS_EPHEMERAL));
|
3372
3163
|
rb_define_const(c_connect, "LIST_SECRETS_NO_EPHEMERAL",
|
@@ -3377,8 +3168,7 @@ void ruby_libvirt_connect_init(void)
|
|
3377
3168
|
INT2NUM(VIR_CONNECT_LIST_SECRETS_NO_PRIVATE));
|
3378
3169
|
rb_define_method(c_connect, "list_all_secrets",
|
3379
3170
|
libvirt_connect_list_all_secrets, -1);
|
3380
|
-
|
3381
|
-
#if HAVE_VIRCONNECTLISTALLNODEDEVICES
|
3171
|
+
|
3382
3172
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_SYSTEM",
|
3383
3173
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM));
|
3384
3174
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_PCI_DEV",
|
@@ -3397,20 +3187,15 @@ void ruby_libvirt_connect_init(void)
|
|
3397
3187
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI));
|
3398
3188
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_STORAGE",
|
3399
3189
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE));
|
3400
|
-
#if HAVE_CONST_VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST
|
3401
3190
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_FC_HOST",
|
3402
3191
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST));
|
3403
3192
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_VPORTS",
|
3404
3193
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS));
|
3405
|
-
#endif
|
3406
|
-
#if HAVE_CONST_VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC
|
3407
3194
|
rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_SCSI_GENERIC",
|
3408
3195
|
INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC));
|
3409
|
-
#endif
|
3410
3196
|
rb_define_method(c_connect, "list_all_nodedevices",
|
3411
3197
|
libvirt_connect_list_all_nodedevices, -1);
|
3412
|
-
|
3413
|
-
#if HAVE_VIRCONNECTLISTALLSTORAGEPOOLS
|
3198
|
+
|
3414
3199
|
rb_define_const(c_connect, "LIST_STORAGE_POOLS_INACTIVE",
|
3415
3200
|
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE));
|
3416
3201
|
rb_define_const(c_connect, "LIST_STORAGE_POOLS_ACTIVE",
|
@@ -3445,47 +3230,26 @@ void ruby_libvirt_connect_init(void)
|
|
3445
3230
|
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG));
|
3446
3231
|
rb_define_method(c_connect, "list_all_storage_pools",
|
3447
3232
|
libvirt_connect_list_all_storage_pools, -1);
|
3448
|
-
#endif
|
3449
|
-
#if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER
|
3450
3233
|
rb_define_const(c_connect, "LIST_STORAGE_POOLS_GLUSTER",
|
3451
3234
|
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER));
|
3452
|
-
#endif
|
3453
|
-
#if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_ZFS
|
3454
3235
|
rb_define_const(c_connect, "LIST_STORAGE_POOLS_ZFS",
|
3455
3236
|
INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_ZFS));
|
3456
|
-
#endif
|
3457
|
-
#if HAVE_VIRCONNECTLISTALLNWFILTERS
|
3458
3237
|
rb_define_method(c_connect, "list_all_nwfilters",
|
3459
3238
|
libvirt_connect_list_all_nwfilters, -1);
|
3460
|
-
#endif
|
3461
|
-
#if HAVE_VIRCONNECTISALIVE
|
3462
3239
|
rb_define_method(c_connect, "alive?", libvirt_connect_alive_p, 0);
|
3463
|
-
#endif
|
3464
|
-
#if HAVE_VIRDOMAINCREATEXMLWITHFILES
|
3465
3240
|
rb_define_method(c_connect, "create_domain_xml_with_files",
|
3466
3241
|
libvirt_connect_create_domain_xml_with_files, -1);
|
3467
|
-
#endif
|
3468
|
-
#if HAVE_VIRDOMAINQEMUATTACH
|
3469
3242
|
rb_define_method(c_connect, "qemu_attach", libvirt_connect_qemu_attach, -1);
|
3470
|
-
#endif
|
3471
|
-
#if HAVE_VIRCONNECTGETCPUMODELNAMES
|
3472
3243
|
rb_define_method(c_connect, "cpu_model_names",
|
3473
3244
|
libvirt_connect_cpu_model_names, -1);
|
3474
|
-
#endif
|
3475
|
-
#if HAVE_VIRNODEALLOCPAGES
|
3476
3245
|
rb_define_const(c_connect, "NODE_ALLOC_PAGES_ADD",
|
3477
3246
|
INT2NUM(VIR_NODE_ALLOC_PAGES_ADD));
|
3478
3247
|
rb_define_const(c_connect, "NODE_ALLOC_PAGES_SET",
|
3479
3248
|
INT2NUM(VIR_NODE_ALLOC_PAGES_SET));
|
3480
3249
|
rb_define_method(c_connect, "node_alloc_pages",
|
3481
3250
|
libvirt_connect_node_alloc_pages, -1);
|
3482
|
-
#endif
|
3483
|
-
#if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
|
3484
3251
|
rb_define_method(c_connect, "domain_capabilities",
|
3485
3252
|
libvirt_connect_domain_capabilities, -1);
|
3486
|
-
#endif
|
3487
|
-
#if HAVE_VIRNODEGETFREEPAGES
|
3488
3253
|
rb_define_method(c_connect, "node_free_pages",
|
3489
3254
|
libvirt_connect_node_free_pages, -1);
|
3490
|
-
#endif
|
3491
3255
|
}
|