Sha256: ec6b190f1912d285e5adc66958acc04df070bfcd7dd413a942842e8a8833eb9e
Contents?: true
Size: 1016 Bytes
Versions: 1
Compression:
Stored size: 1016 Bytes
Contents
module Rudy; module CLI; module AWS; module EC2; class Snapshots < Rudy::CLI::CommandBase def create_snapshots_valid? raise Drydock::ArgError.new('volume ID', @alias) unless @option.volume @volume = Rudy::AWS::EC2::Volumes.get(@option.volume) !@volume.nil? end def create_snapshots snap = execute_action { Rudy::AWS::EC2::Snapshots.create(@volume.awsid) } print_stobject snap end def destroy_snapshots_valid? raise Drydock::ArgError.new('snapshot ID', @alias) unless @argv.snapid @snap = Rudy::AWS::EC2::Snapshots.get(@argv.snapid) raise "Snapshot #{@snap.awsid} does not exist" unless @snap true end def destroy_snapshots li "Destroying: #{@snap.awsid}" execute_check(:medium) execute_action { Rudy::AWS::EC2::Snapshots.destroy(@snap.awsid) } end def snapshots snaps = Rudy::AWS::EC2::Snapshots.list || [] print_stobjects snaps end end end; end end; end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rudy-0.9.8.020 | lib/rudy/cli/aws/ec2/snapshots.rb |