lib/brightbox-cli/commands/servers/snapshot.rb in brightbox-cli-3.3.0 vs lib/brightbox-cli/commands/servers/snapshot.rb in brightbox-cli-4.0.0.rc2
- old
+ new
@@ -1,24 +1,20 @@
module Brightbox
command [:servers] do |cmd|
-
cmd.desc I18n.t("servers.snapshot.desc")
cmd.arg_name "server-id..."
cmd.command [:snapshot] do |c|
-
c.action do |_global_options, _options, args|
-
raise "You must specify servers to snapshot" if args.empty?
servers = Server.find_or_call(args) do |id|
raise "Couldn't find server #{id}"
end
servers.each do |s|
info "Snapshotting server #{s}"
s.snapshot
end
-
end
end
end
end