Skip to content

Add Container to hold container specific task data#538

Merged
aaronlehmann merged 1 commit intomoby:masterfrom
mrjana:taskapi
May 11, 2016
Merged

Add Container to hold container specific task data#538
aaronlehmann merged 1 commit intomoby:masterfrom
mrjana:taskapi

Conversation

@mrjana
Copy link
Contributor

@mrjana mrjana commented May 5, 2016

Right now all container runtime specific task data such as network
attachments and endpoint information is directly stored in task. Instead
it should inside a container runtime specific message so that we can add
other runtimes later without changing the model.

Fixes #478
/cc @stevvooe

Signed-off-by: Jana Radhakrishnan mrjana@docker.com

type containerConfig struct {
task *api.Task
runtime *api.Container // resolved container specification.
runtime *api.ContainerSpec // resolved container specification.
Copy link
Contributor

@stevvooe stevvooe May 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just access this through the task field. Calling this runtime is inaccurate, since it is just the spec now.

@mrjana
Copy link
Contributor Author

mrjana commented May 10, 2016

@stevvooe @aluzzardi @aaronlehmann This is ready for review.

// Container contains all runtime state of a task which is container runtime specific.
message Container {
// Spec defines the container specific configuration for this container.
ContainerSpec spec = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be non-nullable to be consistent with our other fields called spec.

@stevvooe
Copy link
Contributor

LGTM

I think we can defer most of the feedback, albeit, it looks like there is a merge conflict.

Right now all container runtime specific task data such as network
attachments and endpoint information is directly stored in task. Instead
it should inside a container runtime specific message so that we can add
other runtimes later without changing the model.

Signed-off-by: Jana Radhakrishnan <mrjana@docker.com>
@aaronlehmann
Copy link
Collaborator

LGTM

@aaronlehmann aaronlehmann merged commit 96f99f8 into moby:master May 11, 2016
@aaronlehmann aaronlehmann deleted the taskapi branch May 11, 2016 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants