ovirt-engine-sdk 4.0.1 → 4.4.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/CHANGES.adoc +684 -0
- data/README.adoc +729 -32
- data/ext/ovirtsdk4c/extconf.rb +31 -5
- data/ext/ovirtsdk4c/ov_error.c +9 -2
- data/ext/ovirtsdk4c/ov_error.h +3 -1
- data/ext/ovirtsdk4c/ov_http_client.c +1218 -0
- data/ext/ovirtsdk4c/ov_http_client.h +75 -0
- data/ext/ovirtsdk4c/ov_http_request.c +397 -0
- data/ext/ovirtsdk4c/ov_http_request.h +54 -0
- data/ext/ovirtsdk4c/ov_http_response.c +210 -0
- data/ext/ovirtsdk4c/ov_http_response.h +41 -0
- data/ext/ovirtsdk4c/ov_http_transfer.c +91 -0
- data/ext/ovirtsdk4c/ov_http_transfer.h +47 -0
- data/ext/ovirtsdk4c/ov_module.h +2 -2
- data/ext/ovirtsdk4c/ov_string.c +43 -0
- data/ext/ovirtsdk4c/ov_string.h +25 -0
- data/ext/ovirtsdk4c/ov_xml_reader.c +115 -99
- data/ext/ovirtsdk4c/ov_xml_reader.h +20 -3
- data/ext/ovirtsdk4c/ov_xml_writer.c +95 -77
- data/ext/ovirtsdk4c/ov_xml_writer.h +18 -3
- data/ext/ovirtsdk4c/ovirtsdk4c.c +10 -2
- data/lib/ovirtsdk4/connection.rb +695 -0
- data/lib/ovirtsdk4/errors.rb +70 -0
- data/lib/ovirtsdk4/probe.rb +324 -0
- data/lib/ovirtsdk4/reader.rb +74 -40
- data/lib/ovirtsdk4/readers.rb +3325 -976
- data/lib/ovirtsdk4/service.rb +439 -48
- data/lib/ovirtsdk4/services.rb +29365 -21180
- data/lib/ovirtsdk4/type.rb +20 -6
- data/lib/ovirtsdk4/types.rb +15048 -3198
- data/lib/ovirtsdk4/version.rb +1 -1
- data/lib/ovirtsdk4/writer.rb +108 -13
- data/lib/ovirtsdk4/writers.rb +1373 -294
- data/lib/ovirtsdk4.rb +4 -2
- metadata +88 -36
- data/lib/ovirtsdk4/http.rb +0 -548
data/ext/ovirtsdk4c/extconf.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2015-
|
4
|
+
# Copyright (c) 2015-2017 Red Hat, Inc.
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
7
|
# you may not use this file except in compliance with the License.
|
@@ -18,11 +18,37 @@
|
|
18
18
|
|
19
19
|
require 'mkmf'
|
20
20
|
|
21
|
-
# Check
|
22
|
-
|
21
|
+
# Check if "libxml2" is available:
|
22
|
+
xml2_config = find_executable('xml2-config')
|
23
|
+
if xml2_config
|
24
|
+
cflags = `#{xml2_config} --cflags`.strip
|
25
|
+
libs = `#{xml2_config} --libs`.strip
|
26
|
+
$CPPFLAGS = "#{cflags} #{$CPPFLAGS}"
|
27
|
+
$LDFLAGS = "#{libs} #{$LDFLAGS}"
|
28
|
+
elsif !pkg_config('libxml2')
|
23
29
|
raise 'The "libxml2" package isn\'t available.'
|
24
30
|
end
|
25
|
-
$CPPFLAGS = "#{`xml2-config --cflags`.strip} #{$CPPFLAGS}"
|
26
|
-
$LDFLAGS = "#{`xml2-config --libs`.strip} #{$LDFLAGS}"
|
27
31
|
|
32
|
+
# Check if "libcurl" is available:
|
33
|
+
curl_config = find_executable('curl-config')
|
34
|
+
if curl_config
|
35
|
+
cflags = `#{curl_config} --cflags`.strip
|
36
|
+
libs = `#{curl_config} --libs`.strip
|
37
|
+
$CPPFLAGS = "#{cflags} #{$CPPFLAGS}"
|
38
|
+
$LDFLAGS = "#{libs} #{$LDFLAGS}"
|
39
|
+
elsif !pkg_config('libcurl')
|
40
|
+
raise 'The "libcurl" package isn\'t available.'
|
41
|
+
end
|
42
|
+
|
43
|
+
# When installing the SDK as a plugin in Vagrant there is an issue with
|
44
|
+
# some versions of Vagrant that embed "libxml2" and "libcurl", but using
|
45
|
+
# an incorrect directory. To avoid that we need to explicitly fix the
|
46
|
+
# Vagrant path.
|
47
|
+
def fix_vagrant_prefix(flags)
|
48
|
+
flags.gsub!('/vagrant-substrate/staging', '/opt/vagrant')
|
49
|
+
end
|
50
|
+
fix_vagrant_prefix($CPPFLAGS)
|
51
|
+
fix_vagrant_prefix($LDFLAGS)
|
52
|
+
|
53
|
+
# Create the Makefile:
|
28
54
|
create_makefile 'ovirtsdk4c'
|
data/ext/ovirtsdk4c/ov_error.c
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2015-
|
2
|
+
Copyright (c) 2015-2017 Red Hat, Inc.
|
3
3
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
you may not use this file except in compliance with the License.
|
@@ -19,9 +19,16 @@ limitations under the License.
|
|
19
19
|
#include "ov_module.h"
|
20
20
|
#include "ov_error.h"
|
21
21
|
|
22
|
-
/*
|
22
|
+
/* Classes: */
|
23
23
|
VALUE ov_error_class;
|
24
|
+
VALUE ov_connection_error_class;
|
25
|
+
VALUE ov_timeout_error_class;
|
24
26
|
|
25
27
|
void ov_error_define(void) {
|
28
|
+
/* Define the base error class: */
|
26
29
|
ov_error_class = rb_define_class_under(ov_module, "Error", rb_eStandardError);
|
30
|
+
|
31
|
+
/* Define the specialized error classes: */
|
32
|
+
ov_connection_error_class = rb_define_class_under(ov_module, "ConnectionError", ov_error_class);
|
33
|
+
ov_timeout_error_class = rb_define_class_under(ov_module, "TimeoutError", ov_error_class);
|
27
34
|
}
|
data/ext/ovirtsdk4c/ov_error.h
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
Copyright (c) 2015-
|
2
|
+
Copyright (c) 2015-2017 Red Hat, Inc.
|
3
3
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
you may not use this file except in compliance with the License.
|
@@ -19,6 +19,8 @@ limitations under the License.
|
|
19
19
|
|
20
20
|
// Classes:
|
21
21
|
extern VALUE ov_error_class;
|
22
|
+
extern VALUE ov_connection_error_class;
|
23
|
+
extern VALUE ov_timeout_error_class;
|
22
24
|
|
23
25
|
// Initialization function:
|
24
26
|
extern void ov_error_define(void);
|