Class: CloudstackCli::Cli
- Inherits:
-
Base
- Object
- Thor
- Base
- CloudstackCli::Cli
show all
- Includes:
- Thor::Actions
- Defined in:
- lib/cloudstack-cli/cli.rb
Constant Summary
Constants included
from Helper
Helper::ASYNC_STATES
Instance Attribute Summary
Attributes inherited from Base
#config
Instance Method Summary
collapse
Methods inherited from Base
exit_on_failure?
Methods included from Helper
#ask_number, #bootstrap_server, #bootstrap_server_interactive, #create_port_rules, #create_server, #print_job_status, #print_options, #update_job_status, #watch_jobs
Instance Method Details
#command(command, *args) ⇒ Object
32
33
34
35
36
37
38
39
|
# File 'lib/cloudstack-cli/cli.rb', line 32
def command(command, *args)
params = {'command' => command}
args.each do |arg|
arg = arg.split('=')
params[arg[0]] = arg[1]
end
puts JSON.pretty_generate(client.send_request params)
end
|
#setup ⇒ Object
27
28
29
|
# File 'lib/cloudstack-cli/cli.rb', line 27
def setup
invoke "environment:add", :environment => options[:environment]
end
|
#version ⇒ Object
21
22
23
|
# File 'lib/cloudstack-cli/cli.rb', line 21
def version
say "cloudstack-cli version #{CloudstackCli::VERSION}"
end
|