mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-23 22:50:09 +03:00
M #-: minor fixes in OneFlow (#4549)
This commit is contained in:
parent
22a32cb58f
commit
6f94142ae8
@ -311,9 +311,21 @@ class EventManager
|
||||
|
||||
# rubocop:enable Style/GuardClause
|
||||
|
||||
xml = Nokogiri::XML(Base64.decode64(content))
|
||||
id = xml.xpath('//PARAMETER[POSITION=2]/VALUE').first.text.to_i
|
||||
ready = xml.xpath('//PARAMETER[POSITION=3]/VALUE').text
|
||||
xml = Nokogiri::XML(Base64.decode64(content))
|
||||
|
||||
id = xml.xpath(
|
||||
'//PARAMETER[POSITION=2 and TYPE=\'IN\']/VALUE'
|
||||
).text.to_i
|
||||
ready = xml.xpath(
|
||||
'//PARAMETER[POSITION=3 and TYPE=\'IN\']/VALUE'
|
||||
).text
|
||||
|
||||
# rubocop:disable Style/StringLiterals
|
||||
# Remove extra quotes
|
||||
ready.gsub!("\"", '')
|
||||
ready.gsub!('"', '')
|
||||
ready.gsub!(' ', '')
|
||||
# rubocop:enable Style/StringLiterals
|
||||
|
||||
next if !ready.match('READY=YES') || !nodes.include?(id)
|
||||
|
||||
|
@ -364,7 +364,7 @@ post '/service/:id/role/:role_name/action' do
|
||||
return internal_error(rc.message, one_error_to_http(rc.errno))
|
||||
end
|
||||
|
||||
status 200
|
||||
status 204
|
||||
end
|
||||
|
||||
post '/service/:id/scale' do
|
||||
@ -380,8 +380,7 @@ post '/service/:id/scale' do
|
||||
return internal_error(rc.message, one_error_to_http(rc.errno))
|
||||
end
|
||||
|
||||
status 201
|
||||
body
|
||||
status 204
|
||||
end
|
||||
|
||||
##############################################################################
|
||||
@ -668,6 +667,7 @@ post '/service_template/:id/action' do
|
||||
end
|
||||
|
||||
new_stemplate = OpenNebula::ServiceTemplate.new_with_id(rc, @client)
|
||||
|
||||
rc = new_stemplate.info
|
||||
|
||||
if OpenNebula.is_error?(rc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user