Class: Seiton::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/seiton/cli.rb

Instance Method Summary collapse

Instance Method Details

#amiObject



23
24
25
26
27
28
29
30
# File 'lib/seiton/cli.rb', line 23

def ami
  unless options[:before_datetime] then
    puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)'
    exit 1
  end
  seiton = Seiton::Ec2.new
  seiton.ec2_image(options[:check], options[:before_datetime], options[:ignores])
end

#ec2_snapshotObject



36
37
38
39
40
41
42
43
# File 'lib/seiton/cli.rb', line 36

def ec2_snapshot
  unless options[:before_datetime] then
    puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)'
    exit 1
  end
  seiton = Seiton::Ec2.new
  seiton.ec2_snapshots(options[:check], options[:before_datetime], options[:ignores])
end

#eipObject



74
75
76
77
# File 'lib/seiton/cli.rb', line 74

def eip
  seiton = Seiton::Ec2.new
  seiton.eip(options[:check], options[:ignores])
end

#instanceObject



49
50
51
52
53
54
55
56
# File 'lib/seiton/cli.rb', line 49

def instance
  unless options[:before_datetime] then
    puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)'
    exit 1
  end
  seiton = Seiton::Ec2.new
  seiton.ec2_instance(options[:check], options[:before_datetime], options[:ignores])
end

#rds_snapshotObject



62
63
64
65
66
67
68
69
# File 'lib/seiton/cli.rb', line 62

def rds_snapshot
  unless options[:before_datetime] then
    puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)'
    exit 1
  end
  seiton = Seiton::Rds.new
  seiton.rds_snapshot(options[:check], options[:before_datetime], options[:ignores])
end

#sqs_queueObject



82
83
84
85
# File 'lib/seiton/cli.rb', line 82

def sqs_queue
  seiton = Seiton::Sqs.new
  seiton.sqs_queue(options[:check], options[:ignores])
end

#versionObject



15
16
17
# File 'lib/seiton/cli.rb', line 15

def version
  puts Seiton::VERSION
end