Sha256: 9f2d9f3feddb54016087f74321fa4117500e4c0a3f61e5829845bbad40305c41
Contents?: true
Size: 823 Bytes
Versions: 18
Compression:
Stored size: 823 Bytes
Contents
module Brightbox command [:sql] do |product| product.desc I18n.t("sql.snapshots.desc") product.command [:snapshots] do |cmd| cmd.desc I18n.t("sql.snapshots.destroy.desc") cmd.arg_name "[snapshot-id...]" cmd.command [:destroy] do |c| c.action do |_global_options, _options, args| raise "You must specify snapshots to destroy" if args.empty? snapshots = DatabaseSnapshot.find_or_call(args) do |id| raise "Couldn't find snapshot #{id}" end snapshots.each do |snapshot| info "Destroying snapshot #{snapshot}" begin snapshot.destroy rescue Brightbox::Api::Conflict error "Could not destroy #{snapshot}" end end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems