mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
feature #2050: Add update action to appflow-server.rb
This commit is contained in:
1 parent
d22ed605f2
commit
8168636076
1 file changed
+11
@@ -400,6 +400,17 @@ post '/service_template/:id/action' do
|
||||
OpenNebula::Error.new("Action #{action['perform']}: " <<
|
||||
"You have to specify an OCTET")
|
||||
end
|
||||
when 'update'
|
||||
if opts && opts['template_json']
|
||||
begin
|
||||
rc = service_template.update(opts['template_json'])
|
||||
rescue Validator::ParseException, JSON::ParserError
|
||||
OpenNebula::Error.new($!.message)
|
||||
end
|
||||
else
|
||||
OpenNebula::Error.new("Action #{action['perform']}: " <<
|
||||
"You have to provide a template")
|
||||
end
|
||||
else
|
||||
OpenNebula::Error.new("Action #{action['perform']} not supported")
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user