opennebula-cli 5.13.80.pre → 6.0.0.2
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 +4 -4
- data/bin/oneacct +13 -2
- data/bin/oneacl +13 -2
- data/bin/onecluster +13 -2
- data/bin/onedatastore +13 -2
- data/bin/oneflow +13 -2
- data/bin/oneflow-template +13 -2
- data/bin/onegroup +13 -2
- data/bin/onehook +17 -6
- data/bin/onehost +15 -4
- data/bin/oneimage +19 -8
- data/bin/onemarket +13 -2
- data/bin/onemarketapp +23 -16
- data/bin/onesecgroup +13 -2
- data/bin/oneshowback +13 -2
- data/bin/onetemplate +28 -8
- data/bin/oneuser +13 -2
- data/bin/onevcenter +22 -6
- data/bin/onevdc +13 -2
- data/bin/onevm +180 -18
- data/bin/onevmgroup +17 -6
- data/bin/onevnet +17 -6
- data/bin/onevntemplate +17 -6
- data/bin/onevrouter +17 -6
- data/bin/onezone +15 -4
- data/lib/cli_helper.rb +13 -2
- data/lib/command_parser.rb +16 -13
- data/lib/one_helper.rb +4 -3
- data/lib/one_helper/oneacct_helper.rb +1 -3
- data/lib/one_helper/onecluster_helper.rb +75 -42
- data/lib/one_helper/oneimage_helper.rb +6 -0
- data/lib/one_helper/onemarketapp_helper.rb +12 -6
- data/lib/one_helper/onevm_helper.rb +20 -0
- data/lib/one_helper/onevnet_helper.rb +173 -151
- data/lib/one_helper/onezone_helper.rb +25 -21
- data/share/schemas/xsd/index.xsd +1 -0
- data/share/schemas/xsd/monitoring_data.xsd +41 -0
- data/share/schemas/xsd/opennebula_configuration.xsd +1 -0
- data/share/schemas/xsd/vnet.xsd +2 -0
- metadata +9 -8
@@ -38,8 +38,6 @@ class Replicator
|
|
38
38
|
:service => 'opennebula' },
|
39
39
|
{ :name => 'monitord.conf',
|
40
40
|
:service => 'opennebula' },
|
41
|
-
{ :name => 'econe.conf',
|
42
|
-
:service => 'opennebula-econe' },
|
43
41
|
{ :name => 'oneflow-server.conf',
|
44
42
|
:service => 'opennebula-flow' },
|
45
43
|
{ :name => 'onegate-server.conf',
|
@@ -57,7 +55,6 @@ class Replicator
|
|
57
55
|
FOLDERS = [
|
58
56
|
{ :name => 'sunstone-views', :service => 'opennebula-sunstone' },
|
59
57
|
{ :name => 'auth', :service => 'opennebula' },
|
60
|
-
{ :name => 'ec2query_templates', :service => 'opennebula' },
|
61
58
|
{ :name => 'hm', :service => 'opennebula' },
|
62
59
|
{ :name => 'sunstone-views', :service => 'opennebula' },
|
63
60
|
{ :name => 'vmm_exec', :service => 'opennebula' }
|
@@ -80,6 +77,12 @@ class Replicator
|
|
80
77
|
@l_config_elements = { :raw => @l_config }
|
81
78
|
@l_fed_elements = { :raw => @l_config }
|
82
79
|
|
80
|
+
if OpenNebula.is_error?(@l_config)
|
81
|
+
STDERR.puts 'Unable to read OpenNebula configuration. ' \
|
82
|
+
'Is OpenNebula running?'
|
83
|
+
exit(-1)
|
84
|
+
end
|
85
|
+
|
83
86
|
fetch_db_config(@l_config_elements)
|
84
87
|
fetch_fed_config(@l_fed_elements)
|
85
88
|
|
@@ -99,14 +102,13 @@ class Replicator
|
|
99
102
|
@opennebula_services = { 'opennebula' => false,
|
100
103
|
'opennebula-sunstone' => false,
|
101
104
|
'opennebula-gate' => false,
|
102
|
-
'opennebula-flow' => false
|
103
|
-
'opennebula-econe' => false }
|
105
|
+
'opennebula-flow' => false }
|
104
106
|
end
|
105
107
|
|
106
108
|
# Process files and folders
|
107
109
|
#
|
108
|
-
# @param
|
109
|
-
def process_files(
|
110
|
+
# @param sync_database [Boolean] True to sync database
|
111
|
+
def process_files(sync_database)
|
110
112
|
# Files to be copied
|
111
113
|
copy_onedconf
|
112
114
|
|
@@ -122,7 +124,7 @@ class Replicator
|
|
122
124
|
restart_services
|
123
125
|
|
124
126
|
# Sync database
|
125
|
-
sync_db
|
127
|
+
sync_db if sync_database
|
126
128
|
end
|
127
129
|
|
128
130
|
private
|
@@ -131,17 +133,17 @@ class Replicator
|
|
131
133
|
#
|
132
134
|
# @param configs [Object] Configuration
|
133
135
|
def fetch_db_config(configs)
|
134
|
-
configs.store(:backend, configs[:raw]['/
|
135
|
-
|
136
|
-
if configs[:backend] == 'mysql'
|
137
|
-
configs.store(:server, configs[:raw]['/
|
138
|
-
configs.store(:user, configs[:raw]['/
|
139
|
-
configs.store(:password, configs[:raw]['/
|
140
|
-
configs.store(:dbname, configs[:raw]['/
|
141
|
-
configs.store(:port, configs[:raw]['/
|
136
|
+
configs.store(:backend, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/BACKEND'])
|
137
|
+
|
138
|
+
if configs[:backend] == 'mysql' || configs[:backend] == 'postgresql'
|
139
|
+
configs.store(:server, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/SERVER'])
|
140
|
+
configs.store(:user, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/USER'])
|
141
|
+
configs.store(:password, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PASSWD'])
|
142
|
+
configs.store(:dbname, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/DB_NAME'])
|
143
|
+
configs.store(:port, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PORT'])
|
142
144
|
configs[:port] = '3306' if configs[:port] == '0'
|
143
145
|
else
|
144
|
-
STDERR.puts 'No mysql backend configuration found'
|
146
|
+
STDERR.puts 'No mysql or postgresql backend configuration found'
|
145
147
|
exit(-1)
|
146
148
|
end
|
147
149
|
end
|
@@ -151,9 +153,9 @@ class Replicator
|
|
151
153
|
# @param configs [Object] Configuration
|
152
154
|
def fetch_fed_config(configs)
|
153
155
|
configs.store(:server_id,
|
154
|
-
configs[:raw]['/
|
156
|
+
configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/SERVER_ID'])
|
155
157
|
configs.store(:zone_id,
|
156
|
-
configs[:raw]['/
|
158
|
+
configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/ZONE_ID'])
|
157
159
|
end
|
158
160
|
|
159
161
|
# Replaces a file with the version located on a remote server
|
@@ -309,7 +311,8 @@ class Replicator
|
|
309
311
|
'this could take a while'
|
310
312
|
|
311
313
|
ssh(
|
312
|
-
"onedb backup -f -
|
314
|
+
"onedb backup -f -t #{@r_config_elements[:backend]} " \
|
315
|
+
"-u #{@r_config_elements[:user]} " \
|
313
316
|
"-p #{@r_config_elements[:password]} " \
|
314
317
|
"-d #{@r_config_elements[:dbname]} " \
|
315
318
|
"-P #{@r_config_elements[:port]} /tmp/one_db_dump.sql"
|
@@ -324,7 +327,8 @@ class Replicator
|
|
324
327
|
puts 'Restoring database'
|
325
328
|
|
326
329
|
run_command(
|
327
|
-
"onedb restore -f -
|
330
|
+
"onedb restore -f -t #{@l_config_elements[:backend]}" \
|
331
|
+
"-u #{@l_config_elements[:user]} " \
|
328
332
|
"-p #{@l_config_elements[:password]} " \
|
329
333
|
"-d #{@l_config_elements[:dbname]} " \
|
330
334
|
"-P #{@l_config_elements[:port]} " \
|
data/share/schemas/xsd/index.xsd
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
<xs:include schemaLocation="marketplaceapp.xsd"/>
|
24
24
|
<xs:include schemaLocation="marketplace_pool.xsd"/>
|
25
25
|
<xs:include schemaLocation="marketplace.xsd"/>
|
26
|
+
<xs:include schemaLocation="monitoring_data.xsd"/>
|
26
27
|
<xs:include schemaLocation="opennebula_configuration.xsd"/>
|
27
28
|
<xs:include schemaLocation="raftstatus.xsd"/>
|
28
29
|
<xs:include schemaLocation="security_group_pool.xsd"/>
|
@@ -0,0 +1,41 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
|
3
|
+
targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
|
4
|
+
<xs:element name="MONITORING_DATA">
|
5
|
+
<xs:complexType>
|
6
|
+
<xs:sequence>
|
7
|
+
<xs:element name="MONITORING" minOccurs="0" maxOccurs="unbounded">
|
8
|
+
<xs:complexType>
|
9
|
+
<xs:all>
|
10
|
+
<xs:element name="CPU" type="xs:decimal" minOccurs="0" maxOccurs="1"/>
|
11
|
+
<xs:element name="DISKRDBYTES" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
12
|
+
<xs:element name="DISKRDIOPS" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
13
|
+
<xs:element name="DISKWRBYTES" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
14
|
+
<xs:element name="DISKWRIOPS" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
15
|
+
<xs:element name="ID" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
16
|
+
<xs:element name="MEMORY" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
17
|
+
<xs:element name="NETTX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
18
|
+
<xs:element name="NETRX" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
19
|
+
<xs:element name="TIMESTAMP" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
20
|
+
<xs:element name="VCENTER_ESX_HOST" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
21
|
+
<xs:element name="VCENTER_GUEST_STATE" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
22
|
+
<xs:element name="VCENTER_RP_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
23
|
+
<xs:element name="VCENTER_VMWARETOOLS_RUNNING_STATUS" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
24
|
+
<xs:element name="VCENTER_VMWARETOOLS_VERSION" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
25
|
+
<xs:element name="VCENTER_VMWARETOOLS_VERSION_STATUS" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
26
|
+
<xs:element name="VCENTER_VM_NAME" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
27
|
+
<xs:element name="DISK_SIZE" minOccurs="0" maxOccurs="unbounded">
|
28
|
+
<xs:complexType>
|
29
|
+
<xs:sequence>
|
30
|
+
<xs:element name="ID" type="xs:integer"/>
|
31
|
+
<xs:element name="SIZE" type="xs:integer"/>
|
32
|
+
</xs:sequence>
|
33
|
+
</xs:complexType>
|
34
|
+
</xs:element>
|
35
|
+
</xs:all>
|
36
|
+
</xs:complexType>
|
37
|
+
</xs:element>
|
38
|
+
</xs:sequence>
|
39
|
+
</xs:complexType>
|
40
|
+
</xs:element>
|
41
|
+
</xs:schema>
|
@@ -270,6 +270,7 @@
|
|
270
270
|
<xs:element name="RPC_LOG" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
271
271
|
<xs:element name="SCRIPTS_REMOTE_DIR" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
272
272
|
<xs:element name="SESSION_EXPIRATION_TIME" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
273
|
+
<xs:element name="SHOWBACK_ONLY_RUNNING" type="xs:string" minOccurs="0" maxOccurs="1"/>
|
273
274
|
<xs:element name="TIMEOUT" type="xs:integer" minOccurs="0" maxOccurs="1"/>
|
274
275
|
|
275
276
|
<xs:element name="TM_MAD" minOccurs="0" maxOccurs="unbounded">
|
data/share/schemas/xsd/vnet.xsd
CHANGED
@@ -103,6 +103,8 @@
|
|
103
103
|
<xs:element name="IP6_GLOBAL_END" type="xs:string" minOccurs="0"/>
|
104
104
|
<xs:element name="IP6" type="xs:string" minOccurs="0"/>
|
105
105
|
<xs:element name="IP6_END" type="xs:string" minOccurs="0"/>
|
106
|
+
<xs:element name="PORT_START" type="xs:string" minOccurs="0"/>
|
107
|
+
<xs:element name="PORT_SIZE" type="xs:string" minOccurs="0"/>
|
106
108
|
<xs:element name="USED_LEASES" type="xs:string"/>
|
107
109
|
<xs:element name="LEASES" minOccurs="0" maxOccurs="1">
|
108
110
|
<xs:complexType>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opennebula-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenNebula
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opennebula
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 6.0.0.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 6.0.0.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,7 +45,6 @@ executables:
|
|
45
45
|
- oneacl
|
46
46
|
- onecluster
|
47
47
|
- onedatastore
|
48
|
-
- oneflow
|
49
48
|
- oneflow-template
|
50
49
|
- onegroup
|
51
50
|
- onehook
|
@@ -64,6 +63,7 @@ executables:
|
|
64
63
|
- onevnet
|
65
64
|
- onevntemplate
|
66
65
|
- onevrouter
|
66
|
+
- oneflow
|
67
67
|
- onezone
|
68
68
|
extensions: []
|
69
69
|
extra_rdoc_files: []
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- share/schemas/xsd/marketplace_pool.xsd
|
94
94
|
- share/schemas/xsd/marketplaceapp.xsd
|
95
95
|
- share/schemas/xsd/marketplaceapp_pool.xsd
|
96
|
+
- share/schemas/xsd/monitoring_data.xsd
|
96
97
|
- share/schemas/xsd/opennebula_configuration.xsd
|
97
98
|
- share/schemas/xsd/raftstatus.xsd
|
98
99
|
- share/schemas/xsd/security_group.xsd
|
@@ -120,7 +121,6 @@ files:
|
|
120
121
|
- bin/oneacl
|
121
122
|
- bin/onecluster
|
122
123
|
- bin/onedatastore
|
123
|
-
- bin/oneflow
|
124
124
|
- bin/oneflow-template
|
125
125
|
- bin/onegroup
|
126
126
|
- bin/onehook
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- bin/onevnet
|
140
140
|
- bin/onevntemplate
|
141
141
|
- bin/onevrouter
|
142
|
+
- bin/oneflow
|
142
143
|
- bin/onezone
|
143
144
|
- lib/cli_helper.rb
|
144
145
|
- lib/command_parser.rb
|
@@ -184,9 +185,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
184
185
|
version: '0'
|
185
186
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
187
|
requirements:
|
187
|
-
- - '
|
188
|
+
- - '>='
|
188
189
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
190
|
+
version: '0'
|
190
191
|
requirements: []
|
191
192
|
rubyforge_project:
|
192
193
|
rubygems_version: 2.0.14.1
|