8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/cli/vm_state.rb', line 8
def change(job, index, new_state, operation_desc)
command.say("You are about to #{operation_desc.make_green}")
manifest = command.prepare_deployment_manifest
manifest_yaml = Psych.dump(manifest)
if command.interactive?
check_if_manifest_changed(manifest)
unless command.confirmed?("#{operation_desc.capitalize}?")
command.cancel_deployment
end
end
command.nl
command.say("Performing `#{operation_desc}'...")
command.director.change_job_state(manifest['name'], manifest_yaml, job, index, new_state)
end
|