opennebula 6.3.80.pre → 6.3.85.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ActionManager.rb +1 -1
- data/lib/CommandManager.rb +1 -1
- data/lib/DriverExecHelper.rb +1 -1
- data/lib/OpenNebulaDriver.rb +1 -1
- data/lib/VirtualMachineDriver.rb +1 -1
- data/lib/cloud/CloudClient.rb +3 -3
- data/lib/datacenter.rb +1 -1
- data/lib/datastore.rb +1 -1
- data/lib/distributed_firewall.rb +1 -1
- data/lib/file_helper.rb +1 -1
- data/lib/host.rb +1 -1
- data/lib/logical_port.rb +1 -1
- data/lib/logical_switch.rb +1 -1
- data/lib/memoize.rb +1 -1
- data/lib/models/role.rb +1 -1
- data/lib/models/service.rb +98 -56
- data/lib/models.rb +1 -1
- data/lib/network.rb +1 -1
- data/lib/nsx_client.rb +1 -1
- data/lib/nsx_component.rb +1 -1
- data/lib/nsx_constants.rb +1 -1
- data/lib/nsx_driver.rb +1 -1
- data/lib/nsx_error.rb +1 -1
- data/lib/nsx_rule.rb +1 -1
- data/lib/nsxt_client.rb +1 -1
- data/lib/nsxt_dfw.rb +1 -1
- data/lib/nsxt_logical_port.rb +1 -1
- data/lib/nsxt_rule.rb +1 -1
- data/lib/nsxt_tz.rb +1 -1
- data/lib/nsxv_client.rb +1 -1
- data/lib/nsxv_dfw.rb +1 -1
- data/lib/nsxv_logical_port.rb +1 -1
- data/lib/nsxv_rule.rb +1 -1
- data/lib/nsxv_tz.rb +1 -1
- data/lib/opaque_network.rb +1 -1
- 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 +1 -1
- data/lib/opennebula/document_json.rb +1 -1
- data/lib/opennebula/document_pool.rb +1 -1
- data/lib/opennebula/document_pool_json.rb +1 -1
- data/lib/opennebula/error.rb +1 -1
- data/lib/opennebula/flow/grammar.rb +1 -1
- data/lib/opennebula/flow/service_pool.rb +1 -1
- data/lib/opennebula/flow/service_template.rb +1 -1
- data/lib/opennebula/flow/service_template_ext.rb +1 -1
- data/lib/opennebula/flow/service_template_pool.rb +1 -1
- data/lib/opennebula/flow/validator.rb +1 -1
- data/lib/opennebula/flow.rb +1 -1
- data/lib/opennebula/group.rb +1 -1
- data/lib/opennebula/group_pool.rb +1 -1
- data/lib/opennebula/hook.rb +1 -1
- 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 +1 -1
- 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 +1 -1
- data/lib/opennebula/marketplace.rb +1 -1
- data/lib/opennebula/marketplace_pool.rb +1 -1
- data/lib/opennebula/marketplaceapp.rb +1 -1
- data/lib/opennebula/marketplaceapp_ext.rb +26 -10
- data/lib/opennebula/marketplaceapp_pool.rb +1 -1
- data/lib/opennebula/oneflow_client.rb +41 -25
- data/lib/opennebula/pool.rb +1 -1
- 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 +1 -1
- data/lib/opennebula/template_ext.rb +1 -1
- data/lib/opennebula/template_pool.rb +1 -1
- data/lib/opennebula/user.rb +1 -1
- 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 +5 -1
- data/lib/opennebula/virtual_machine_ext.rb +1 -1
- data/lib/opennebula/virtual_machine_pool.rb +1 -1
- data/lib/opennebula/virtual_network.rb +39 -2
- data/lib/opennebula/virtual_network_pool.rb +1 -1
- data/lib/opennebula/virtual_router.rb +1 -1
- data/lib/opennebula/virtual_router_pool.rb +1 -1
- data/lib/opennebula/vm_group.rb +1 -1
- data/lib/opennebula/vm_group_pool.rb +1 -1
- data/lib/opennebula/vntemplate.rb +1 -1
- data/lib/opennebula/vntemplate_pool.rb +1 -1
- data/lib/opennebula/wait_ext.rb +1 -1
- 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 +2 -2
- data/lib/rest_client.rb +1 -1
- data/lib/scripts_common.rb +1 -1
- data/lib/transport_zone.rb +1 -1
- data/lib/vcenter_driver.rb +1 -1
- data/lib/vcenter_importer.rb +1 -12
- data/lib/vi_client.rb +1 -1
- data/lib/vi_helper.rb +1 -1
- data/lib/virtual_machine.rb +2 -2
- data/lib/virtual_wire.rb +1 -1
- data/lib/vm_disk.rb +1 -1
- data/lib/vm_folder.rb +1 -1
- data/lib/vm_helper.rb +1 -1
- data/lib/vm_monitor.rb +1 -1
- data/lib/vm_nic.rb +1 -1
- data/lib/vm_template.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9037eadf643ff9e3cb8745aea4cbfe59d88fec16905216f170123da1670cda30
|
4
|
+
data.tar.gz: 6171ac7fbd6f35e063204eb4a7c35ae4ec5afb0e548d2558623a7095f9a008cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30d60c2a1447a38a642d4bb93792df47ce39c520a7255fbaa2fd49a445885cc0cd4b28662f9cf45e8d730a3cc7f16db1901489662149a1121c623df35250b5ea
|
7
|
+
data.tar.gz: 5de0e5c492f708e3e56869c6e8b3aea9cfa05c78a5945f84a32884d0a9be5f347e3d35d3b08289c26084a245aa758071a07bf7231e8ef71c7806a97d9e3dbdad
|
data/lib/ActionManager.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- */
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may */
|
4
4
|
# not use this file except in compliance with the License. You may obtain */
|
5
5
|
# a copy of the License at */
|
data/lib/CommandManager.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# --------------------------------------------------------------------------
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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
|
data/lib/DriverExecHelper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# rubocop:disable Naming/FileName
|
2
2
|
# -------------------------------------------------------------------------- #
|
3
|
-
# Copyright 2002-
|
3
|
+
# Copyright 2002-2022, OpenNebula Project, OpenNebula Systems #
|
4
4
|
# #
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
6
6
|
# not use this file except in compliance with the License. You may obtain #
|
data/lib/OpenNebulaDriver.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/VirtualMachineDriver.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/cloud/CloudClient.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
@@ -51,7 +51,7 @@ end
|
|
51
51
|
module CloudClient
|
52
52
|
|
53
53
|
# OpenNebula version
|
54
|
-
VERSION = '6.3.
|
54
|
+
VERSION = '6.3.85'
|
55
55
|
|
56
56
|
# #########################################################################
|
57
57
|
# Default location for the authentication file
|
@@ -229,7 +229,7 @@ module CloudCLI
|
|
229
229
|
def version_text
|
230
230
|
version=<<EOT
|
231
231
|
OpenNebula #{CloudClient::VERSION}
|
232
|
-
Copyright 2002-
|
232
|
+
Copyright 2002-2022, OpenNebula Project, OpenNebula Systems
|
233
233
|
|
234
234
|
Licensed under the Apache License, Version 2.0 (the "License"); you may
|
235
235
|
not use this file except in compliance with the License. You may obtain
|
data/lib/datacenter.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/datastore.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/distributed_firewall.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/file_helper.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/host.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/logical_port.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/logical_switch.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/memoize.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/models/role.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/models/service.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
@@ -24,17 +24,21 @@ module OpenNebula
|
|
24
24
|
DOCUMENT_TYPE = 100
|
25
25
|
|
26
26
|
STATE = {
|
27
|
-
'PENDING'
|
28
|
-
'DEPLOYING'
|
29
|
-
'RUNNING'
|
30
|
-
'UNDEPLOYING'
|
31
|
-
'WARNING'
|
32
|
-
'DONE'
|
33
|
-
'FAILED_UNDEPLOYING'
|
34
|
-
'FAILED_DEPLOYING'
|
35
|
-
'SCALING'
|
36
|
-
'FAILED_SCALING'
|
37
|
-
'COOLDOWN'
|
27
|
+
'PENDING' => 0,
|
28
|
+
'DEPLOYING' => 1,
|
29
|
+
'RUNNING' => 2,
|
30
|
+
'UNDEPLOYING' => 3,
|
31
|
+
'WARNING' => 4,
|
32
|
+
'DONE' => 5,
|
33
|
+
'FAILED_UNDEPLOYING' => 6,
|
34
|
+
'FAILED_DEPLOYING' => 7,
|
35
|
+
'SCALING' => 8,
|
36
|
+
'FAILED_SCALING' => 9,
|
37
|
+
'COOLDOWN' => 10,
|
38
|
+
'DEPLOYING_NETS' => 11,
|
39
|
+
'UNDEPLOYING_NETS' => 12,
|
40
|
+
'FAILED_DEPLOYING_NETS' => 13,
|
41
|
+
'FAILED_UNDEPLOYING_NETS' => 14
|
38
42
|
}
|
39
43
|
|
40
44
|
STATE_STR = %w[
|
@@ -49,6 +53,10 @@ module OpenNebula
|
|
49
53
|
SCALING
|
50
54
|
FAILED_SCALING
|
51
55
|
COOLDOWN
|
56
|
+
DEPLOYING_NETS
|
57
|
+
UNDEPLOYING_NETS
|
58
|
+
FAILED_DEPLOYING_NETS
|
59
|
+
FAILED_UNDEPLOYING_NETS
|
52
60
|
]
|
53
61
|
|
54
62
|
TRANSIENT_STATES = %w[
|
@@ -56,12 +64,16 @@ module OpenNebula
|
|
56
64
|
UNDEPLOYING
|
57
65
|
SCALING
|
58
66
|
COOLDOWN
|
67
|
+
DEPLOYING_NETS
|
68
|
+
UNDEPLOYING_NETS
|
59
69
|
]
|
60
70
|
|
61
71
|
FAILED_STATES = %w[
|
62
72
|
FAILED_DEPLOYING
|
63
73
|
FAILED_UNDEPLOYING
|
64
74
|
FAILED_SCALING
|
75
|
+
FAILED_DEPLOYING_NETS
|
76
|
+
FAILED_UNDEPLOYING_NETS
|
65
77
|
]
|
66
78
|
|
67
79
|
RECOVER_DEPLOY_STATES = %w[
|
@@ -73,6 +85,7 @@ module OpenNebula
|
|
73
85
|
RECOVER_UNDEPLOY_STATES = %w[
|
74
86
|
FAILED_UNDEPLOYING
|
75
87
|
UNDEPLOYING
|
88
|
+
FAILED_UNDEPLOYING_NETS
|
76
89
|
]
|
77
90
|
|
78
91
|
RECOVER_SCALE_STATES = %w[
|
@@ -80,6 +93,13 @@ module OpenNebula
|
|
80
93
|
SCALING
|
81
94
|
]
|
82
95
|
|
96
|
+
RECOVER_DEPLOY_NETS_STATES = %w[DEPLOYING_NETS FAILED_DEPLOYING_NETS]
|
97
|
+
|
98
|
+
RECOVER_UNDEPLOY_NETS_STATES = %w[
|
99
|
+
UNDEPLOYING_NETS
|
100
|
+
FAILED_UNDEPLOYING_NETS
|
101
|
+
]
|
102
|
+
|
83
103
|
# List of attributes that can't be changed in update operation
|
84
104
|
#
|
85
105
|
# custom_attrs: it only has sense when deploying, not in running
|
@@ -168,6 +188,14 @@ module OpenNebula
|
|
168
188
|
RECOVER_SCALE_STATES.include? STATE_STR[state]
|
169
189
|
end
|
170
190
|
|
191
|
+
def can_recover_deploy_nets?
|
192
|
+
RECOVER_DEPLOY_NETS_STATES.include?(STATE_STR[state])
|
193
|
+
end
|
194
|
+
|
195
|
+
def can_recover_undeploy_nets?
|
196
|
+
RECOVER_UNDEPLOY_NETS_STATES.include?(STATE_STR[state])
|
197
|
+
end
|
198
|
+
|
171
199
|
# Return true if the service is running
|
172
200
|
# @return true if the service is runnning, false otherwise
|
173
201
|
def running?
|
@@ -237,6 +265,24 @@ module OpenNebula
|
|
237
265
|
true
|
238
266
|
end
|
239
267
|
|
268
|
+
# Returns virtual networks IDs
|
269
|
+
# @return [Array] Array of integers containing the IDs
|
270
|
+
def networks(deploy)
|
271
|
+
ret = []
|
272
|
+
|
273
|
+
return ret unless @body['networks_values']
|
274
|
+
|
275
|
+
@body['networks_values'].each do |vnet|
|
276
|
+
vnet.each do |_, net|
|
277
|
+
next if net.keys.first == 'id' && !deploy
|
278
|
+
|
279
|
+
ret << net['id'].to_i
|
280
|
+
end
|
281
|
+
end
|
282
|
+
|
283
|
+
ret
|
284
|
+
end
|
285
|
+
|
240
286
|
# Create a new service based on the template provided
|
241
287
|
# @param [String] template_json
|
242
288
|
# @return [nil, OpenNebula::Error] nil in case of success, Error
|
@@ -570,17 +616,22 @@ module OpenNebula
|
|
570
616
|
|
571
617
|
return if body['networks_values'].nil?
|
572
618
|
|
573
|
-
body['networks_values'].each do |
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
619
|
+
body['networks_values'].each do |vnet|
|
620
|
+
vnet.each do |name, net|
|
621
|
+
key = net.keys.first
|
622
|
+
|
623
|
+
case key
|
624
|
+
when 'id'
|
625
|
+
next
|
626
|
+
when 'template_id'
|
627
|
+
rc = create_vnet(name, net)
|
628
|
+
when 'reserve_from'
|
629
|
+
rc = reserve(name, net)
|
630
|
+
end
|
579
631
|
|
580
|
-
|
632
|
+
return rc if OpenNebula.is_error?(rc)
|
581
633
|
|
582
|
-
|
583
|
-
return rc
|
634
|
+
net['id'] = rc
|
584
635
|
end
|
585
636
|
end if deploy
|
586
637
|
|
@@ -593,22 +644,25 @@ module OpenNebula
|
|
593
644
|
end
|
594
645
|
|
595
646
|
def delete_networks
|
596
|
-
vnets
|
647
|
+
vnets = @body['networks_values']
|
597
648
|
vnets_failed = []
|
598
649
|
|
599
650
|
return if vnets.nil?
|
600
651
|
|
601
652
|
vnets.each do |vnet|
|
602
|
-
|
603
|
-
|
653
|
+
vnet.each do |_, net|
|
654
|
+
key = net.keys.first
|
604
655
|
|
605
|
-
|
656
|
+
next unless %w[template_id reserve_from].include?(key)
|
606
657
|
|
607
|
-
|
608
|
-
|
658
|
+
rc = OpenNebula::VirtualNetwork.new_with_id(
|
659
|
+
net['id'],
|
660
|
+
@client
|
661
|
+
).delete
|
609
662
|
|
610
|
-
|
611
|
-
|
663
|
+
next unless OpenNebula.is_error?(rc)
|
664
|
+
|
665
|
+
vnets_failed << net['id']
|
612
666
|
end
|
613
667
|
end
|
614
668
|
|
@@ -677,44 +731,32 @@ module OpenNebula
|
|
677
731
|
@body['log'] = @body['log'].last(MAX_LOG)
|
678
732
|
end
|
679
733
|
|
680
|
-
def create_vnet(net)
|
734
|
+
def create_vnet(name, net)
|
681
735
|
extra = ''
|
736
|
+
extra = net['extra'] if net.key? 'extra'
|
682
737
|
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
.to_i, @client).instantiate(get_vnet_name(net), extra)
|
688
|
-
|
689
|
-
# TODO, check which error should be returned
|
690
|
-
return vntmpl_id if OpenNebula.is_error?(vntmpl_id)
|
691
|
-
|
692
|
-
net[net.keys[0]]['id'] = vntmpl_id
|
693
|
-
|
694
|
-
true
|
738
|
+
OpenNebula::VNTemplate.new_with_id(
|
739
|
+
net['template_id'].to_i,
|
740
|
+
@client
|
741
|
+
).instantiate(get_vnet_name(name), extra)
|
695
742
|
end
|
696
743
|
|
697
|
-
def reserve(net)
|
698
|
-
|
699
|
-
extra = net[
|
744
|
+
def reserve(name, net)
|
745
|
+
extra = ''
|
746
|
+
extra = net['extra'] if net.key? 'extra'
|
700
747
|
|
701
748
|
return false if !extra || extra.empty?
|
702
749
|
|
703
|
-
extra.concat("\nNAME=\"#{get_vnet_name(
|
704
|
-
|
705
|
-
reserve_id = OpenNebula::VirtualNetwork
|
706
|
-
.new_with_id(net[net.keys[0]]['reserve_from']
|
707
|
-
.to_i, @client).reserve_with_extra(extra)
|
750
|
+
extra.concat("\nNAME=\"#{get_vnet_name(name)}\"\n")
|
708
751
|
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
true
|
752
|
+
OpenNebula::VirtualNetwork.new_with_id(
|
753
|
+
net['reserve_from'].to_i,
|
754
|
+
@client
|
755
|
+
).reserve_with_extra(extra)
|
714
756
|
end
|
715
757
|
|
716
758
|
def get_vnet_name(net)
|
717
|
-
"#{net
|
759
|
+
"#{net}-#{id}"
|
718
760
|
end
|
719
761
|
|
720
762
|
def resolve_attributes(template)
|
data/lib/models.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/network.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_component.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_constants.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_driver.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# ---------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_error.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsx_rule.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxt_client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxt_dfw.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxt_logical_port.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxt_rule.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxt_tz.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxv_client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxv_dfw.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxv_logical_port.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxv_rule.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/nsxv_tz.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opaque_network.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opennebula/acl.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opennebula/acl_pool.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opennebula/client.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opennebula/cluster.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
data/lib/opennebula/datastore.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# -------------------------------------------------------------------------- #
|
2
|
-
# Copyright 2002-
|
2
|
+
# Copyright 2002-2022, 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 #
|