Sha256: b0eb0e33fe646476170d55bff5bd9b8d47d5510f6a31a3032185a66868e1de34
Contents?: true
Size: 787 Bytes
Versions: 14
Compression:
Stored size: 787 Bytes
Contents
module Brightbox command [:sql] do |product| product.command [:instances] do |cmd| cmd.desc I18n.t("sql.instances.destroy.desc") cmd.arg_name "[instance-id...]" cmd.command [:destroy] do |c| c.action do |_global_options, _options, args| raise "You must specify instance IDs to destroy" if args.empty? servers = DatabaseServer.find_or_call(args) do |id| raise "Couldn't find an SQL instance with ID #{id}" end servers.each do |server| info "Destroying server instance #{server}" begin server.destroy rescue Brightbox::Api::Conflict error "Could not destroy #{server}" end end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems