Module: ShipContainerCheckExisting

Included in:
Takeltau::ShipContainer, Takeltau::ShipContainerCheck, Takeltau::ShipProject
Defined in:
lib/takeltau/ship/container/check/existing.rb

Overview

tau ship container check existing

Instance Method Summary collapse

Instance Method Details

#ship_container_check_existingBoolean

Backend method for ship container check existing.

Returns:

  • (Boolean)

    is container existing?



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/takeltau/ship/container/check/existing.rb', line 7

def ship_container_check_existing
  ship_hostname = _ship_container_lib_ship_hostname
  log.debug "Checking if takelship \"#{ship_hostname}\" is existing"

  stdout_str = run _ship_container_cmd_check_existing ship_hostname

  if stdout_str.to_s.chomp.empty?
    log.debug "The takelship \"#{ship_hostname}\" is not existing"
    return false
  end

  log.debug "The takelship \"#{ship_hostname}\" is existing"
  true
end