lib/cloudstack-cli/cli.rb in cloudstack-cli-0.10.2 vs lib/cloudstack-cli/cli.rb in cloudstack-cli-0.11.0
- old
+ new
@@ -1,10 +1,10 @@
module CloudstackCli
class Cli < CloudstackCli::Base
include Thor::Actions
- package_name "cloudstack-cli"
+ package_name "cloudstack-cli"
class_option :config_file,
default: File.join(Dir.home, '.cloudstack-cli.yml'),
aliases: '-c',
desc: 'location of your cloudstack-cli configuration file'
@@ -46,25 +46,25 @@
desc "command COMMAND [arg1=val1 arg2=val2...]", "run a custom api command"
def command(command, *args)
params = {'command' => command}
args.each do |arg|
arg = arg.split('=')
- params[arg[0]] = arg[1]
+ params[arg[0]] = arg[1]
end
data = client.send_request(params)
puts JSON.pretty_generate(data)
end
# require subcommands
- Dir[File.dirname(__FILE__) + '/commands/*.rb'].each do |command|
+ Dir[File.dirname(__FILE__) + '/commands/*.rb'].each do |command|
require command
end
desc "environment SUBCOMMAND ...ARGS", "Manage cloudstack-cli environments"
subcommand :environment, Environment
map 'env' => :environment
-
+
desc "zone SUBCOMMAND ...ARGS", "Manage zones"
subcommand :zone, Zone
desc "pod SUBCOMMAND ...ARGS", "List pods"
subcommand :pod, Pod
@@ -104,10 +104,13 @@
subcommand :iso, Iso
desc "router SUBCOMMAND ...ARGS", "Manage virtual routers"
subcommand :router, Router
+ desc "system_vm SUBCOMMAND ...ARGS", "Manage system vms"
+ subcommand :system_vm, SystemVm
+
desc "volume SUBCOMMAND ...ARGS", "Manage volumes"
subcommand :volume, Volume
desc "snapshot SUBCOMMAND ...ARGS", "Manage snapshots"
subcommand :snapshot, Snapshot
@@ -149,6 +152,6 @@
subcommand :affinity_group, AffinityGroup
desc "configuration SUBCOMMAND ...ARGS", "List cloudstack configuration values"
subcommand :configuration, Configuration
end
-end
\ No newline at end of file
+end