ruby-libvirt 0.8.0 → 0.8.2

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.
@@ -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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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
- rb_raise(e_NoSupportError, "Non-zero flags not supported");
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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-domain.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-network.html#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[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#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[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#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[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#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[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#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[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#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[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#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[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#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[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#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[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#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[http://www.libvirt.org/html/libvirt-libvirt-secret.html#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[http://www.libvirt.org/html/libvirt-libvirt-secret.html#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[http://www.libvirt.org/html/libvirt-libvirt-secret.html#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[http://www.libvirt.org/html/libvirt-libvirt-secret.html#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[http://www.libvirt.org/html/libvirt-libvirt-secret.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-storage.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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[http://www.libvirt.org/html/libvirt-libvirt-stream.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-interface.html#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[http://www.libvirt.org/html/libvirt-libvirt-host.html#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)
@@ -2091,9 +2042,7 @@ static VALUE libvirt_connect_node_cpu_stats(int argc, VALUE *argv, VALUE c)
2091
2042
  cpu_stats_nparams, cpu_stats_get,
2092
2043
  cpu_stats_set);
2093
2044
  }
2094
- #endif
2095
2045
 
2096
- #if HAVE_VIRNODEGETMEMORYSTATS
2097
2046
  static void memory_stats_set(void *voidparams, int i, VALUE result)
2098
2047
  {
2099
2048
  virNodeMemoryStatsPtr params = (virNodeMemoryStatsPtr)voidparams;
@@ -2134,7 +2083,7 @@ static const char *memory_stats_get(VALUE d, unsigned int flags,
2134
2083
  * call-seq:
2135
2084
  * conn.node_memory_stats(cellNum=-1, flags=0) -> Hash
2136
2085
  *
2137
- * Call virNodeGetMemoryStats[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryStats]
2086
+ * Call virNodeGetMemoryStats[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryStats]
2138
2087
  * to retrieve memory statistics from the virtualization host.
2139
2088
  */
2140
2089
  static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
@@ -2156,14 +2105,12 @@ static VALUE libvirt_connect_node_memory_stats(int argc, VALUE *argv, VALUE c)
2156
2105
  memory_stats_nparams, memory_stats_get,
2157
2106
  memory_stats_set);
2158
2107
  }
2159
- #endif
2160
2108
 
2161
- #if HAVE_VIRDOMAINSAVEIMAGEGETXMLDESC
2162
2109
  /*
2163
2110
  * call-seq:
2164
2111
  * conn.save_image_xml_desc(filename, flags=0) -> String
2165
2112
  *
2166
- * Call virDomainSaveImageGetXMLDesc[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageGetXMLDesc]
2113
+ * Call virDomainSaveImageGetXMLDesc[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageGetXMLDesc]
2167
2114
  * to get the XML corresponding to a save file.
2168
2115
  */
2169
2116
  static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
@@ -2183,7 +2130,7 @@ static VALUE libvirt_connect_save_image_xml_desc(int argc, VALUE *argv, VALUE c)
2183
2130
  * call-seq:
2184
2131
  * conn.define_save_image_xml(filename, newxml, flags=0) -> nil
2185
2132
  *
2186
- * Call virDomainSaveImageDefineXML[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageDefineXML]
2133
+ * Call virDomainSaveImageDefineXML[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainSaveImageDefineXML]
2187
2134
  * to define new XML for a saved image.
2188
2135
  */
2189
2136
  static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
@@ -2200,14 +2147,12 @@ static VALUE libvirt_connect_define_save_image_xml(int argc, VALUE *argv,
2200
2147
  StringValueCStr(newxml),
2201
2148
  ruby_libvirt_value_to_uint(flags));
2202
2149
  }
2203
- #endif
2204
2150
 
2205
- #if HAVE_VIRNODESUSPENDFORDURATION
2206
2151
  /*
2207
2152
  * call-seq:
2208
2153
  * conn.node_suspend_for_duration(target, duration, flags=0) -> nil
2209
2154
  *
2210
- * Call virNodeSuspendForDuration[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeSuspendForDuration]
2155
+ * Call virNodeSuspendForDuration[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeSuspendForDuration]
2211
2156
  * to suspend the hypervisor for the specified duration.
2212
2157
  */
2213
2158
  static VALUE libvirt_connect_node_suspend_for_duration(int argc, VALUE *argv,
@@ -2223,9 +2168,7 @@ static VALUE libvirt_connect_node_suspend_for_duration(int argc, VALUE *argv,
2223
2168
  NUM2UINT(target), NUM2ULL(duration),
2224
2169
  ruby_libvirt_value_to_uint(flags));
2225
2170
  }
2226
- #endif
2227
2171
 
2228
- #if HAVE_VIRNODEGETMEMORYPARAMETERS
2229
2172
  static const char *node_memory_nparams(VALUE d, unsigned int flags,
2230
2173
  void *RUBY_LIBVIRT_UNUSED(opaque),
2231
2174
  int *nparams)
@@ -2266,7 +2209,7 @@ static const char *node_memory_set(VALUE d, unsigned int flags,
2266
2209
  * call-seq:
2267
2210
  * conn.node_memory_parameters(flags=0) -> Hash
2268
2211
  *
2269
- * Call virNodeGetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryParameters]
2212
+ * Call virNodeGetMemoryParameters[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetMemoryParameters]
2270
2213
  * to get information about memory on the host node.
2271
2214
  */
2272
2215
  static VALUE libvirt_connect_node_memory_parameters(int argc, VALUE *argv,
@@ -2297,7 +2240,7 @@ static struct ruby_libvirt_typed_param memory_allowed[] = {
2297
2240
  * call-seq:
2298
2241
  * conn.node_memory_parameters = Hash,flags=0
2299
2242
  *
2300
- * Call virNodeSetMemoryParameters[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeSetMemoryParameters]
2243
+ * Call virNodeSetMemoryParameters[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeSetMemoryParameters]
2301
2244
  * to set the memory parameters for this host node.
2302
2245
  */
2303
2246
  static VALUE libvirt_connect_node_memory_parameters_equal(VALUE c, VALUE input)
@@ -2311,9 +2254,7 @@ static VALUE libvirt_connect_node_memory_parameters_equal(VALUE c, VALUE input)
2311
2254
  ARRAY_SIZE(memory_allowed),
2312
2255
  node_memory_set);
2313
2256
  }
2314
- #endif
2315
2257
 
2316
- #if HAVE_VIRNODEGETCPUMAP
2317
2258
  struct cpu_map_field_to_value {
2318
2259
  VALUE result;
2319
2260
  int cpu;
@@ -2335,7 +2276,7 @@ static VALUE cpu_map_field_to_value(VALUE input)
2335
2276
  * call-seq:
2336
2277
  * conn.node_cpu_map -> Hash
2337
2278
  *
2338
- * Call virNodeGetCPUMap[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUMap]
2279
+ * Call virNodeGetCPUMap[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetCPUMap]
2339
2280
  * to get a map of online host CPUs.
2340
2281
  */
2341
2282
  static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
@@ -2370,14 +2311,12 @@ static VALUE libvirt_connect_node_cpu_map(int argc, VALUE *argv, VALUE c)
2370
2311
 
2371
2312
  return result;
2372
2313
  }
2373
- #endif
2374
2314
 
2375
- #if HAVE_VIRCONNECTSETKEEPALIVE
2376
2315
  /*
2377
2316
  * call-seq:
2378
2317
  * conn.set_keepalive(interval, count) -> Fixnum
2379
2318
  *
2380
- * Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
2319
+ * Call virConnectSetKeepAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
2381
2320
  * to start sending keepalive messages. Deprecated; use conn.keepalive=
2382
2321
  * instead.
2383
2322
  */
@@ -2393,7 +2332,7 @@ static VALUE libvirt_connect_set_keepalive(VALUE c, VALUE interval, VALUE count)
2393
2332
  * call-seq:
2394
2333
  * conn.keepalive = interval,count
2395
2334
  *
2396
- * Call virConnectSetKeepAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
2335
+ * Call virConnectSetKeepAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectSetKeepAlive]
2397
2336
  * to start sending keepalive messages.
2398
2337
  */
2399
2338
  static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
@@ -2415,14 +2354,12 @@ static VALUE libvirt_connect_keepalive_equal(VALUE c, VALUE in)
2415
2354
  ruby_libvirt_connect_get(c),
2416
2355
  NUM2INT(interval), NUM2UINT(count));
2417
2356
  }
2418
- #endif
2419
2357
 
2420
- #if HAVE_VIRCONNECTLISTALLDOMAINS
2421
2358
  /*
2422
2359
  * call-seq:
2423
2360
  * conn.list_all_domains(flags=0) -> Array
2424
2361
  *
2425
- * Call virConnectListAllDomains[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectListAllDomains]
2362
+ * Call virConnectListAllDomains[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectListAllDomains]
2426
2363
  * to get an array of domain objects for all domains.
2427
2364
  */
2428
2365
  static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
@@ -2432,14 +2369,12 @@ static VALUE libvirt_connect_list_all_domains(int argc, VALUE *argv, VALUE c)
2432
2369
  ruby_libvirt_connect_get(c), c,
2433
2370
  ruby_libvirt_domain_new, virDomainFree);
2434
2371
  }
2435
- #endif
2436
2372
 
2437
- #if HAVE_VIRCONNECTLISTALLNETWORKS
2438
2373
  /*
2439
2374
  * call-seq:
2440
2375
  * conn.list_all_networks(flags=0) -> Array
2441
2376
  *
2442
- * Call virConnectListAllNetworks[http://www.libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks]
2377
+ * Call virConnectListAllNetworks[https://libvirt.org/html/libvirt-libvirt-network.html#virConnectListAllNetworks]
2443
2378
  * to get an array of network objects for all networks.
2444
2379
  */
2445
2380
  static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
@@ -2450,14 +2385,12 @@ static VALUE libvirt_connect_list_all_networks(int argc, VALUE *argv, VALUE c)
2450
2385
  ruby_libvirt_network_new,
2451
2386
  virNetworkFree);
2452
2387
  }
2453
- #endif
2454
2388
 
2455
- #if HAVE_VIRCONNECTLISTALLINTERFACES
2456
2389
  /*
2457
2390
  * call-seq:
2458
2391
  * conn.list_all_interfaces(flags=0) -> Array
2459
2392
  *
2460
- * Call virConnectListAllInterfaces[http://www.libvirt.org/html/libvirt-libvirt-interface.html#virConnectListAllInterfaces]
2393
+ * Call virConnectListAllInterfaces[https://libvirt.org/html/libvirt-libvirt-interface.html#virConnectListAllInterfaces]
2461
2394
  * to get an array of interface objects for all interfaces.
2462
2395
  */
2463
2396
  static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
@@ -2468,14 +2401,12 @@ static VALUE libvirt_connect_list_all_interfaces(int argc, VALUE *argv, VALUE c)
2468
2401
  ruby_libvirt_interface_new,
2469
2402
  virInterfaceFree);
2470
2403
  }
2471
- #endif
2472
2404
 
2473
- #if HAVE_VIRCONNECTLISTALLSECRETS
2474
2405
  /*
2475
2406
  * call-seq:
2476
2407
  * conn.list_all_secrets(flags=0) -> Array
2477
2408
  *
2478
- * Call virConnectListAllSecrets[http://www.libvirt.org/html/libvirt-libvirt-secret.html#virConnectListAllSecrets]
2409
+ * Call virConnectListAllSecrets[https://libvirt.org/html/libvirt-libvirt-secret.html#virConnectListAllSecrets]
2479
2410
  * to get an array of secret objects for all secrets.
2480
2411
  */
2481
2412
  static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
@@ -2485,14 +2416,12 @@ static VALUE libvirt_connect_list_all_secrets(int argc, VALUE *argv, VALUE c)
2485
2416
  ruby_libvirt_connect_get(c), c,
2486
2417
  ruby_libvirt_secret_new, virSecretFree);
2487
2418
  }
2488
- #endif
2489
2419
 
2490
- #if HAVE_VIRCONNECTLISTALLNODEDEVICES
2491
2420
  /*
2492
2421
  * call-seq:
2493
2422
  * conn.list_all_nodedevices(flags=0) -> Array
2494
2423
  *
2495
- * Call virConnectListAllNodeDevices[http://www.libvirt.org/html/libvirt-libvirt-nodedev.html#virConnectListAllNodeDevices]
2424
+ * Call virConnectListAllNodeDevices[https://libvirt.org/html/libvirt-libvirt-nodedev.html#virConnectListAllNodeDevices]
2496
2425
  * to get an array of nodedevice objects for all nodedevices.
2497
2426
  */
2498
2427
  static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
@@ -2504,14 +2433,12 @@ static VALUE libvirt_connect_list_all_nodedevices(int argc, VALUE *argv,
2504
2433
  ruby_libvirt_nodedevice_new,
2505
2434
  virNodeDeviceFree);
2506
2435
  }
2507
- #endif
2508
2436
 
2509
- #if HAVE_VIRCONNECTLISTALLSTORAGEPOOLS
2510
2437
  /*
2511
2438
  * call-seq:
2512
2439
  * conn.list_all_storage_pools(flags=0) -> Array
2513
2440
  *
2514
- * Call virConnectListAllStoragePools[http://www.libvirt.org/html/libvirt-libvirt-storage.html#virConnectListAllStoragePools]
2441
+ * Call virConnectListAllStoragePools[https://libvirt.org/html/libvirt-libvirt-storage.html#virConnectListAllStoragePools]
2515
2442
  * to get an array of storage pool objects for all storage pools.
2516
2443
  */
2517
2444
  static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
@@ -2522,14 +2449,12 @@ static VALUE libvirt_connect_list_all_storage_pools(int argc, VALUE *argv,
2522
2449
  ruby_libvirt_connect_get(c), c,
2523
2450
  pool_new, virStoragePoolFree);
2524
2451
  }
2525
- #endif
2526
2452
 
2527
- #if HAVE_VIRCONNECTLISTALLNWFILTERS
2528
2453
  /*
2529
2454
  * call-seq:
2530
2455
  * conn.list_all_nwfilters(flags=0) -> Array
2531
2456
  *
2532
- * Call virConnectListAllNWFilters[http://www.libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListAllNWFilters]
2457
+ * Call virConnectListAllNWFilters[https://libvirt.org/html/libvirt-libvirt-nwfilter.html#virConnectListAllNWFilters]
2533
2458
  * to get an array of nwfilters for all nwfilter objects.
2534
2459
  */
2535
2460
  static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
@@ -2540,14 +2465,12 @@ static VALUE libvirt_connect_list_all_nwfilters(int argc, VALUE *argv, VALUE c)
2540
2465
  ruby_libvirt_nwfilter_new,
2541
2466
  virNWFilterFree);
2542
2467
  }
2543
- #endif
2544
2468
 
2545
- #if HAVE_VIRCONNECTISALIVE
2546
2469
  /*
2547
2470
  * call-seq:
2548
2471
  * conn.alive? -> [True|False]
2549
2472
  *
2550
- * Call virConnectIsAlive[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectIsAlive]
2473
+ * Call virConnectIsAlive[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectIsAlive]
2551
2474
  * to determine if the connection is alive.
2552
2475
  */
2553
2476
  static VALUE libvirt_connect_alive_p(VALUE c)
@@ -2556,14 +2479,12 @@ static VALUE libvirt_connect_alive_p(VALUE c)
2556
2479
  ruby_libvirt_connect_get(c),
2557
2480
  ruby_libvirt_connect_get(c));
2558
2481
  }
2559
- #endif
2560
2482
 
2561
- #if HAVE_VIRDOMAINCREATEXMLWITHFILES
2562
2483
  /*
2563
2484
  * call-seq:
2564
2485
  * conn.create_domain_xml_with_files(xml, fds=nil, flags=0) -> Libvirt::Domain
2565
2486
  *
2566
- * Call virDomainCreateXMLWithFiles[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXMLWithFiles]
2487
+ * Call virDomainCreateXMLWithFiles[https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainCreateXMLWithFiles]
2567
2488
  * to launch a new guest domain with a set of open file descriptors.
2568
2489
  */
2569
2490
  static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
@@ -2603,9 +2524,7 @@ static VALUE libvirt_connect_create_domain_xml_with_files(int argc, VALUE *argv,
2603
2524
 
2604
2525
  return ruby_libvirt_domain_new(dom, c);
2605
2526
  }
2606
- #endif
2607
2527
 
2608
- #if HAVE_VIRDOMAINQEMUATTACH
2609
2528
  /*
2610
2529
  * call-seq:
2611
2530
  * conn.qemu_attach(pid, flags=0) -> Libvirt::Domain
@@ -2627,14 +2546,12 @@ static VALUE libvirt_connect_qemu_attach(int argc, VALUE *argv, VALUE c)
2627
2546
 
2628
2547
  return ruby_libvirt_domain_new(dom, c);
2629
2548
  }
2630
- #endif
2631
2549
 
2632
- #if HAVE_VIRCONNECTGETCPUMODELNAMES
2633
2550
  /*
2634
2551
  * call-seq:
2635
2552
  * conn.cpu_model_names(arch, flags=0) -> Array
2636
2553
  *
2637
- * Call virConnectGetCPUModelNames[http://www.libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCPUModelNames]
2554
+ * Call virConnectGetCPUModelNames[https://libvirt.org/html/libvirt-libvirt-host.html#virConnectGetCPUModelNames]
2638
2555
  * to get an array of CPU model names.
2639
2556
  */
2640
2557
  static VALUE libvirt_connect_cpu_model_names(int argc, VALUE *argv, VALUE c)
@@ -2684,14 +2601,12 @@ error:
2684
2601
  rb_jump_tag(exception);
2685
2602
  return Qnil;
2686
2603
  }
2687
- #endif
2688
2604
 
2689
- #if HAVE_VIRNODEALLOCPAGES
2690
2605
  /*
2691
2606
  * call-seq:
2692
2607
  * conn.node_alloc_pages(page_arr, cells=nil, flags=0) -> Fixnum
2693
2608
  *
2694
- * Call virNodeAllocPages[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeAllocPages]
2609
+ * Call virNodeAllocPages[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeAllocPages]
2695
2610
  * to reserve huge pages in the system pool.
2696
2611
  */
2697
2612
  static VALUE libvirt_connect_node_alloc_pages(int argc, VALUE *argv, VALUE c)
@@ -2750,14 +2665,12 @@ static VALUE libvirt_connect_node_alloc_pages(int argc, VALUE *argv, VALUE c)
2750
2665
 
2751
2666
  return INT2NUM(ret);
2752
2667
  }
2753
- #endif
2754
2668
 
2755
- #if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
2756
2669
  /*
2757
2670
  * call-seq:
2758
2671
  * conn.domain_capabilities(emulatorbin, arch, machine, virttype, flags=0) -> String
2759
2672
  *
2760
- * Call virConnectGetDomainCapabilities[http://www.libvirt.org/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities]
2673
+ * Call virConnectGetDomainCapabilities[https://libvirt.org/html/libvirt-libvirt-domain.html#virConnectGetDomainCapabilities]
2761
2674
  * to get the capabilities of the underlying emulator.
2762
2675
  */
2763
2676
  static VALUE libvirt_connect_domain_capabilities(int argc, VALUE *argv, VALUE c)
@@ -2776,14 +2689,12 @@ static VALUE libvirt_connect_domain_capabilities(int argc, VALUE *argv, VALUE c)
2776
2689
  ruby_libvirt_get_cstring_or_null(virttype),
2777
2690
  NUM2UINT(flags));
2778
2691
  }
2779
- #endif
2780
2692
 
2781
- #if HAVE_VIRNODEGETFREEPAGES
2782
2693
  /*
2783
2694
  * call-seq:
2784
2695
  * conn.node_free_pages(pages, cells, flags=0) -> Hash
2785
2696
  *
2786
- * Call virNodeGetFreePages[http://www.libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreePages]
2697
+ * Call virNodeGetFreePages[https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetFreePages]
2787
2698
  * to query the host system on free pages of specified size.
2788
2699
  */
2789
2700
  static VALUE libvirt_connect_node_free_pages(int argc, VALUE *argv, VALUE c)
@@ -2823,7 +2734,6 @@ static VALUE libvirt_connect_node_free_pages(int argc, VALUE *argv, VALUE c)
2823
2734
 
2824
2735
  return result;
2825
2736
  }
2826
- #endif
2827
2737
 
2828
2738
  /*
2829
2739
  * Class Libvirt::Connect
@@ -2858,9 +2768,7 @@ void ruby_libvirt_connect_init(void)
2858
2768
  rb_define_method(c_connect, "closed?", libvirt_connect_closed_p, 0);
2859
2769
  rb_define_method(c_connect, "type", libvirt_connect_type, 0);
2860
2770
  rb_define_method(c_connect, "version", libvirt_connect_version, 0);
2861
- #if HAVE_VIRCONNECTGETLIBVERSION
2862
2771
  rb_define_method(c_connect, "libversion", libvirt_connect_libversion, 0);
2863
- #endif
2864
2772
  rb_define_method(c_connect, "hostname", libvirt_connect_hostname, 0);
2865
2773
  rb_define_method(c_connect, "uri", libvirt_connect_uri, 0);
2866
2774
  rb_define_method(c_connect, "max_vcpus", libvirt_connect_max_vcpus, -1);
@@ -2870,22 +2778,15 @@ void ruby_libvirt_connect_init(void)
2870
2778
  libvirt_connect_node_free_memory, 0);
2871
2779
  rb_define_method(c_connect, "node_cells_free_memory",
2872
2780
  libvirt_connect_node_cells_free_memory, -1);
2873
- #if HAVE_VIRNODEGETSECURITYMODEL
2874
2781
  rb_define_method(c_connect, "node_security_model",
2875
2782
  libvirt_connect_node_security_model, 0);
2876
2783
  rb_define_alias(c_connect, "node_get_security_model",
2877
2784
  "node_security_model");
2878
- #endif
2879
- #if HAVE_VIRCONNECTISENCRYPTED
2880
2785
  rb_define_method(c_connect, "encrypted?", libvirt_connect_encrypted_p, 0);
2881
- #endif
2882
- #if HAVE_VIRCONNECTISSECURE
2883
2786
  rb_define_method(c_connect, "secure?", libvirt_connect_secure_p, 0);
2884
- #endif
2885
2787
  rb_define_method(c_connect, "capabilities", libvirt_connect_capabilities,
2886
2788
  0);
2887
2789
 
2888
- #if HAVE_VIRCONNECTCOMPARECPU
2889
2790
  rb_define_const(c_connect, "CPU_COMPARE_ERROR",
2890
2791
  INT2NUM(VIR_CPU_COMPARE_ERROR));
2891
2792
  rb_define_const(c_connect, "CPU_COMPARE_INCOMPATIBLE",
@@ -2896,32 +2797,15 @@ void ruby_libvirt_connect_init(void)
2896
2797
  INT2NUM(VIR_CPU_COMPARE_SUPERSET));
2897
2798
 
2898
2799
  rb_define_method(c_connect, "compare_cpu", libvirt_connect_compare_cpu, -1);
2899
- #endif
2900
2800
 
2901
- #if HAVE_CONST_VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE
2902
2801
  rb_define_const(c_connect, "COMPARE_CPU_FAIL_INCOMPATIBLE",
2903
2802
  INT2NUM(VIR_CONNECT_COMPARE_CPU_FAIL_INCOMPATIBLE));
2904
- #endif
2905
2803
 
2906
- #if HAVE_VIRCONNECTBASELINECPU
2907
2804
  rb_define_method(c_connect, "baseline_cpu", libvirt_connect_baseline_cpu,
2908
2805
  -1);
2909
- #endif
2910
- #if HAVE_CONST_VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES
2911
2806
  rb_define_const(c_connect, "BASELINE_CPU_EXPAND_FEATURES",
2912
2807
  INT2NUM(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES));
2913
- #endif
2914
-
2915
- /* In the libvirt development history, the events were
2916
- * first defined in commit 1509b8027fd0b73c30aeab443f81dd5a18d80544,
2917
- * then ADDED and REMOVED were renamed to DEFINED and UNDEFINED at
2918
- * the same time that the details were added
2919
- * (d3d54d2fc92e350f250eda26cee5d0342416a9cf). What this means is that
2920
- * we have to check for HAVE_CONST_VIR_DOMAIN_EVENT_DEFINED and
2921
- * HAVE_CONST_VIR_DOMAIN_EVENT_STARTED to untangle these, and then we
2922
- * can make a decision for many of the events based on that.
2923
- */
2924
- #if HAVE_CONST_VIR_DOMAIN_EVENT_DEFINED
2808
+
2925
2809
  rb_define_const(c_connect, "DOMAIN_EVENT_DEFINED",
2926
2810
  INT2NUM(VIR_DOMAIN_EVENT_DEFINED));
2927
2811
  rb_define_const(c_connect, "DOMAIN_EVENT_DEFINED_ADDED",
@@ -2958,8 +2842,6 @@ void ruby_libvirt_connect_init(void)
2958
2842
  INT2NUM(VIR_DOMAIN_EVENT_STOPPED_SAVED));
2959
2843
  rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED_FAILED",
2960
2844
  INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FAILED));
2961
- #endif
2962
- #if HAVE_CONST_VIR_DOMAIN_EVENT_STARTED
2963
2845
  rb_define_const(c_connect, "DOMAIN_EVENT_STARTED",
2964
2846
  INT2NUM(VIR_DOMAIN_EVENT_STARTED));
2965
2847
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED",
@@ -2968,20 +2850,14 @@ void ruby_libvirt_connect_init(void)
2968
2850
  INT2NUM(VIR_DOMAIN_EVENT_RESUMED));
2969
2851
  rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED",
2970
2852
  INT2NUM(VIR_DOMAIN_EVENT_STOPPED));
2971
- #endif
2972
- #if HAVE_TYPE_VIRDOMAINSNAPSHOTPTR
2973
2853
  rb_define_const(c_connect, "DOMAIN_EVENT_STARTED_FROM_SNAPSHOT",
2974
2854
  INT2NUM(VIR_DOMAIN_EVENT_STARTED_FROM_SNAPSHOT));
2975
2855
  rb_define_const(c_connect, "DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT",
2976
2856
  INT2NUM(VIR_DOMAIN_EVENT_STOPPED_FROM_SNAPSHOT));
2977
- #endif
2978
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_IOERROR
2979
2857
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_IOERROR",
2980
2858
  INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_IOERROR));
2981
2859
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_WATCHDOG",
2982
2860
  INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_WATCHDOG));
2983
- #endif
2984
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_WATCHDOG
2985
2861
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_WATCHDOG",
2986
2862
  INT2NUM(VIR_DOMAIN_EVENT_ID_WATCHDOG));
2987
2863
  rb_define_const(c_connect, "DOMAIN_EVENT_WATCHDOG_NONE",
@@ -2996,8 +2872,6 @@ void ruby_libvirt_connect_init(void)
2996
2872
  INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_SHUTDOWN));
2997
2873
  rb_define_const(c_connect, "DOMAIN_EVENT_WATCHDOG_DEBUG",
2998
2874
  INT2NUM(VIR_DOMAIN_EVENT_WATCHDOG_DEBUG));
2999
- #endif
3000
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_IO_ERROR
3001
2875
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_IO_ERROR",
3002
2876
  INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR));
3003
2877
  rb_define_const(c_connect, "DOMAIN_EVENT_IO_ERROR_NONE",
@@ -3006,8 +2880,6 @@ void ruby_libvirt_connect_init(void)
3006
2880
  INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_PAUSE));
3007
2881
  rb_define_const(c_connect, "DOMAIN_EVENT_IO_ERROR_REPORT",
3008
2882
  INT2NUM(VIR_DOMAIN_EVENT_IO_ERROR_REPORT));
3009
- #endif
3010
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_GRAPHICS
3011
2883
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_GRAPHICS",
3012
2884
  INT2NUM(VIR_DOMAIN_EVENT_ID_GRAPHICS));
3013
2885
  rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_CONNECT",
@@ -3020,94 +2892,53 @@ void ruby_libvirt_connect_init(void)
3020
2892
  INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV4));
3021
2893
  rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6",
3022
2894
  INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_IPV6));
3023
- #endif
3024
- #if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY
3025
2895
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_LIFECYCLE",
3026
2896
  INT2NUM(VIR_DOMAIN_EVENT_ID_LIFECYCLE));
3027
- #endif
3028
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_REBOOT
3029
2897
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_REBOOT",
3030
2898
  INT2NUM(VIR_DOMAIN_EVENT_ID_REBOOT));
3031
- #endif
3032
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_RTC_CHANGE
3033
2899
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_RTC_CHANGE",
3034
2900
  INT2NUM(VIR_DOMAIN_EVENT_ID_RTC_CHANGE));
3035
- #endif
3036
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON
3037
2901
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_IO_ERROR_REASON",
3038
2902
  INT2NUM(VIR_DOMAIN_EVENT_ID_IO_ERROR_REASON));
3039
- #endif
3040
2903
 
3041
- #if HAVE_CONST_VIR_DOMAIN_EVENT_ID_CONTROL_ERROR
3042
2904
  rb_define_const(c_connect, "DOMAIN_EVENT_ID_CONTROL_ERROR",
3043
2905
  INT2NUM(VIR_DOMAIN_EVENT_ID_CONTROL_ERROR));
3044
- #endif
3045
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SHUTDOWN
3046
2906
  rb_define_const(c_connect, "DOMAIN_EVENT_SHUTDOWN",
3047
2907
  INT2NUM(VIR_DOMAIN_EVENT_SHUTDOWN));
3048
- #endif
3049
- #if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED
3050
2908
  rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED",
3051
2909
  INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED));
3052
- #endif
3053
- #if HAVE_CONST_VIR_DOMAIN_EVENT_CRASHED
3054
2910
  rb_define_const(c_connect, "DOMAIN_EVENT_CRASHED",
3055
2911
  INT2NUM(VIR_DOMAIN_EVENT_CRASHED));
3056
- #endif
3057
- #if HAVE_CONST_VIR_DOMAIN_EVENT_STARTED_WAKEUP
3058
2912
  rb_define_const(c_connect, "DOMAIN_EVENT_STARTED_WAKEUP",
3059
2913
  INT2NUM(VIR_DOMAIN_EVENT_STARTED_WAKEUP));
3060
- #endif
3061
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_RESTORED
3062
2914
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_RESTORED",
3063
2915
  INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_RESTORED));
3064
- #endif
3065
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT
3066
2916
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT",
3067
2917
  INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT));
3068
- #endif
3069
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR
3070
2918
  rb_define_const(c_connect, "DOMAIN_EVENT_SUSPENDED_API_ERROR",
3071
2919
  INT2NUM(VIR_DOMAIN_EVENT_SUSPENDED_API_ERROR));
3072
- #endif
3073
- #if HAVE_CONST_VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT
3074
2920
  rb_define_const(c_connect, "DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT",
3075
2921
  INT2NUM(VIR_DOMAIN_EVENT_RESUMED_FROM_SNAPSHOT));
3076
- #endif
3077
- #if HAVE_CONST_VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED
3078
2922
  rb_define_const(c_connect, "DOMAIN_EVENT_SHUTDOWN_FINISHED",
3079
2923
  INT2NUM(VIR_DOMAIN_EVENT_SHUTDOWN_FINISHED));
3080
- #endif
3081
- #if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY
3082
2924
  rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED_MEMORY",
3083
2925
  INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED_MEMORY));
3084
- #endif
3085
- #if HAVE_CONST_VIR_DOMAIN_EVENT_PMSUSPENDED_DISK
3086
2926
  rb_define_const(c_connect, "DOMAIN_EVENT_PMSUSPENDED_DISK",
3087
2927
  INT2NUM(VIR_DOMAIN_EVENT_PMSUSPENDED_DISK));
3088
- #endif
3089
- #if HAVE_CONST_VIR_DOMAIN_EVENT_CRASHED_PANICKED
3090
2928
  rb_define_const(c_connect, "DOMAIN_EVENT_CRASHED_PANICKED",
3091
2929
  INT2NUM(VIR_DOMAIN_EVENT_CRASHED_PANICKED));
3092
- #endif
3093
- #if HAVE_CONST_VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX
3094
2930
  rb_define_const(c_connect, "DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX",
3095
2931
  INT2NUM(VIR_DOMAIN_EVENT_GRAPHICS_ADDRESS_UNIX));
3096
- #endif
3097
2932
 
3098
- #if HAVE_VIRCONNECTDOMAINEVENTREGISTER
3099
2933
  rb_define_method(c_connect, "domain_event_register",
3100
2934
  libvirt_connect_domain_event_register, -1);
3101
2935
  rb_define_method(c_connect, "domain_event_deregister",
3102
2936
  libvirt_connect_domain_event_deregister, 0);
3103
- #endif
3104
2937
 
3105
- #if HAVE_VIRCONNECTDOMAINEVENTREGISTERANY
3106
2938
  rb_define_method(c_connect, "domain_event_register_any",
3107
2939
  libvirt_connect_domain_event_register_any, -1);
3108
2940
  rb_define_method(c_connect, "domain_event_deregister_any",
3109
2941
  libvirt_connect_domain_event_deregister_any, 1);
3110
- #endif
3111
2942
 
3112
2943
  /* Domain creation/lookup */
3113
2944
  rb_define_method(c_connect, "num_of_domains",
@@ -3120,33 +2951,24 @@ void ruby_libvirt_connect_init(void)
3120
2951
  libvirt_connect_list_defined_domains, 0);
3121
2952
  rb_define_method(c_connect, "create_domain_linux",
3122
2953
  libvirt_connect_create_linux, -1);
3123
- #if HAVE_VIRDOMAINCREATEXML
3124
2954
  rb_define_method(c_connect, "create_domain_xml",
3125
2955
  libvirt_connect_create_domain_xml, -1);
3126
- #endif
3127
2956
  rb_define_method(c_connect, "lookup_domain_by_name",
3128
2957
  libvirt_connect_lookup_domain_by_name, 1);
3129
2958
  rb_define_method(c_connect, "lookup_domain_by_id",
3130
2959
  libvirt_connect_lookup_domain_by_id, 1);
3131
2960
  rb_define_method(c_connect, "lookup_domain_by_uuid",
3132
2961
  libvirt_connect_lookup_domain_by_uuid, 1);
3133
- #if HAVE_CONST_VIR_DOMAIN_DEFINE_VALIDATE
3134
2962
  rb_define_const(c_connect, "DOMAIN_DEFINE_VALIDATE",
3135
2963
  INT2NUM(VIR_DOMAIN_DEFINE_VALIDATE));
3136
- #endif
3137
2964
  rb_define_method(c_connect, "define_domain_xml",
3138
2965
  libvirt_connect_define_domain_xml, -1);
3139
2966
 
3140
- #if HAVE_VIRCONNECTDOMAINXMLFROMNATIVE
3141
2967
  rb_define_method(c_connect, "domain_xml_from_native",
3142
2968
  libvirt_connect_domain_xml_from_native, -1);
3143
- #endif
3144
- #if HAVE_VIRCONNECTDOMAINXMLTONATIVE
3145
2969
  rb_define_method(c_connect, "domain_xml_to_native",
3146
2970
  libvirt_connect_domain_xml_to_native, -1);
3147
- #endif
3148
2971
 
3149
- #if HAVE_TYPE_VIRINTERFACEPTR
3150
2972
  /* Interface lookup/creation methods */
3151
2973
  rb_define_method(c_connect, "num_of_interfaces",
3152
2974
  libvirt_connect_num_of_interfaces, 0);
@@ -3162,7 +2984,6 @@ void ruby_libvirt_connect_init(void)
3162
2984
  libvirt_connect_lookup_interface_by_mac, 1);
3163
2985
  rb_define_method(c_connect, "define_interface_xml",
3164
2986
  libvirt_connect_define_interface_xml, -1);
3165
- #endif
3166
2987
 
3167
2988
  /* Network lookup/creation methods */
3168
2989
  rb_define_method(c_connect, "num_of_networks",
@@ -3183,20 +3004,15 @@ void ruby_libvirt_connect_init(void)
3183
3004
  libvirt_connect_define_network_xml, 1);
3184
3005
 
3185
3006
  /* Node device lookup/creation methods */
3186
- #if HAVE_TYPE_VIRNODEDEVICEPTR
3187
3007
  rb_define_method(c_connect, "num_of_nodedevices",
3188
3008
  libvirt_connect_num_of_nodedevices, -1);
3189
3009
  rb_define_method(c_connect, "list_nodedevices",
3190
3010
  libvirt_connect_list_nodedevices, -1);
3191
3011
  rb_define_method(c_connect, "lookup_nodedevice_by_name",
3192
3012
  libvirt_connect_lookup_nodedevice_by_name, 1);
3193
- #if HAVE_VIRNODEDEVICECREATEXML
3194
3013
  rb_define_method(c_connect, "create_nodedevice_xml",
3195
3014
  libvirt_connect_create_nodedevice_xml, -1);
3196
- #endif
3197
- #endif
3198
3015
 
3199
- #if HAVE_TYPE_VIRNWFILTERPTR
3200
3016
  /* NWFilter lookup/creation methods */
3201
3017
  rb_define_method(c_connect, "num_of_nwfilters",
3202
3018
  libvirt_connect_num_of_nwfilters, 0);
@@ -3208,9 +3024,7 @@ void ruby_libvirt_connect_init(void)
3208
3024
  libvirt_connect_lookup_nwfilter_by_uuid, 1);
3209
3025
  rb_define_method(c_connect, "define_nwfilter_xml",
3210
3026
  libvirt_connect_define_nwfilter_xml, 1);
3211
- #endif
3212
3027
 
3213
- #if HAVE_TYPE_VIRSECRETPTR
3214
3028
  /* Secret lookup/creation methods */
3215
3029
  rb_define_method(c_connect, "num_of_secrets",
3216
3030
  libvirt_connect_num_of_secrets, 0);
@@ -3222,9 +3036,7 @@ void ruby_libvirt_connect_init(void)
3222
3036
  libvirt_connect_lookup_secret_by_usage, 2);
3223
3037
  rb_define_method(c_connect, "define_secret_xml",
3224
3038
  libvirt_connect_define_secret_xml, -1);
3225
- #endif
3226
3039
 
3227
- #if HAVE_TYPE_VIRSTORAGEPOOLPTR
3228
3040
  /* StoragePool lookup/creation methods */
3229
3041
  rb_define_method(c_connect, "num_of_storage_pools",
3230
3042
  libvirt_connect_num_of_storage_pools, 0);
@@ -3244,49 +3056,31 @@ void ruby_libvirt_connect_init(void)
3244
3056
  libvirt_connect_define_pool_xml, -1);
3245
3057
  rb_define_method(c_connect, "discover_storage_pool_sources",
3246
3058
  libvirt_connect_find_storage_pool_sources, -1);
3247
- #endif
3248
3059
 
3249
- #if HAVE_VIRCONNECTGETSYSINFO
3250
3060
  rb_define_method(c_connect, "sys_info", libvirt_connect_sys_info, -1);
3251
- #endif
3252
- #if HAVE_TYPE_VIRSTREAMPTR
3253
3061
  rb_define_method(c_connect, "stream", libvirt_connect_stream, -1);
3254
- #endif
3255
3062
 
3256
- #if HAVE_VIRINTERFACECHANGEBEGIN
3257
3063
  rb_define_method(c_connect, "interface_change_begin",
3258
3064
  libvirt_connect_interface_change_begin, -1);
3259
3065
  rb_define_method(c_connect, "interface_change_commit",
3260
3066
  libvirt_connect_interface_change_commit, -1);
3261
3067
  rb_define_method(c_connect, "interface_change_rollback",
3262
3068
  libvirt_connect_interface_change_rollback, -1);
3263
- #endif
3264
3069
 
3265
- #if HAVE_VIRNODEGETCPUSTATS
3266
3070
  rb_define_method(c_connect, "node_cpu_stats",
3267
3071
  libvirt_connect_node_cpu_stats, -1);
3268
- #endif
3269
- #if HAVE_CONST_VIR_NODE_CPU_STATS_ALL_CPUS
3270
3072
  rb_define_const(c_connect, "NODE_CPU_STATS_ALL_CPUS",
3271
3073
  INT2NUM(VIR_NODE_CPU_STATS_ALL_CPUS));
3272
- #endif
3273
- #if HAVE_VIRNODEGETMEMORYSTATS
3274
3074
  rb_define_method(c_connect, "node_memory_stats",
3275
3075
  libvirt_connect_node_memory_stats, -1);
3276
- #endif
3277
- #if HAVE_CONST_VIR_NODE_MEMORY_STATS_ALL_CELLS
3278
3076
  rb_define_const(c_connect, "NODE_MEMORY_STATS_ALL_CELLS",
3279
3077
  INT2NUM(VIR_NODE_MEMORY_STATS_ALL_CELLS));
3280
- #endif
3281
3078
 
3282
- #if HAVE_VIRDOMAINSAVEIMAGEGETXMLDESC
3283
3079
  rb_define_method(c_connect, "save_image_xml_desc",
3284
3080
  libvirt_connect_save_image_xml_desc, -1);
3285
3081
  rb_define_method(c_connect, "define_save_image_xml",
3286
3082
  libvirt_connect_define_save_image_xml, -1);
3287
- #endif
3288
3083
 
3289
- #if HAVE_VIRNODESUSPENDFORDURATION
3290
3084
  rb_define_const(c_connect, "NODE_SUSPEND_TARGET_MEM",
3291
3085
  INT2NUM(VIR_NODE_SUSPEND_TARGET_MEM));
3292
3086
  rb_define_const(c_connect, "NODE_SUSPEND_TARGET_DISK",
@@ -3296,29 +3090,21 @@ void ruby_libvirt_connect_init(void)
3296
3090
 
3297
3091
  rb_define_method(c_connect, "node_suspend_for_duration",
3298
3092
  libvirt_connect_node_suspend_for_duration, -1);
3299
- #endif
3300
3093
 
3301
- #if HAVE_VIRNODEGETMEMORYPARAMETERS
3302
3094
  rb_define_method(c_connect, "node_memory_parameters",
3303
3095
  libvirt_connect_node_memory_parameters, -1);
3304
3096
  rb_define_method(c_connect, "node_memory_parameters=",
3305
3097
  libvirt_connect_node_memory_parameters_equal, 1);
3306
- #endif
3307
3098
 
3308
- #if HAVE_VIRNODEGETCPUMAP
3309
3099
  rb_define_method(c_connect, "node_cpu_map",
3310
3100
  libvirt_connect_node_cpu_map, -1);
3311
3101
  rb_define_alias(c_connect, "node_get_cpu_map", "node_cpu_map");
3312
- #endif
3313
3102
 
3314
- #if HAVE_VIRCONNECTSETKEEPALIVE
3315
3103
  rb_define_method(c_connect, "set_keepalive",
3316
3104
  libvirt_connect_set_keepalive, 2);
3317
3105
  rb_define_method(c_connect, "keepalive=", libvirt_connect_keepalive_equal,
3318
3106
  1);
3319
- #endif
3320
3107
 
3321
- #if HAVE_VIRCONNECTLISTALLDOMAINS
3322
3108
  rb_define_const(c_connect, "LIST_DOMAINS_ACTIVE",
3323
3109
  INT2NUM(VIR_CONNECT_LIST_DOMAINS_ACTIVE));
3324
3110
  rb_define_const(c_connect, "LIST_DOMAINS_INACTIVE",
@@ -3349,8 +3135,7 @@ void ruby_libvirt_connect_init(void)
3349
3135
  INT2NUM(VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT));
3350
3136
  rb_define_method(c_connect, "list_all_domains",
3351
3137
  libvirt_connect_list_all_domains, -1);
3352
- #endif
3353
- #if HAVE_VIRCONNECTLISTALLNETWORKS
3138
+
3354
3139
  rb_define_const(c_connect, "LIST_NETWORKS_ACTIVE",
3355
3140
  INT2NUM(VIR_CONNECT_LIST_NETWORKS_ACTIVE));
3356
3141
  rb_define_const(c_connect, "LIST_NETWORKS_INACTIVE",
@@ -3365,16 +3150,14 @@ void ruby_libvirt_connect_init(void)
3365
3150
  INT2NUM(VIR_CONNECT_LIST_NETWORKS_NO_AUTOSTART));
3366
3151
  rb_define_method(c_connect, "list_all_networks",
3367
3152
  libvirt_connect_list_all_networks, -1);
3368
- #endif
3369
- #if HAVE_VIRCONNECTLISTALLINTERFACES
3153
+
3370
3154
  rb_define_const(c_connect, "LIST_INTERFACES_INACTIVE",
3371
3155
  INT2NUM(VIR_CONNECT_LIST_INTERFACES_INACTIVE));
3372
3156
  rb_define_const(c_connect, "LIST_INTERFACES_ACTIVE",
3373
3157
  INT2NUM(VIR_CONNECT_LIST_INTERFACES_ACTIVE));
3374
3158
  rb_define_method(c_connect, "list_all_interfaces",
3375
3159
  libvirt_connect_list_all_interfaces, -1);
3376
- #endif
3377
- #if HAVE_VIRCONNECTLISTALLSECRETS
3160
+
3378
3161
  rb_define_const(c_connect, "LIST_SECRETS_EPHEMERAL",
3379
3162
  INT2NUM(VIR_CONNECT_LIST_SECRETS_EPHEMERAL));
3380
3163
  rb_define_const(c_connect, "LIST_SECRETS_NO_EPHEMERAL",
@@ -3385,8 +3168,7 @@ void ruby_libvirt_connect_init(void)
3385
3168
  INT2NUM(VIR_CONNECT_LIST_SECRETS_NO_PRIVATE));
3386
3169
  rb_define_method(c_connect, "list_all_secrets",
3387
3170
  libvirt_connect_list_all_secrets, -1);
3388
- #endif
3389
- #if HAVE_VIRCONNECTLISTALLNODEDEVICES
3171
+
3390
3172
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_SYSTEM",
3391
3173
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SYSTEM));
3392
3174
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_PCI_DEV",
@@ -3405,20 +3187,15 @@ void ruby_libvirt_connect_init(void)
3405
3187
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI));
3406
3188
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_STORAGE",
3407
3189
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_STORAGE));
3408
- #if HAVE_CONST_VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST
3409
3190
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_FC_HOST",
3410
3191
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_FC_HOST));
3411
3192
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_VPORTS",
3412
3193
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_VPORTS));
3413
- #endif
3414
- #if HAVE_CONST_VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC
3415
3194
  rb_define_const(c_connect, "LIST_NODE_DEVICES_CAP_SCSI_GENERIC",
3416
3195
  INT2NUM(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC));
3417
- #endif
3418
3196
  rb_define_method(c_connect, "list_all_nodedevices",
3419
3197
  libvirt_connect_list_all_nodedevices, -1);
3420
- #endif
3421
- #if HAVE_VIRCONNECTLISTALLSTORAGEPOOLS
3198
+
3422
3199
  rb_define_const(c_connect, "LIST_STORAGE_POOLS_INACTIVE",
3423
3200
  INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_INACTIVE));
3424
3201
  rb_define_const(c_connect, "LIST_STORAGE_POOLS_ACTIVE",
@@ -3453,47 +3230,26 @@ void ruby_libvirt_connect_init(void)
3453
3230
  INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_SHEEPDOG));
3454
3231
  rb_define_method(c_connect, "list_all_storage_pools",
3455
3232
  libvirt_connect_list_all_storage_pools, -1);
3456
- #endif
3457
- #if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER
3458
3233
  rb_define_const(c_connect, "LIST_STORAGE_POOLS_GLUSTER",
3459
3234
  INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_GLUSTER));
3460
- #endif
3461
- #if HAVE_CONST_VIR_CONNECT_LIST_STORAGE_POOLS_ZFS
3462
3235
  rb_define_const(c_connect, "LIST_STORAGE_POOLS_ZFS",
3463
3236
  INT2NUM(VIR_CONNECT_LIST_STORAGE_POOLS_ZFS));
3464
- #endif
3465
- #if HAVE_VIRCONNECTLISTALLNWFILTERS
3466
3237
  rb_define_method(c_connect, "list_all_nwfilters",
3467
3238
  libvirt_connect_list_all_nwfilters, -1);
3468
- #endif
3469
- #if HAVE_VIRCONNECTISALIVE
3470
3239
  rb_define_method(c_connect, "alive?", libvirt_connect_alive_p, 0);
3471
- #endif
3472
- #if HAVE_VIRDOMAINCREATEXMLWITHFILES
3473
3240
  rb_define_method(c_connect, "create_domain_xml_with_files",
3474
3241
  libvirt_connect_create_domain_xml_with_files, -1);
3475
- #endif
3476
- #if HAVE_VIRDOMAINQEMUATTACH
3477
3242
  rb_define_method(c_connect, "qemu_attach", libvirt_connect_qemu_attach, -1);
3478
- #endif
3479
- #if HAVE_VIRCONNECTGETCPUMODELNAMES
3480
3243
  rb_define_method(c_connect, "cpu_model_names",
3481
3244
  libvirt_connect_cpu_model_names, -1);
3482
- #endif
3483
- #if HAVE_VIRNODEALLOCPAGES
3484
3245
  rb_define_const(c_connect, "NODE_ALLOC_PAGES_ADD",
3485
3246
  INT2NUM(VIR_NODE_ALLOC_PAGES_ADD));
3486
3247
  rb_define_const(c_connect, "NODE_ALLOC_PAGES_SET",
3487
3248
  INT2NUM(VIR_NODE_ALLOC_PAGES_SET));
3488
3249
  rb_define_method(c_connect, "node_alloc_pages",
3489
3250
  libvirt_connect_node_alloc_pages, -1);
3490
- #endif
3491
- #if HAVE_VIRCONNECTGETDOMAINCAPABILITIES
3492
3251
  rb_define_method(c_connect, "domain_capabilities",
3493
3252
  libvirt_connect_domain_capabilities, -1);
3494
- #endif
3495
- #if HAVE_VIRNODEGETFREEPAGES
3496
3253
  rb_define_method(c_connect, "node_free_pages",
3497
3254
  libvirt_connect_node_free_pages, -1);
3498
- #endif
3499
3255
  }