Sha256: b11b11e34fa2bf42ca5138aa6d393e82ed62fbed397db949d9df43eca3a4c923

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

# encoding: utf-8

require 'thor'

module EbsSnapshotter
  class CLI < Thor
    include Thor::Actions


    method_option :config_path, :type => :string,  :required => true, :desc => "Path to fog config i.e. ~/aws.yml"
    method_option :volume_id, :type => :string,  :required => true, :desc => "ID of the EBS volume to snapshot"

    desc 'snapshot', "Snapshots an EBS volume."
    def snapshot
      snapshotter = EbsSnapshotter::Snapshotter.new(options[:config_path], options[:volume_id])
      snapshotter.snapshot
    end
    
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ebs_snapshotter-0.0.2 lib/ebs_snapshotter/cli.rb
ebs_snapshotter-0.0.1 lib/ebs_snapshotter/cli.rb