Sha256: 728cd8122e4746e4453ecbb70b7f94a329777a8c617235b2f27504275a2d4bb2

Contents?: true

Size: 850 Bytes

Versions: 48

Compression:

Stored size: 850 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"

    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'],
      docker: config.active['cmd_docker'],
      network: network
    )
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/docker/container/check/network.rb
takeltau-0.46.8 lib/takeltau/docker/container/check/network.rb
takeltau-0.46.5 lib/takeltau/docker/container/check/network.rb
takeltau-0.46.1 lib/takeltau/docker/container/check/network.rb
takeltau-0.46.0 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.27 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.26 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.24 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.23 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.22 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.21 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.19 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.17 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.16 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.14 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.13 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.12 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.11 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.10 lib/takeltau/docker/container/check/network.rb
takeltau-0.45.9 lib/takeltau/docker/container/check/network.rb