mirror of
https://github.com/docker/cli.git
synced 2026-01-13 18:22:35 +03:00
Merge pull request #34076 from yastij/33679-renaming-id-meth
renaming id() to state clearly that it's related to the networkAttachment Upstream-commit: ce0ef9568d945b3d16442906a428b6f80fedc4dd Component: engine
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user