mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-21 04:12:37 +09:00
Feature #2120: Show shutdown_action in CLI
This commit is contained in:
1 parent
eb50a24848
commit
bd592c6a5b
3 files changed
+5
-4
No files matched your search
@@ -191,6 +191,7 @@ def show_service(client, args, options)
|
||||
|
||||
puts str % ["STRATEGY", template['deployment']]
|
||||
puts str % ["SERVICE STATE", Service.state_str(template['state'])]
|
||||
puts str % ["SHUTDOWN", template['shutdown_action']] if template['shutdown_action']
|
||||
|
||||
puts
|
||||
|
||||
@@ -212,8 +213,9 @@ def show_service(client, args, options)
|
||||
|
||||
puts str % ["ROLE STATE", Role.state_str(role['state'])]
|
||||
puts str % ["PARENTS", role['parents'].join(', ')] if role['parents']
|
||||
puts str % ["CARNIDALITY", role['cardinality']||1]
|
||||
puts str % ["CARNIDALITY", role['cardinality']]
|
||||
puts str % ["VM TEMPLATE", role['vm_template']]
|
||||
puts str % ["SHUTDOWN", role['shutdown_action']] if role['shutdown_action']
|
||||
|
||||
puts "NODES INFORMATION"
|
||||
NODE_TABLE.show(role['nodes'])
|
||||
|
||||
@@ -291,10 +291,7 @@ post '/service/:id/role/:role_name/action' do
|
||||
if role.nil?
|
||||
rc = OpenNebula::Error.new("Role '#{params[:role_name]}' not found")
|
||||
else
|
||||
# TODO: opts['period'], opts['number'] check be integer
|
||||
|
||||
# Use defaults only if one of the options is supplied
|
||||
|
||||
if opts['period'].nil? ^ opts['number'].nil?
|
||||
opts['period'] = conf[:action_period] if opts['period'].nil?
|
||||
opts['number'] = conf[:action_number] if opts['number'].nil?
|
||||
|
||||
@@ -406,6 +406,8 @@ module OpenNebula
|
||||
def batch_action(action, period, vms_per_period)
|
||||
vms_id = []
|
||||
|
||||
# TODO: check action is a valid string, period vm_per_period integer
|
||||
|
||||
error_msgs = []
|
||||
nodes = @body['nodes']
|
||||
now = Time.now.to_i
|
||||
|
||||
Reference in new issue
Block a user