opennebula 3.9.80.beta
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.
- data/LICENSE +202 -0
- data/NOTICE +47 -0
- data/lib/opennebula.rb +58 -0
- data/lib/opennebula/acl.rb +266 -0
- data/lib/opennebula/acl_pool.rb +55 -0
- data/lib/opennebula/client.rb +119 -0
- data/lib/opennebula/cluster.rb +249 -0
- data/lib/opennebula/cluster_pool.rb +58 -0
- data/lib/opennebula/datastore.rb +171 -0
- data/lib/opennebula/datastore_pool.rb +55 -0
- data/lib/opennebula/document.rb +261 -0
- data/lib/opennebula/document_json.rb +131 -0
- data/lib/opennebula/document_pool.rb +102 -0
- data/lib/opennebula/document_pool_json.rb +58 -0
- data/lib/opennebula/error.rb +52 -0
- data/lib/opennebula/group.rb +163 -0
- data/lib/opennebula/group_pool.rb +56 -0
- data/lib/opennebula/host.rb +201 -0
- data/lib/opennebula/host_pool.rb +93 -0
- data/lib/opennebula/image.rb +297 -0
- data/lib/opennebula/image_pool.rb +79 -0
- data/lib/opennebula/ldap_auth.rb +99 -0
- data/lib/opennebula/ldap_auth_spec.rb +70 -0
- data/lib/opennebula/pool.rb +160 -0
- data/lib/opennebula/pool_element.rb +269 -0
- data/lib/opennebula/server_cipher_auth.rb +148 -0
- data/lib/opennebula/server_x509_auth.rb +104 -0
- data/lib/opennebula/ssh_auth.rb +139 -0
- data/lib/opennebula/system.rb +141 -0
- data/lib/opennebula/template.rb +213 -0
- data/lib/opennebula/template_pool.rb +79 -0
- data/lib/opennebula/user.rb +174 -0
- data/lib/opennebula/user_pool.rb +55 -0
- data/lib/opennebula/virtual_machine.rb +560 -0
- data/lib/opennebula/virtual_machine_pool.rb +323 -0
- data/lib/opennebula/virtual_network.rb +249 -0
- data/lib/opennebula/virtual_network_pool.rb +79 -0
- data/lib/opennebula/x509_auth.rb +288 -0
- data/lib/opennebula/xml_element.rb +427 -0
- data/lib/opennebula/xml_pool.rb +45 -0
- data/lib/opennebula/xml_utils.rb +34 -0
- metadata +118 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
# -------------------------------------------------------------------------- #
|
2
|
+
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs #
|
3
|
+
# #
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
|
+
# not use this file except in compliance with the License. You may obtain #
|
6
|
+
# a copy of the License at #
|
7
|
+
# #
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
9
|
+
# #
|
10
|
+
# Unless required by applicable law or agreed to in writing, software #
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, #
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
13
|
+
# See the License for the specific language governing permissions and #
|
14
|
+
# limitations under the License. #
|
15
|
+
#--------------------------------------------------------------------------- #
|
16
|
+
|
17
|
+
require 'opennebula/xml_element'
|
18
|
+
|
19
|
+
module OpenNebula
|
20
|
+
# The XMLUtilsPool module provides an abstraction of the underlying
|
21
|
+
# XML parser engine. It provides XML-related methods for the Pools
|
22
|
+
class XMLPool < XMLElement
|
23
|
+
|
24
|
+
def initialize(xml=nil)
|
25
|
+
super(xml)
|
26
|
+
end
|
27
|
+
|
28
|
+
#Executes the given block for each element of the Pool
|
29
|
+
#block:: _Block_
|
30
|
+
def each_element(block)
|
31
|
+
if NOKOGIRI
|
32
|
+
@xml.xpath(
|
33
|
+
"#{@element_name}").each {|pelem|
|
34
|
+
block.call self.factory(pelem)
|
35
|
+
}
|
36
|
+
else
|
37
|
+
@xml.elements.each(
|
38
|
+
"#{@element_name}") {|pelem|
|
39
|
+
block.call self.factory(pelem)
|
40
|
+
}
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# -------------------------------------------------------------------------- #
|
2
|
+
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs #
|
3
|
+
# #
|
4
|
+
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
|
+
# not use this file except in compliance with the License. You may obtain #
|
6
|
+
# a copy of the License at #
|
7
|
+
# #
|
8
|
+
# http://www.apache.org/licenses/LICENSE-2.0 #
|
9
|
+
# #
|
10
|
+
# Unless required by applicable law or agreed to in writing, software #
|
11
|
+
# distributed under the License is distributed on an "AS IS" BASIS, #
|
12
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
13
|
+
# See the License for the specific language governing permissions and #
|
14
|
+
# limitations under the License. #
|
15
|
+
#--------------------------------------------------------------------------- #
|
16
|
+
|
17
|
+
require 'opennebula/xml_pool'
|
18
|
+
|
19
|
+
module OpenNebula
|
20
|
+
|
21
|
+
begin
|
22
|
+
require 'nokogiri'
|
23
|
+
NOKOGIRI=true
|
24
|
+
rescue LoadError
|
25
|
+
NOKOGIRI=false
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
require 'rexml/formatters/pretty'
|
30
|
+
REXML_FORMATTERS=true
|
31
|
+
rescue LoadError
|
32
|
+
REXML_FORMATTERS=false
|
33
|
+
end
|
34
|
+
end
|
metadata
ADDED
@@ -0,0 +1,118 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: opennebula
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.9.80.beta
|
5
|
+
prerelease: 7
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- OpenNebula
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-03-26 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: nokogiri
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: json
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
description: Libraries needed to talk to OpenNebula
|
47
|
+
email: contact@opennebula.org
|
48
|
+
executables: []
|
49
|
+
extensions: []
|
50
|
+
extra_rdoc_files: []
|
51
|
+
files:
|
52
|
+
- lib/opennebula.rb
|
53
|
+
- lib/opennebula/acl.rb
|
54
|
+
- lib/opennebula/acl_pool.rb
|
55
|
+
- lib/opennebula/client.rb
|
56
|
+
- lib/opennebula/cluster.rb
|
57
|
+
- lib/opennebula/cluster_pool.rb
|
58
|
+
- lib/opennebula/datastore.rb
|
59
|
+
- lib/opennebula/datastore_pool.rb
|
60
|
+
- lib/opennebula/document.rb
|
61
|
+
- lib/opennebula/document_json.rb
|
62
|
+
- lib/opennebula/document_pool.rb
|
63
|
+
- lib/opennebula/document_pool_json.rb
|
64
|
+
- lib/opennebula/error.rb
|
65
|
+
- lib/opennebula/group.rb
|
66
|
+
- lib/opennebula/group_pool.rb
|
67
|
+
- lib/opennebula/host.rb
|
68
|
+
- lib/opennebula/host_pool.rb
|
69
|
+
- lib/opennebula/image.rb
|
70
|
+
- lib/opennebula/image_pool.rb
|
71
|
+
- lib/opennebula/pool.rb
|
72
|
+
- lib/opennebula/pool_element.rb
|
73
|
+
- lib/opennebula/system.rb
|
74
|
+
- lib/opennebula/template.rb
|
75
|
+
- lib/opennebula/template_pool.rb
|
76
|
+
- lib/opennebula/user.rb
|
77
|
+
- lib/opennebula/user_pool.rb
|
78
|
+
- lib/opennebula/virtual_machine.rb
|
79
|
+
- lib/opennebula/virtual_machine_pool.rb
|
80
|
+
- lib/opennebula/virtual_network.rb
|
81
|
+
- lib/opennebula/virtual_network_pool.rb
|
82
|
+
- lib/opennebula/xml_element.rb
|
83
|
+
- lib/opennebula/xml_pool.rb
|
84
|
+
- lib/opennebula/xml_utils.rb
|
85
|
+
- lib/opennebula/ldap_auth.rb
|
86
|
+
- lib/opennebula/ldap_auth_spec.rb
|
87
|
+
- lib/opennebula/server_cipher_auth.rb
|
88
|
+
- lib/opennebula/server_x509_auth.rb
|
89
|
+
- lib/opennebula/ssh_auth.rb
|
90
|
+
- lib/opennebula/x509_auth.rb
|
91
|
+
- NOTICE
|
92
|
+
- LICENSE
|
93
|
+
homepage: http://opennebula.org
|
94
|
+
licenses: []
|
95
|
+
post_install_message:
|
96
|
+
rdoc_options: []
|
97
|
+
require_paths:
|
98
|
+
- lib
|
99
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
100
|
+
none: false
|
101
|
+
requirements:
|
102
|
+
- - ! '>='
|
103
|
+
- !ruby/object:Gem::Version
|
104
|
+
version: '0'
|
105
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
106
|
+
none: false
|
107
|
+
requirements:
|
108
|
+
- - ! '>'
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.3.1
|
111
|
+
requirements: []
|
112
|
+
rubyforge_project:
|
113
|
+
rubygems_version: 1.8.25
|
114
|
+
signing_key:
|
115
|
+
specification_version: 3
|
116
|
+
summary: OpenNebula Client API
|
117
|
+
test_files: []
|
118
|
+
has_rdoc:
|