Class: Lono::Sets::Status::Instance::Deleted

Inherits:
Base
  • Object
show all
Defined in:
lib/lono/sets/status/instance/deleted.rb

Instance Method Summary collapse

Methods inherited from Base

#delay, #describe_stack_instance, #initialize, #say, #show_instance, #show_time_progress, #status_line

Methods included from AwsServices

#cfn, #ec2, #iam, #s3, #s3_presigner, #s3_resource, #sts

Methods included from AwsServices::Helper

#rollback_complete?, #testing_update?

Methods included from AwsServices::StackSet

#find_stack_set, #stack_set_exists?

Methods included from AwsServices::Stack

#find_stack, #stack_exists?

Constructor Details

This class inherits a constructor from Lono::Sets::Status::Instance::Base

Instance Method Details

#display_oneObject



24
25
26
27
28
29
30
# File 'lib/lono/sets/status/instance/deleted.rb', line 24

def display_one
  resp = describe_stack_instance
  stack_instance = resp.stack_instance
  show_instance(stack_instance)
  @shown << stack_instance
  resp
end

#loop!Object



11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/lono/sets/status/instance/deleted.rb', line 11

def loop!
  # resp.stack_instance.status : one of CURRENT, OUTDATED, INOPERABLE
  while true
    begin
      display_one
    rescue Aws::CloudFormation::Errors::StackInstanceNotFoundException
      say status_line(@stack_instance., @stack_instance.region, "DELETED")
      break
    end
    delay
  end
end

#tailObject



4
5
6
7
8
9
# File 'lib/lono/sets/status/instance/deleted.rb', line 4

def tail
  display_one
  Thread.new do
    loop!
  end
end