opennebula-oca 3.8.0 → 3.9.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/lib/{OpenNebula/Acl.rb → opennebula/acl.rb} +0 -0
  2. data/lib/{OpenNebula/AclPool.rb → opennebula/acl_pool.rb} +1 -1
  3. data/lib/{OpenNebula.rb → opennebula/client.rb} +0 -73
  4. data/lib/{OpenNebula/Cluster.rb → opennebula/cluster.rb} +1 -1
  5. data/lib/{OpenNebula/ClusterPool.rb → opennebula/cluster_pool.rb} +1 -1
  6. data/lib/{OpenNebula/Datastore.rb → opennebula/datastore.rb} +23 -1
  7. data/lib/{OpenNebula/DatastorePool.rb → opennebula/datastore_pool.rb} +1 -1
  8. data/lib/{OpenNebula/Document.rb → opennebula/document.rb} +13 -2
  9. data/lib/{OpenNebula/DocumentJSON.rb → opennebula/document_json.rb} +0 -0
  10. data/lib/{OpenNebula/DocumentPool.rb → opennebula/document_pool.rb} +2 -2
  11. data/lib/{OpenNebula/DocumentPoolJSON.rb → opennebula/document_pool_json.rb} +0 -0
  12. data/lib/opennebula/error.rb +52 -0
  13. data/lib/{OpenNebula/Group.rb → opennebula/group.rb} +1 -1
  14. data/lib/{OpenNebula/GroupPool.rb → opennebula/group_pool.rb} +1 -1
  15. data/lib/{OpenNebula/Host.rb → opennebula/host.rb} +1 -1
  16. data/lib/{OpenNebula/HostPool.rb → opennebula/host_pool.rb} +1 -1
  17. data/lib/{OpenNebula/Image.rb → opennebula/image.rb} +20 -6
  18. data/lib/{OpenNebula/ImagePool.rb → opennebula/image_pool.rb} +1 -1
  19. data/lib/opennebula/ldap_auth.rb +99 -0
  20. data/lib/opennebula/ldap_auth_spec.rb +70 -0
  21. data/lib/opennebula/pool.rb +157 -0
  22. data/lib/{OpenNebula/Pool.rb → opennebula/pool_element.rb} +1 -138
  23. data/lib/opennebula/server_cipher_auth.rb +148 -0
  24. data/lib/opennebula/server_x509_auth.rb +104 -0
  25. data/lib/opennebula/ssh_auth.rb +139 -0
  26. data/lib/opennebula/system.rb +141 -0
  27. data/lib/{OpenNebula/Template.rb → opennebula/template.rb} +13 -2
  28. data/lib/{OpenNebula/TemplatePool.rb → opennebula/template_pool.rb} +1 -1
  29. data/lib/{OpenNebula/User.rb → opennebula/user.rb} +1 -1
  30. data/lib/{OpenNebula/UserPool.rb → opennebula/user_pool.rb} +1 -1
  31. data/lib/{OpenNebula/VirtualMachine.rb → opennebula/virtual_machine.rb} +45 -25
  32. data/lib/{OpenNebula/VirtualMachinePool.rb → opennebula/virtual_machine_pool.rb} +1 -1
  33. data/lib/{OpenNebula/VirtualNetwork.rb → opennebula/virtual_network.rb} +13 -2
  34. data/lib/{OpenNebula/VirtualNetworkPool.rb → opennebula/virtual_network_pool.rb} +1 -1
  35. data/lib/opennebula/x509_auth.rb +241 -0
  36. data/lib/{OpenNebula/XMLUtils.rb → opennebula/xml_element.rb} +12 -21
  37. data/lib/opennebula/xml_pool.rb +45 -0
  38. data/lib/opennebula/xml_utils.rb +34 -0
  39. data/lib/opennebula.rb +58 -0
  40. metadata +102 -63
@@ -0,0 +1,45 @@
1
+ # -------------------------------------------------------------------------- #
2
+ # Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) #
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-2012, OpenNebula Project Leads (OpenNebula.org) #
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
data/lib/opennebula.rb ADDED
@@ -0,0 +1,58 @@
1
+ # -------------------------------------------------------------------------- #
2
+ # Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) #
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
+
18
+ begin # require 'rubygems'
19
+ require 'rubygems'
20
+ rescue Exception
21
+ end
22
+
23
+ require 'digest/sha1'
24
+ require 'rexml/document'
25
+ require 'pp'
26
+
27
+ require 'opennebula/xml_utils'
28
+ require 'opennebula/client'
29
+ require 'opennebula/error'
30
+ require 'opennebula/virtual_machine'
31
+ require 'opennebula/virtual_machine_pool'
32
+ require 'opennebula/virtual_network'
33
+ require 'opennebula/virtual_network_pool'
34
+ require 'opennebula/image'
35
+ require 'opennebula/image_pool'
36
+ require 'opennebula/user'
37
+ require 'opennebula/user_pool'
38
+ require 'opennebula/host'
39
+ require 'opennebula/host_pool'
40
+ require 'opennebula/template'
41
+ require 'opennebula/template_pool'
42
+ require 'opennebula/group'
43
+ require 'opennebula/group_pool'
44
+ require 'opennebula/acl'
45
+ require 'opennebula/acl_pool'
46
+ require 'opennebula/datastore'
47
+ require 'opennebula/datastore_pool'
48
+ require 'opennebula/cluster'
49
+ require 'opennebula/cluster_pool'
50
+ require 'opennebula/document'
51
+ require 'opennebula/document_pool'
52
+ require 'opennebula/system'
53
+
54
+ module OpenNebula
55
+
56
+ # OpenNebula version
57
+ VERSION = '3.9.0'
58
+ end
metadata CHANGED
@@ -1,96 +1,135 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: opennebula-oca
3
- version: !ruby/object:Gem::Version
4
- version: 3.8.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ hash: -893421116
5
+ prerelease: 6
6
+ segments:
7
+ - 3
8
+ - 9
9
+ - 0
10
+ - beta
11
+ version: 3.9.0.beta
6
12
  platform: ruby
7
- authors:
13
+ authors:
8
14
  - OpenNebula
9
15
  autorequire:
10
16
  bindir: bin
11
17
  cert_chain: []
12
- date: 2012-11-19 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
18
+
19
+ date: 2012-12-20 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
15
22
  name: nokogiri
16
- requirement: &2153197840 !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
17
25
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
22
33
  type: :runtime
23
- prerelease: false
24
- version_requirements: *2153197840
25
- - !ruby/object:Gem::Dependency
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
26
36
  name: json
27
- requirement: &2153197400 !ruby/object:Gem::Requirement
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
33
47
  type: :runtime
34
- prerelease: false
35
- version_requirements: *2153197400
48
+ version_requirements: *id002
36
49
  description: Libraries needed to talk to OpenNebula
37
50
  email: contact@opennebula.org
38
51
  executables: []
52
+
39
53
  extensions: []
54
+
40
55
  extra_rdoc_files: []
41
- files:
42
- - lib/OpenNebula.rb
43
- - lib/OpenNebula/Acl.rb
44
- - lib/OpenNebula/AclPool.rb
45
- - lib/OpenNebula/Cluster.rb
46
- - lib/OpenNebula/ClusterPool.rb
47
- - lib/OpenNebula/Datastore.rb
48
- - lib/OpenNebula/DatastorePool.rb
49
- - lib/OpenNebula/Document.rb
50
- - lib/OpenNebula/DocumentJSON.rb
51
- - lib/OpenNebula/DocumentPool.rb
52
- - lib/OpenNebula/DocumentPoolJSON.rb
53
- - lib/OpenNebula/Group.rb
54
- - lib/OpenNebula/GroupPool.rb
55
- - lib/OpenNebula/Host.rb
56
- - lib/OpenNebula/HostPool.rb
57
- - lib/OpenNebula/Image.rb
58
- - lib/OpenNebula/ImagePool.rb
59
- - lib/OpenNebula/Pool.rb
60
- - lib/OpenNebula/Template.rb
61
- - lib/OpenNebula/TemplatePool.rb
62
- - lib/OpenNebula/User.rb
63
- - lib/OpenNebula/UserPool.rb
64
- - lib/OpenNebula/VirtualMachine.rb
65
- - lib/OpenNebula/VirtualMachinePool.rb
66
- - lib/OpenNebula/VirtualNetwork.rb
67
- - lib/OpenNebula/VirtualNetworkPool.rb
68
- - lib/OpenNebula/XMLUtils.rb
56
+
57
+ files:
58
+ - lib/opennebula.rb
59
+ - lib/opennebula/acl.rb
60
+ - lib/opennebula/acl_pool.rb
61
+ - lib/opennebula/client.rb
62
+ - lib/opennebula/cluster.rb
63
+ - lib/opennebula/cluster_pool.rb
64
+ - lib/opennebula/datastore.rb
65
+ - lib/opennebula/datastore_pool.rb
66
+ - lib/opennebula/document.rb
67
+ - lib/opennebula/document_json.rb
68
+ - lib/opennebula/document_pool.rb
69
+ - lib/opennebula/document_pool_json.rb
70
+ - lib/opennebula/error.rb
71
+ - lib/opennebula/group.rb
72
+ - lib/opennebula/group_pool.rb
73
+ - lib/opennebula/host.rb
74
+ - lib/opennebula/host_pool.rb
75
+ - lib/opennebula/image.rb
76
+ - lib/opennebula/image_pool.rb
77
+ - lib/opennebula/pool.rb
78
+ - lib/opennebula/pool_element.rb
79
+ - lib/opennebula/system.rb
80
+ - lib/opennebula/template.rb
81
+ - lib/opennebula/template_pool.rb
82
+ - lib/opennebula/user.rb
83
+ - lib/opennebula/user_pool.rb
84
+ - lib/opennebula/virtual_machine.rb
85
+ - lib/opennebula/virtual_machine_pool.rb
86
+ - lib/opennebula/virtual_network.rb
87
+ - lib/opennebula/virtual_network_pool.rb
88
+ - lib/opennebula/xml_element.rb
89
+ - lib/opennebula/xml_pool.rb
90
+ - lib/opennebula/xml_utils.rb
91
+ - lib/opennebula/ldap_auth.rb
92
+ - lib/opennebula/ldap_auth_spec.rb
93
+ - lib/opennebula/server_cipher_auth.rb
94
+ - lib/opennebula/server_x509_auth.rb
95
+ - lib/opennebula/ssh_auth.rb
96
+ - lib/opennebula/x509_auth.rb
69
97
  - NOTICE
70
98
  - LICENSE
71
99
  homepage: http://opennebula.org
72
100
  licenses: []
101
+
73
102
  post_install_message:
74
103
  rdoc_options: []
75
- require_paths:
104
+
105
+ require_paths:
76
106
  - lib
77
- required_ruby_version: !ruby/object:Gem::Requirement
107
+ required_ruby_version: !ruby/object:Gem::Requirement
78
108
  none: false
79
- requirements:
80
- - - ! '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- required_rubygems_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ hash: 3
113
+ segments:
114
+ - 0
115
+ version: "0"
116
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
117
  none: false
85
- requirements:
86
- - - ! '>='
87
- - !ruby/object:Gem::Version
88
- version: '0'
118
+ requirements:
119
+ - - ">"
120
+ - !ruby/object:Gem::Version
121
+ hash: 25
122
+ segments:
123
+ - 1
124
+ - 3
125
+ - 1
126
+ version: 1.3.1
89
127
  requirements: []
128
+
90
129
  rubyforge_project:
91
130
  rubygems_version: 1.8.15
92
131
  signing_key:
93
132
  specification_version: 3
94
133
  summary: OpenNebula Client API
95
134
  test_files: []
96
- has_rdoc:
135
+