class Object

Constants

VERSION

Public Instance Methods

event_color(resource_status) click to toggle source
# File bin/tailstack, line 117
def event_color(resource_status)
  event_green = %w[ UPDATE_COMPLETE CREATE_COMPLETE DELETE_COMPLETE UPDATE_COMPLETE_CLEANUP_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE ]
  event_yellow = %w[ UPDATE_IN_PROGRESS CREATE_IN_PROGRESS DELETE_IN_PROGRESS UPDATE_ROLLBACK_IN_PROGRESS UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS ]

  case
  when event_green.include?(resource_status)
    return resource_status.green
  when event_yellow.include?(resource_status)
    return resource_status.brown
  else
    return resource_status.red
  end
end
isThisTheEnd?(event) click to toggle source
# File bin/tailstack, line 134
def isThisTheEnd? event
  events_good = %w[ CREATE_COMPLETE UPDATE_COMPLETE DELETE_COMPLETE ]
  events_bad  = %w[ CREATE_FAILED UPDATE_ROLLBACK_COMPLETE ROLLBACK_COMPLETE UPDATE_ROLLBACK_FAILED ]

  return false unless event[:resource_type] == 'AWS::CloudFormation::Stack'
  exit 1 if events_bad.include? event[:resource_status]
  return events_good.include? event[:resource_status]
end
print_list(cfn, options) click to toggle source