diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2018-07-25 08:47:35 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-25 08:47:35 -0400 |
commit | c90b7400a8b9ffc77de69ad3aae1754ac006ba21 (patch) | |
tree | 80f5a45ff74c22d8571710df1febd7b25f5b3aaa /libpod/pod.go | |
parent | 32b690e90298f3c17e71c08d87e9727cfce8d3fb (diff) | |
parent | 1b51e88098e0c77cddd8de3484ef56965352bcf3 (diff) | |
download | podman-c90b7400a8b9ffc77de69ad3aae1754ac006ba21.tar.gz podman-c90b7400a8b9ffc77de69ad3aae1754ac006ba21.tar.bz2 podman-c90b7400a8b9ffc77de69ad3aae1754ac006ba21.zip |
Merge pull request #1116 from mheon/namespaces
Add Pod and Container namespaces
Diffstat (limited to 'libpod/pod.go')
-rw-r--r-- | libpod/pod.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/pod.go b/libpod/pod.go index fb69787ed..a5b87f8b5 100644 --- a/libpod/pod.go +++ b/libpod/pod.go @@ -27,6 +27,8 @@ type Pod struct { type PodConfig struct { ID string `json:"id"` Name string `json:"name"` + // Namespace the pod is in + Namespace string `json:"namespace,omitempty"` // Labels contains labels applied to the pod Labels map[string]string `json:"labels"` @@ -58,6 +60,12 @@ func (p *Pod) Name() string { return p.config.Name } +// Namespace returns the pod's libpod namespace. +// Namespaces are used to logically separate containers and pods in the state. +func (p *Pod) Namespace() string { + return p.config.Namespace +} + // Labels returns the pod's labels func (p *Pod) Labels() map[string]string { labels := make(map[string]string) |