lib/heirloom/cli/destroy.rb in heirloom-0.5.0rc4 vs lib/heirloom/cli/destroy.rb in heirloom-0.6.0rc1

- old
+ new

@@ -11,18 +11,21 @@ :opts => @opts ensure_valid_options :provided => @opts, :required => [:name, :id], :config => @config - + ensure_valid_region :region => @opts[:metadata_region], + :config => @config ensure_domain_exists :name => @opts[:name], :config => @config @name = @opts[:name] @id = @opts[:id] @archive = Archive.new :name => @name, :id => @id, :config => @config + ensure_archive_exists :archive => @archive, + :config => @config end def destroy @archive.destroy :keep_domain => false end @@ -43,9 +46,11 @@ EOS opt :help, "Display Help" opt :id, "ID of the archive to display.", :type => :string opt :level, "Log level [debug|info|warn|error].", :type => :string, :default => 'info' + opt :metadata_region, "AWS region to store Heirloom metadata.", :type => :string, + :default => 'us-west-1' opt :name, "Name of archive.", :type => :string opt :aws_access_key, "AWS Access Key ID", :type => :string, :short => :none opt :aws_secret_key, "AWS Secret Access Key", :type => :string, :short => :none