opennebula 5.12.13 → 5.13.80.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/ActionManager.rb +1 -1
- data/lib/CommandManager.rb +1 -1
- data/lib/DriverExecHelper.rb +44 -28
- data/lib/OpenNebulaDriver.rb +8 -4
- data/lib/VirtualMachineDriver.rb +9 -2
- data/lib/cloud/CloudClient.rb +3 -3
- data/lib/datacenter.rb +1258 -0
- data/lib/datastore.rb +1025 -0
- data/lib/distributed_firewall.rb +280 -0
- data/lib/file_helper.rb +370 -0
- data/lib/host.rb +1517 -0
- data/lib/logical_port.rb +50 -0
- data/lib/logical_switch.rb +77 -0
- data/lib/memoize.rb +74 -0
- data/lib/models/role.rb +39 -8
- data/lib/models/service.rb +92 -31
- data/lib/models.rb +5 -5
- data/lib/network.rb +635 -0
- data/lib/nsx_client.rb +144 -0
- data/lib/nsx_component.rb +28 -0
- data/lib/nsx_constants.rb +149 -0
- data/lib/nsx_driver.rb +78 -0
- data/lib/nsx_error.rb +77 -0
- data/lib/nsx_rule.rb +193 -0
- data/lib/nsxt_client.rb +176 -0
- data/lib/nsxt_dfw.rb +196 -0
- data/lib/nsxt_logical_port.rb +94 -0
- data/lib/nsxt_rule.rb +188 -0
- data/lib/nsxt_tz.rb +38 -0
- data/lib/nsxv_client.rb +176 -0
- data/lib/nsxv_dfw.rb +202 -0
- data/lib/nsxv_logical_port.rb +107 -0
- data/lib/nsxv_rule.rb +172 -0
- data/lib/nsxv_tz.rb +41 -0
- data/lib/opaque_network.rb +134 -0
- data/lib/opennebula/acl.rb +1 -1
- data/lib/opennebula/acl_pool.rb +1 -1
- data/lib/opennebula/client.rb +1 -1
- data/lib/opennebula/cluster.rb +1 -1
- data/lib/opennebula/cluster_pool.rb +1 -1
- data/lib/opennebula/datastore.rb +1 -1
- data/lib/opennebula/datastore_pool.rb +1 -1
- data/lib/opennebula/document.rb +8 -29
- data/lib/opennebula/document_json.rb +42 -12
- data/lib/opennebula/document_pool.rb +1 -1
- data/lib/opennebula/document_pool_json.rb +1 -1
- data/lib/opennebula/error.rb +4 -1
- data/lib/opennebula/flow/grammar.rb +1195 -0
- data/lib/{models → opennebula/flow}/service_pool.rb +26 -2
- data/lib/{models → opennebula/flow}/service_template.rb +86 -17
- data/lib/opennebula/flow/service_template_ext.rb +84 -0
- data/lib/{models → opennebula/flow}/service_template_pool.rb +1 -1
- data/lib/opennebula/flow/validator.rb +499 -0
- data/lib/opennebula/flow.rb +23 -0
- data/lib/opennebula/group.rb +1 -1
- data/lib/opennebula/group_pool.rb +1 -1
- data/lib/opennebula/hook.rb +5 -12
- data/lib/opennebula/hook_log.rb +1 -1
- data/lib/opennebula/hook_pool.rb +1 -1
- data/lib/opennebula/host.rb +1 -1
- data/lib/opennebula/host_pool.rb +1 -1
- data/lib/opennebula/image.rb +17 -14
- data/lib/opennebula/image_pool.rb +1 -1
- data/lib/opennebula/ldap_auth.rb +1 -1
- data/lib/opennebula/ldap_auth_spec.rb +1 -1
- data/lib/opennebula/lockable_ext.rb +163 -0
- data/lib/opennebula/marketplace.rb +1 -1
- data/lib/opennebula/marketplace_pool.rb +1 -1
- data/lib/opennebula/marketplaceapp.rb +9 -119
- data/lib/opennebula/marketplaceapp_ext.rb +522 -0
- data/lib/opennebula/marketplaceapp_pool.rb +1 -1
- data/lib/opennebula/oneflow_client.rb +4 -3
- data/lib/opennebula/pool.rb +4 -3
- data/lib/opennebula/pool_element.rb +1 -1
- data/lib/opennebula/security_group.rb +1 -1
- data/lib/opennebula/security_group_pool.rb +1 -1
- data/lib/opennebula/server_cipher_auth.rb +1 -1
- data/lib/opennebula/server_x509_auth.rb +1 -1
- data/lib/opennebula/ssh_auth.rb +1 -1
- data/lib/opennebula/system.rb +1 -1
- data/lib/opennebula/template.rb +4 -13
- data/lib/opennebula/template_ext.rb +325 -0
- data/lib/opennebula/template_pool.rb +1 -1
- data/lib/opennebula/user.rb +26 -2
- data/lib/opennebula/user_pool.rb +1 -1
- data/lib/opennebula/utils.rb +1 -1
- data/lib/opennebula/vdc.rb +1 -1
- data/lib/opennebula/vdc_pool.rb +1 -1
- data/lib/opennebula/virtual_machine.rb +25 -207
- data/lib/opennebula/virtual_machine_ext.rb +469 -0
- data/lib/opennebula/virtual_machine_pool.rb +1 -5
- data/lib/opennebula/virtual_network.rb +4 -10
- data/lib/opennebula/virtual_network_pool.rb +1 -1
- data/lib/opennebula/virtual_router.rb +4 -12
- data/lib/opennebula/virtual_router_pool.rb +1 -1
- data/lib/opennebula/vm_group.rb +4 -11
- data/lib/opennebula/vm_group_pool.rb +1 -1
- data/lib/opennebula/vntemplate.rb +4 -13
- data/lib/opennebula/vntemplate_pool.rb +1 -1
- data/lib/opennebula/wait_ext.rb +222 -0
- data/lib/opennebula/x509_auth.rb +1 -1
- data/lib/opennebula/xml_element.rb +1 -1
- data/lib/opennebula/xml_pool.rb +1 -1
- data/lib/opennebula/xml_utils.rb +1 -1
- data/lib/opennebula/zone.rb +1 -1
- data/lib/opennebula/zone_pool.rb +1 -1
- data/lib/opennebula.rb +5 -2
- data/lib/rest_client.rb +201 -0
- data/lib/scripts_common.rb +180 -0
- data/lib/transport_zone.rb +43 -0
- data/lib/vcenter_driver.rb +9 -22
- data/lib/vcenter_importer.rb +616 -0
- data/lib/vi_client.rb +281 -0
- data/lib/vi_helper.rb +312 -0
- data/lib/virtual_machine.rb +3477 -0
- data/lib/virtual_wire.rb +158 -0
- data/lib/vm_device.rb +80 -0
- data/lib/vm_disk.rb +202 -0
- data/lib/vm_folder.rb +69 -0
- data/lib/vm_helper.rb +30 -0
- data/lib/vm_monitor.rb +303 -0
- data/lib/vm_nic.rb +70 -0
- data/lib/vm_template.rb +1961 -0
- data/lib/vmm_importer.rb +121 -0
- metadata +101 -35
@@ -0,0 +1,43 @@
|
|
1
|
+
# -------------------------------------------------------------------------- #
|
2
|
+
# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
|
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
|
+
module NSXDriver
|
17
|
+
|
18
|
+
# Class Transport Zone
|
19
|
+
class TransportZone < NSXComponent
|
20
|
+
|
21
|
+
# ATTRIBUTES
|
22
|
+
attr_reader :tz_id
|
23
|
+
|
24
|
+
def self.new_child(nsx_client)
|
25
|
+
case nsx_client.nsx_type.upcase
|
26
|
+
when NSXConstants::NSXT
|
27
|
+
NSXTtz.new(nsx_client)
|
28
|
+
when NSXConstants::NSXV
|
29
|
+
NSXVtz.new(nsx_client)
|
30
|
+
else
|
31
|
+
error_msg = "Unknown NSX type: #{nsx_client.nsx_type}"
|
32
|
+
error = NSXError::UnknownObject.new(error_msg)
|
33
|
+
raise error
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
# METHODS
|
38
|
+
# Return the transport zones list
|
39
|
+
def tzs; end
|
40
|
+
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
data/lib/vcenter_driver.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ---------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2021, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# #
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
5
5
|
# not use this file except in compliance with the License. You may obtain #
|
@@ -36,25 +36,14 @@ end
|
|
36
36
|
|
37
37
|
ENV['LANG'] = 'C'
|
38
38
|
|
39
|
-
# %%RUBYGEMS_SETUP_BEGIN%%
|
40
39
|
if File.directory?(GEMS_LOCATION)
|
41
40
|
real_gems_path = File.realpath(GEMS_LOCATION)
|
42
41
|
if !defined?(Gem) || Gem.path != [real_gems_path]
|
43
42
|
$LOAD_PATH.reject! {|l| l =~ /vendor_ruby/ }
|
44
|
-
|
45
|
-
|
46
|
-
# https://github.com/OpenNebula/one/issues/5379
|
47
|
-
begin
|
48
|
-
verb = $VERBOSE
|
49
|
-
$VERBOSE = nil
|
50
|
-
require 'rubygems'
|
51
|
-
Gem.use_paths(real_gems_path)
|
52
|
-
ensure
|
53
|
-
$VERBOSE = verb
|
54
|
-
end
|
43
|
+
require 'rubygems'
|
44
|
+
Gem.use_paths(real_gems_path)
|
55
45
|
end
|
56
46
|
end
|
57
|
-
# %%RUBYGEMS_SETUP_END%%
|
58
47
|
|
59
48
|
$LOAD_PATH << LIB_LOCATION + '/ruby/vendors/rbvmomi/lib'
|
60
49
|
$LOAD_PATH << LIB_LOCATION + '/ruby'
|
@@ -72,15 +61,15 @@ class VCenterConf < Hash
|
|
72
61
|
}
|
73
62
|
|
74
63
|
def initialize
|
75
|
-
super
|
76
64
|
replace(DEFAULT_CONFIGURATION)
|
77
65
|
begin
|
78
66
|
vcenterrc_path = "#{VAR_LOCATION}/remotes/etc/vmm/vcenter/vcenterrc"
|
79
67
|
merge!(YAML.load_file(vcenterrc_path))
|
80
68
|
rescue StandardError => e
|
81
|
-
STDERR.puts
|
82
|
-
Reason #{e.message}.")
|
69
|
+
STDERR.puts "Couldn't load vcenterrc. Reason #{e.message}."
|
83
70
|
end
|
71
|
+
|
72
|
+
super
|
84
73
|
end
|
85
74
|
|
86
75
|
end
|
@@ -151,11 +140,9 @@ end
|
|
151
140
|
|
152
141
|
def check_item(item, target_class)
|
153
142
|
item.name if CHECK_REFS
|
154
|
-
if target_class
|
155
|
-
|
156
|
-
|
157
|
-
"Got '#{item.class} instead."
|
158
|
-
end
|
143
|
+
if target_class && !item.instance_of?(target_class)
|
144
|
+
raise "Expecting type 'RbVmomi::VIM::#{target_class}'. " \
|
145
|
+
"Got '#{item.class} instead."
|
159
146
|
end
|
160
147
|
rescue RbVmomi::Fault => e
|
161
148
|
raise "Reference \"#{item._ref}\" error [#{e.message}]. \
|