1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-20 10:50:08 +03:00

B OpenNebula/one#6630: Fix host.xsd (#3143) (#3321)

This commit is contained in:
Pavel Czerný 2024-12-09 20:29:14 +01:00 committed by GitHub
parent 4de78ab903
commit acecc3058d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 16 additions and 29 deletions

View File

@ -42,11 +42,8 @@
<xs:element name="VMS_THREAD" type="xs:integer"/>
<xs:element name="DATASTORES">
<xs:complexType>
<xs:all>
<xs:sequence>
<xs:element name="DISK_USAGE" type="xs:integer"/>
<xs:element name="FREE_DISK" type="xs:integer"/>
<xs:element name="MAX_DISK" type="xs:integer"/>
<xs:element name="USED_DISK" type="xs:integer"/>
<xs:element name="DS" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
@ -60,7 +57,10 @@
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:all>
<xs:element name="FREE_DISK" type="xs:integer"/>
<xs:element name="MAX_DISK" type="xs:integer"/>
<xs:element name="USED_DISK" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PCI_DEVICES">

View File

@ -507,6 +507,10 @@ AllCops:
- src/oca/ruby/opennebula/flow/grammar.rb
- src/oca/ruby/opennebula/flow/validator.rb
- src/sunstone/OpenNebulaVMRC.rb
- src/oneprovision/lib/provision/provision_config.rb
- src/vmm_mad/remotes/lib/vcenter_driver/datastore.rb
- src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
- src/vmm_mad/remotes/lib/vcenter_driver/virtual_machine.rb
NewCops: enable
########

View File

@ -68,9 +68,7 @@ module DriverExecHelper
# @param [String, nil] default_name alternative name for the script
# @param [String, ''] directory to append to the scripts path for actions
# @return [String] command line needed to execute the action
def action_command_line(action, parameters,
default_name = nil, directory = '')
def action_command_line(action, parameters, default_name = nil, directory = '')
if action.is_a?(String) && action[0] == '/'
return action + ' ' + parameters if parameters
@ -111,9 +109,7 @@ module DriverExecHelper
#
# Sends a message to the OpenNebula core through stdout
# rubocop:disable Metrics/ParameterLists
def send_message(action = '-', result = RESULT[:failure],
id = '-', info = '-')
def send_message(action = '-', result = RESULT[:failure], id = '-', info = '-')
@send_mutex.synchronize do
STDOUT.puts "#{action} #{result} #{id} #{info}"
STDOUT.flush

View File

@ -38,7 +38,6 @@ module OpenNebula::ServiceTemplateExt
# @param market_id [Integer] Marketplace ID to import app
# @param name [String] Service Template App name
def mp_import(templates, market_id, name)
template = ''
name ||= "#{@body['name']}-#{SecureRandom.hex[0..9]}"
template = <<-EOT

View File

@ -125,7 +125,6 @@ module OneProvision
# @param only_hosts [Array] Hostames - limit configure to them
def configure(hosts, datastores = nil, provision = nil,
only_hosts = [])
return if hosts.nil? || hosts.empty?
Driver.retry_loop('Failed to configure hosts', provision) do

View File

@ -86,13 +86,7 @@ module VCenterDriver
new(connection)
end
def get_or_create_tag(
api_client,
category_id,
tag_name,
tag_description
)
def get_or_create_tag(api_client, category_id, tag_name, tag_description)
tag_api = VSphereAutomation::CIS::TaggingTagApi.new(api_client)
tag = tag_api.list.value.find do |id|
c = tag_api.get(id).value

View File

@ -239,8 +239,8 @@ module VCenterDriver
begin
orig_stderr = $stderr.clone
orig_stdout = $stdout.clone
$stderr.reopen File.new('/dev/null', 'w')
$stdout.reopen File.new('/dev/null', 'w')
$stderr.reopen File.new(File::NULL, 'w')
$stdout.reopen File.new(File::NULL, 'w')
retval = yield
rescue StandardError => e
$stdout.reopen orig_stdout
@ -256,7 +256,7 @@ module VCenterDriver
def self.in_stderr_silence
begin
orig_stderr = $stderr.clone
$stderr.reopen File.new('/dev/null', 'w')
$stderr.reopen File.new(File::NULL, 'w')
retval = yield
rescue StandardError => e
$stderr.reopen orig_stderr

View File

@ -1117,12 +1117,7 @@ module VCenterDriver
one_vn
end
def import_vcenter_nics(
opts,
vm_id = nil,
dc_name = nil
)
def import_vcenter_nics(opts, vm_id = nil, dc_name = nil)
vi_client = opts[:vi_client]
vc_uuid = opts[:vc_uuid]
npool = opts[:npool]