opennebula-cli 6.0.0.1 → 6.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -77,6 +77,12 @@ class Replicator
77
77
  @l_config_elements = { :raw => @l_config }
78
78
  @l_fed_elements = { :raw => @l_config }
79
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
+
80
86
  fetch_db_config(@l_config_elements)
81
87
  fetch_fed_config(@l_fed_elements)
82
88
 
@@ -129,7 +135,7 @@ class Replicator
129
135
  def fetch_db_config(configs)
130
136
  configs.store(:backend, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/BACKEND'])
131
137
 
132
- if configs[:backend] == 'mysql'
138
+ if configs[:backend] == 'mysql' || configs[:backend] == 'postgresql'
133
139
  configs.store(:server, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/SERVER'])
134
140
  configs.store(:user, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/USER'])
135
141
  configs.store(:password, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PASSWD'])
@@ -137,7 +143,7 @@ class Replicator
137
143
  configs.store(:port, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PORT'])
138
144
  configs[:port] = '3306' if configs[:port] == '0'
139
145
  else
140
- STDERR.puts 'No mysql backend configuration found'
146
+ STDERR.puts 'No mysql or postgresql backend configuration found'
141
147
  exit(-1)
142
148
  end
143
149
  end
@@ -305,7 +311,8 @@ class Replicator
305
311
  'this could take a while'
306
312
 
307
313
  ssh(
308
- "onedb backup -f -u #{@r_config_elements[:user]} " \
314
+ "onedb backup -f -t #{@r_config_elements[:backend]} " \
315
+ "-u #{@r_config_elements[:user]} " \
309
316
  "-p #{@r_config_elements[:password]} " \
310
317
  "-d #{@r_config_elements[:dbname]} " \
311
318
  "-P #{@r_config_elements[:port]} /tmp/one_db_dump.sql"
@@ -320,7 +327,8 @@ class Replicator
320
327
  puts 'Restoring database'
321
328
 
322
329
  run_command(
323
- "onedb restore -f -u #{@l_config_elements[:user]} " \
330
+ "onedb restore -f -t #{@l_config_elements[:backend]}" \
331
+ "-u #{@l_config_elements[:user]} " \
324
332
  "-p #{@l_config_elements[:password]} " \
325
333
  "-d #{@l_config_elements[:dbname]} " \
326
334
  "-P #{@l_config_elements[:port]} " \
@@ -1,5 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <!-- The information sent to the hook when $API is used in an API Hook follos the following schema -->
2
+ <!-- The information sent to the hook when $API is used in an API Hook follow the following schema -->
3
3
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://opennebula.org/XMLSchema" elementFormDefault="qualified" targetNamespace="http://opennebula.org/XMLSchema">
4
4
  <xs:element name="CALL_INFO">
5
5
  <xs:complexType>
@@ -13,7 +13,7 @@
13
13
  <xs:complexType>
14
14
  <xs:sequence>
15
15
  <xs:element name="POSITION" type="xs:integer"/>
16
- <xs:element name="TYPE" type="xs:integer">
16
+ <xs:element name="TYPE" type="xs:string">
17
17
  <xs:simpleType>
18
18
  <xs:restriction base="xs:string">
19
19
  <xs:enumeration value="IN"/>
@@ -6,7 +6,7 @@
6
6
  <xs:sequence>
7
7
  <xs:element name="HOOK_TYPE" type="xs:string" fixed="API"/>
8
8
  <xs:element name="CALL" type="xs:string"/>
9
- <!-- CALL_INFO type is defined in call_info.xsd -->
9
+ <!-- CALL_INFO type is defined in api_info.xsd -->
10
10
  <xs:element ref="CALL_INFO" maxOccurs="unbounded" minOccurs="0"/>
11
11
  </xs:sequence>
12
12
  </xs:complexType>
@@ -16,7 +16,7 @@
16
16
  <xs:element name="STATE" type="xs:string"/>
17
17
  <xs:element name="LCM_STATE" type="xs:string" maxOccurs="1" minOccurs="0"/>
18
18
  <xs:element name="REMOTE_HOST" type="xs:string" maxOccurs="1" minOccurs="0"/>
19
- <!-- The template of the resource (VM or Host) is inlcuded here -->
19
+ <!-- The template of the resource (VM or Host) is included here -->
20
20
  <xs:element ref="HOST" maxOccurs="1" minOccurs="0"/>
21
21
  <xs:element ref="VM" maxOccurs="1" minOccurs="0"/>
22
22
  </xs:sequence>
@@ -10,6 +10,7 @@
10
10
  <xs:element name="UNAME" type="xs:string"/>
11
11
  <xs:element name="GNAME" type="xs:string"/>
12
12
  <xs:element name="NAME" type="xs:string"/>
13
+ <xs:element name="STATE" type="xs:integer"/>
13
14
  <xs:element name="MARKET_MAD" type="xs:string"/>
14
15
  <xs:element name="ZONE_ID" type="xs:string"/>
15
16
  <xs:element name="TOTAL_MB" type="xs:integer"/>
@@ -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">
@@ -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>
@@ -2,7 +2,7 @@
2
2
  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
3
3
  targetNamespace="http://opennebula.org/XMLSchema" xmlns="http://opennebula.org/XMLSchema">
4
4
  <xs:element name="ZONE_POOL">
5
- <xs:element name="ZONE">
5
+ <xs:element name="ZONE" minOccurs="1" maxOccurs="unbounded">
6
6
  <xs:complexType>
7
7
  <xs:sequence>
8
8
  <xs:element name="ID" type="xs:integer"/>
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: 6.0.0.1
4
+ version: 6.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-28 00:00:00.000000000 Z
11
+ date: 2021-07-19 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: 6.0.0.1
19
+ version: 6.0.3
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: 6.0.0.1
26
+ version: 6.0.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -59,11 +59,11 @@ executables:
59
59
  - oneuser
60
60
  - onevcenter
61
61
  - onevdc
62
- - onevm
63
62
  - onevmgroup
64
63
  - onevnet
65
64
  - onevntemplate
66
65
  - onevrouter
66
+ - onevm
67
67
  - onezone
68
68
  extensions: []
69
69
  extra_rdoc_files: []
@@ -93,7 +93,6 @@ 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
97
96
  - share/schemas/xsd/opennebula_configuration.xsd
98
97
  - share/schemas/xsd/raftstatus.xsd
99
98
  - share/schemas/xsd/security_group.xsd
@@ -103,10 +102,8 @@ files:
103
102
  - share/schemas/xsd/user_pool.xsd
104
103
  - share/schemas/xsd/vdc.xsd
105
104
  - share/schemas/xsd/vdc_pool.xsd
106
- - share/schemas/xsd/vm.xsd
107
105
  - share/schemas/xsd/vm_group.xsd
108
106
  - share/schemas/xsd/vm_group_pool.xsd
109
- - share/schemas/xsd/vm_pool.xsd
110
107
  - share/schemas/xsd/vmtemplate.xsd
111
108
  - share/schemas/xsd/vmtemplate_pool.xsd
112
109
  - share/schemas/xsd/vnet.xsd
@@ -115,6 +112,9 @@ files:
115
112
  - share/schemas/xsd/vntemplate_pool.xsd
116
113
  - share/schemas/xsd/vrouter.xsd
117
114
  - share/schemas/xsd/vrouter_pool.xsd
115
+ - share/schemas/xsd/monitoring_data.xsd
116
+ - share/schemas/xsd/vm.xsd
117
+ - share/schemas/xsd/vm_pool.xsd
118
118
  - share/schemas/xsd/zone.xsd
119
119
  - share/schemas/xsd/zone_pool.xsd
120
120
  - bin/oneacct
@@ -135,11 +135,11 @@ files:
135
135
  - bin/oneuser
136
136
  - bin/onevcenter
137
137
  - bin/onevdc
138
- - bin/onevm
139
138
  - bin/onevmgroup
140
139
  - bin/onevnet
141
140
  - bin/onevntemplate
142
141
  - bin/onevrouter
142
+ - bin/onevm
143
143
  - bin/onezone
144
144
  - lib/cli_helper.rb
145
145
  - lib/command_parser.rb
@@ -162,11 +162,11 @@ files:
162
162
  - lib/one_helper/oneuser_helper.rb
163
163
  - lib/one_helper/onevcenter_helper.rb
164
164
  - lib/one_helper/onevdc_helper.rb
165
- - lib/one_helper/onevm_helper.rb
166
165
  - lib/one_helper/onevmgroup_helper.rb
167
166
  - lib/one_helper/onevnet_helper.rb
168
167
  - lib/one_helper/onevntemplate_helper.rb
169
168
  - lib/one_helper/onevrouter_helper.rb
169
+ - lib/one_helper/onevm_helper.rb
170
170
  - lib/one_helper/onezone_helper.rb
171
171
  - NOTICE
172
172
  - LICENSE