Skip to content

Commit

Permalink
change method name.
Browse files Browse the repository at this point in the history
  • Loading branch information
inokappa committed Nov 24, 2013
1 parent c4afe9d commit 003e80f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/kitchen/driver/docker.rb
Expand Up @@ -61,8 +61,8 @@ def create(state)
state[:image_id] = build_image(state) unless state[:image_id]
state[:container_id] = run_container(state) unless state[:container_id]
state[:port] = container_ssh_port(state)
state[:ip] = container_ssh_ip(state)
state[:hostname] = remote_socket? ? socket_uri.host : state[:ip]
state[:gwip] = container_ssh_gwip(state)
state[:hostname] = remote_socket? ? socket_uri.host : state[:gwip]
wait_for_sshd(state[:hostname], :port => state[:port])
end

Expand Down Expand Up @@ -187,7 +187,7 @@ def container_ssh_port(state)
parse_container_ssh_port(output)
end

def parse_container_ssh_ip(output)
def parse_container_ssh_gwip(output)
begin
info = Array(::JSON.parse(output)).first
ip = info['NetworkSettings']['Gateway']
Expand All @@ -198,10 +198,10 @@ def parse_container_ssh_ip(output)
end
end

def container_ssh_ip(state)
def container_ssh_gwip(state)
container_id = state[:container_id]
output = docker_command("inspect #{container_id}")
parse_container_ssh_ip(output)
parse_container_ssh_gwip(output)
end

def rm_container(state)
Expand Down

0 comments on commit 003e80f

Please sign in to comment.