Class: Seiton::CLI
- Inherits:
-
Thor
- Object
- Thor
- Seiton::CLI
- Defined in:
- lib/seiton/cli.rb
Instance Method Summary collapse
- #ami ⇒ Object
- #ebs_snapshot ⇒ Object
- #eip ⇒ Object
- #init ⇒ Object
- #instance ⇒ Object
- #rds_snapshot ⇒ Object
- #sqs_queue ⇒ Object
- #version ⇒ Object
Instance Method Details
#ami ⇒ Object
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/seiton/cli.rb', line 30 def ami unless [:before_datetime] then puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)' exit 1 end ignores = Seiton::Ignores.new([:ignores_file], [:ignores]).generate seiton = Seiton::Ec2.new seiton.ec2_image([:check], [:before_datetime], ignores) end |
#ebs_snapshot ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/seiton/cli.rb', line 42 def ebs_snapshot unless [:before_datetime] then puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)' exit 1 end ignores = Seiton::Ignores.new([:ignores_file], [:ignores]).generate seiton = Seiton::Ec2.new seiton.ebs_snapshots([:check], [:before_datetime], ignores) end |
#eip ⇒ Object
79 80 81 82 83 |
# File 'lib/seiton/cli.rb', line 79 def eip ignores = Seiton::Ignores.new([:ignores_file], [:ignores]).generate seiton = Seiton::Ec2.new seiton.eip([:check], ignores) end |
#init ⇒ Object
24 25 26 27 |
# File 'lib/seiton/cli.rb', line 24 def init require 'seiton/init' Seiton::Init.welcome end |
#instance ⇒ Object
55 56 57 58 59 60 61 62 63 64 |
# File 'lib/seiton/cli.rb', line 55 def instance unless [:before_datetime] then puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)' exit 1 end ignores = Seiton::Ignores.new([:ignores_file], [:ignores]).generate seiton = Seiton::Ec2.new seiton.ec2_instance([:check], [:before_datetime], ignores) end |
#rds_snapshot ⇒ Object
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/seiton/cli.rb', line 67 def rds_snapshot unless [:before_datetime] then puts '--before-datetime must be specified. (--before-datetime=YYYY/MM/DD)' exit 1 end ignores = Seiton::Ignores.new([:ignores_file], [:ignores]).generate seiton = Seiton::Rds.new seiton.rds_snapshot([:check], [:before_datetime], ignores) end |