Class: Lono::Cfn

Inherits:
Command show all
Defined in:
lib/lono/cfn.rb,
lib/lono/cfn/base.rb,
lib/lono/cfn/opts.rb,
lib/lono/cfn/cancel.rb,
lib/lono/cfn/create.rb,
lib/lono/cfn/delete.rb,
lib/lono/cfn/deploy.rb,
lib/lono/cfn/status.rb,
lib/lono/cfn/update.rb,
lib/lono/cfn/download.rb,
lib/lono/cfn/rollback.rb

Defined Under Namespace

Modules: Preview Classes: Base, Cancel, Create, Delete, Deploy, Download, Opts, Rollback, Status, Update

Instance Method Summary collapse

Methods inherited from Command

alter_command_description, command_help, dispatch, exit_on_failure?, website

Instance Method Details

#cancel(stack) ⇒ Object



39
40
41
# File 'lib/lono/cfn.rb', line 39

def cancel(stack)
  Cancel.new(options.merge(stack: stack)).run
end

#create(stack) ⇒ Object



11
12
13
# File 'lib/lono/cfn.rb', line 11

def create(stack)
  Create.new(options.merge(stack: stack)).run
end

#currentObject



63
64
65
# File 'lib/lono/cfn.rb', line 63

def current
  Current.new(options).run
end

#delete(stack) ⇒ Object



32
33
34
# File 'lib/lono/cfn.rb', line 32

def delete(stack)
  Delete.new(options.merge(stack: stack)).run
end

#deploy(stack) ⇒ Object



25
26
27
# File 'lib/lono/cfn.rb', line 25

def deploy(stack)
  Deploy.new(options.merge(stack: stack)).run
end

#download(stack) ⇒ Object



55
56
57
# File 'lib/lono/cfn.rb', line 55

def download(stack)
  Download.new(options.merge(stack: stack)).run
end

#preview(stack) ⇒ Object



46
47
48
49
50
# File 'lib/lono/cfn.rb', line 46

def preview(stack)
  Preview::Param.new(options.merge(stack: stack)).run if options[:param_preview]
  Preview::Codediff.new(options.merge(stack: stack)).run if options[:codediff_preview]
  Preview::Changeset.new(options.merge(stack: stack)).run if options[:changeset_preview]
end

#status(stack) ⇒ Object



69
70
71
72
73
# File 'lib/lono/cfn.rb', line 69

def status(stack)
  status = Lono::Cfn::Status.new(stack, options)
  success = status.run
  exit 3 unless success
end

#update(stack) ⇒ Object



18
19
20
# File 'lib/lono/cfn.rb', line 18

def update(stack)
  Update.new(options.merge(stack: stack)).run
end