Sha256: 74610b2c1712caba5ff63e19999c5976ec6fa442c4fe401f1be77ef6d6638749

Contents?: true

Size: 852 Bytes

Versions: 40

Compression:

Stored size: 852 Bytes

Contents

# frozen_string_literal: true

# tau docker container check network
module DockerContainerCheckNetwork
  # Backend method for docker container check network.
  # @return [Boolean] is network existing?
  def docker_container_check_network(network)
    log.debug "Checking if network \"#{network}\" is existing"

    return false unless docker_check_daemon

    stdout_str = run _docker_container_cmd_check_network network

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

    log.debug "Network \"#{network}\" is existing"
    true
  end

  private

  # Prepare command to check if docker network exists.
  def _docker_container_cmd_check_network(network)
    format(
      config.active['cmd_docker_container_check_network_docker_network'],
      network: network
    )
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
takeltau-0.39.18 lib/takeltau/docker/container/check/network.rb
takeltau-0.39.16 lib/takeltau/docker/container/check/network.rb
takeltau-0.39.11 lib/takeltau/docker/container/check/network.rb
takeltau-0.39.7 lib/takeltau/docker/container/check/network.rb
takeltau-0.39.2 lib/takeltau/docker/container/check/network.rb
takeltau-0.39.0 lib/takeltau/docker/container/check/network.rb
takeltau-0.38.2 lib/takeltau/docker/container/check/network.rb
takeltau-0.38.1 lib/takeltau/docker/container/check/network.rb
takeltau-0.38.0 lib/takeltau/docker/container/check/network.rb
takeltau-0.37.3 lib/takeltau/docker/container/check/network.rb
takeltau-0.37.1 lib/takeltau/docker/container/check/network.rb
takeltau-0.36.5 lib/takeltau/docker/container/check/network.rb
takeltau-0.36.4 lib/takeltau/docker/container/check/network.rb
takeltau-0.36.3 lib/takeltau/docker/container/check/network.rb
takeltau-0.36.1 lib/takeltau/docker/container/check/network.rb
takeltau-0.35.18 lib/takeltau/docker/container/check/network.rb
takeltau-0.35.15 lib/takeltau/docker/container/check/network.rb
takeltau-0.35.14 lib/takeltau/docker/container/check/network.rb
takeltau-0.35.12 lib/takeltau/docker/container/check/network.rb
takeltau-0.35.11 lib/takeltau/docker/container/check/network.rb