Sha256: cc87ceaf7d04d2b60c1cc82c7edb6401f4af18eff98d3e97f57297a09b56ea9f

Contents?: true

Size: 436 Bytes

Versions: 7

Compression:

Stored size: 436 Bytes

Contents

desc 'Destroy images'
arg_name 'image-id...'
command [:destroy] do |c|

  c.action do |global_options,options,args|

    if args.empty?
      raise "You must specify the images you want to destroy"
    end

    images = Image.find_or_call(args) do |id|
      raise "Couldn't find image #{id}"
    end

    images.each do |i|
      info "Destroying image #{i}"
      i.destroy
      i.reload
    end

    render_table(images)

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
bbcloud-0.11.2 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.11.1 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.11.0 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.10.1 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.9.2 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.9.1 lib/bbcloud/commands/images-destroy.rb
bbcloud-0.9 lib/bbcloud/commands/images-destroy.rb