From 27c0131a43b1f4956446467273e82826264d6c35 Mon Sep 17 00:00:00 2001 From: Yassine TIJANI Date: Wed, 12 Jul 2017 15:50:38 +0200 Subject: [PATCH] renaming id() to state clearly that it's related to the networkAttachement container target Signed-off-by: Yassine TIJANI --- daemon/cluster/executor/container/adapter.go | 4 ++-- daemon/cluster/executor/container/container.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/cluster/executor/container/adapter.go b/daemon/cluster/executor/container/adapter.go index 92e4947e65..7444057c35 100644 --- a/daemon/cluster/executor/container/adapter.go +++ b/daemon/cluster/executor/container/adapter.go @@ -199,7 +199,7 @@ func (c *containerAdapter) networkAttach(ctx context.Context) error { } } - return c.backend.UpdateAttachment(networkName, networkID, c.container.id(), config) + return c.backend.UpdateAttachment(networkName, networkID, c.container.networkAttachmentContainerID(), config) } func (c *containerAdapter) waitForDetach(ctx context.Context) error { @@ -218,7 +218,7 @@ func (c *containerAdapter) waitForDetach(ctx context.Context) error { } } - return c.backend.WaitForDetachment(ctx, networkName, networkID, c.container.taskID(), c.container.id()) + return c.backend.WaitForDetachment(ctx, networkName, networkID, c.container.taskID(), c.container.networkAttachmentContainerID()) } func (c *containerAdapter) create(ctx context.Context) error { diff --git a/daemon/cluster/executor/container/container.go b/daemon/cluster/executor/container/container.go index f27980cb1a..d25e59acf6 100644 --- a/daemon/cluster/executor/container/container.go +++ b/daemon/cluster/executor/container/container.go @@ -89,7 +89,7 @@ func (c *containerConfig) setTask(t *api.Task) error { return nil } -func (c *containerConfig) id() string { +func (c *containerConfig) networkAttachmentContainerID() string { attachment := c.task.Spec.GetAttachment() if attachment == nil { return "" @@ -115,7 +115,7 @@ func (c *containerConfig) nameOrID() string { return c.name() } - return c.id() + return c.networkAttachmentContainerID() } func (c *containerConfig) name() string {