opennebula-cli 5.13.85.pre → 5.13.90.pre

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 855c80b5cfbc91284d684d4ad8c16b16723280a4
4
- data.tar.gz: 583fd805721234146baa37a38cfb231bda65d77d
3
+ metadata.gz: f6c52bc40b4e949345ed9bac9f2207b555dd156a
4
+ data.tar.gz: d39c984eec1e4d6ec6ba9879d7559624fbf915b4
5
5
  SHA512:
6
- metadata.gz: 0e13faf950b3041e3fe6957f9d007b9ed984cf6ecf201e6148b8ca203f18390dfc78cc01c2208881aef764809cc3ad8c073100c3b5498a44681677f46168e9b9
7
- data.tar.gz: c42cb386febcc3f7a25bebddc11747bd8d7337f7e3cff466ad8d12fa8fd95e77e905ec307e18981d9bbcd0d605a97809b113819070184377d4d5a2ba06c8ce33
6
+ metadata.gz: d16858614526757ef2e1c694205362a7620462f0d6e367500c14623149529a2c82e769488f9acdb69d76a6697389d37b11b298d21b78b12a92c468203205560e
7
+ data.tar.gz: cf91f4ee501d0c3cdad503bedaac907f240ff134c5ab0bc6604c44a35e786e026527a7bceb3af18b4eacef3a15226ed53eeaec7107bca28cb323d7ebd0cd0fb0
data/bin/onevcenter CHANGED
@@ -239,7 +239,7 @@ CommandParser::CmdParser.new(ARGV) do
239
239
  " this input: #{args.first}"
240
240
  end
241
241
 
242
- importer.process_import(indexes) do |object_info|
242
+ importer.process_import(indexes, options) do |object_info|
243
243
  helper.cli_dialogue(object_info)
244
244
  end
245
245
 
@@ -260,10 +260,11 @@ CommandParser::CmdParser.new(ARGV) do
260
260
  importer = VCenterDriver::VcImporter.new_child(helper.client,
261
261
  vi_client,
262
262
  options[:object])
263
+
263
264
  importer.retrieve_resources(helper.parse_opts(options))
264
265
  indexes = importer.get_indexes(args.first)
265
266
 
266
- importer.process_import(indexes)
267
+ importer.process_import(indexes, options)
267
268
 
268
269
  importer.stdout
269
270
  rescue StandardError => e
data/bin/onezone CHANGED
@@ -57,7 +57,7 @@ CommandParser::CmdParser.new(ARGV) do
57
57
  }
58
58
 
59
59
  DATABASE = {
60
- :name => 'database',
60
+ :name => 'db',
61
61
  :large => '--db',
62
62
  :description => 'Also sync database'
63
63
  }
data/lib/cli_helper.rb CHANGED
@@ -211,6 +211,17 @@ module CLIHelper
211
211
  end
212
212
  end
213
213
 
214
+ # Get text in green colour
215
+ #
216
+ # @param text [String] String to print
217
+ def self.green(text)
218
+ if $stdout.tty?
219
+ ANSI_GREEN + text + ANSI_RESET
220
+ else
221
+ text
222
+ end
223
+ end
224
+
214
225
  # Print header
215
226
  #
216
227
  # @param str [String] String with header content
@@ -101,8 +101,8 @@ class Replicator
101
101
 
102
102
  # Process files and folders
103
103
  #
104
- # @param sync_db [Boolean] True to sync database
105
- def process_files(sync_db)
104
+ # @param sync_database [Boolean] True to sync database
105
+ def process_files(sync_database)
106
106
  # Files to be copied
107
107
  copy_onedconf
108
108
 
@@ -118,7 +118,7 @@ class Replicator
118
118
  restart_services
119
119
 
120
120
  # Sync database
121
- sync_db
121
+ sync_db if sync_database
122
122
  end
123
123
 
124
124
  private
@@ -127,14 +127,14 @@ class Replicator
127
127
  #
128
128
  # @param configs [Object] Configuration
129
129
  def fetch_db_config(configs)
130
- configs.store(:backend, configs[:raw]['/TEMPLATE/DB/BACKEND'])
130
+ configs.store(:backend, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/BACKEND'])
131
131
 
132
132
  if configs[:backend] == 'mysql'
133
- configs.store(:server, configs[:raw]['/TEMPLATE/DB/SERVER'])
134
- configs.store(:user, configs[:raw]['/TEMPLATE/DB/USER'])
135
- configs.store(:password, configs[:raw]['/TEMPLATE/DB/PASSWD'])
136
- configs.store(:dbname, configs[:raw]['/TEMPLATE/DB/DB_NAME'])
137
- configs.store(:port, configs[:raw]['/TEMPLATE/DB/PORT'])
133
+ configs.store(:server, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/SERVER'])
134
+ configs.store(:user, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/USER'])
135
+ configs.store(:password, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PASSWD'])
136
+ configs.store(:dbname, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/DB_NAME'])
137
+ configs.store(:port, configs[:raw]['/OPENNEBULA_CONFIGURATION/DB/PORT'])
138
138
  configs[:port] = '3306' if configs[:port] == '0'
139
139
  else
140
140
  STDERR.puts 'No mysql backend configuration found'
@@ -147,9 +147,9 @@ class Replicator
147
147
  # @param configs [Object] Configuration
148
148
  def fetch_fed_config(configs)
149
149
  configs.store(:server_id,
150
- configs[:raw]['/TEMPLATE/FEDERATION/SERVER_ID'])
150
+ configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/SERVER_ID'])
151
151
  configs.store(:zone_id,
152
- configs[:raw]['/TEMPLATE/FEDERATION/ZONE_ID'])
152
+ configs[:raw]['/OPENNEBULA_CONFIGURATION/FEDERATION/ZONE_ID'])
153
153
  end
154
154
 
155
155
  # Replaces a file with the version located on a remote server
@@ -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>
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: 5.13.85.pre
4
+ version: 5.13.90.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenNebula
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-15 00:00:00.000000000 Z
11
+ date: 2021-03-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: 5.13.85.pre
19
+ version: 5.13.90.pre
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: 5.13.85.pre
26
+ version: 5.13.90.pre
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -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