summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-01-18 11:49:14 -0500
committerMatthew Heon <matthew.heon@gmail.com>2018-01-18 11:49:14 -0500
commit49378c055ad677505a358b4e0572ec235dbde6e4 (patch)
tree568759fb6b83f9cfa9d2c2b1c6c75883be751454
parent4f2bf5ba1c27d686c0405e008a07d642d5a1e510 (diff)
downloadpodman-49378c055ad677505a358b4e0572ec235dbde6e4.tar.gz
podman-49378c055ad677505a358b4e0572ec235dbde6e4.tar.bz2
podman-49378c055ad677505a358b4e0572ec235dbde6e4.zip
Rename containerRuntimeInfo to containerState for clarity
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
-rw-r--r--libpod/container.go6
-rw-r--r--libpod/container_internal.go2
-rw-r--r--libpod/sql_state.go2
-rw-r--r--libpod/sql_state_internal.go2
-rw-r--r--libpod/test_common.go2
5 files changed, 7 insertions, 7 deletions
diff --git a/libpod/container.go b/libpod/container.go
index 996f79ea4..4170ea443 100644
--- a/libpod/container.go
+++ b/libpod/container.go
@@ -93,7 +93,7 @@ type Container struct {
runningSpec *spec.Spec
- state *containerRuntimeInfo
+ state *containerState
// Locked indicates that a container has been locked as part of a
// Batch() operation
@@ -109,9 +109,9 @@ type Container struct {
// TODO enable pod support
// TODO Add readonly support
-// containerRuntimeInfo contains the current state of the container
+// containerState contains the current state of the container
// It is stored on disk in a tmpfs and recreated on reboot
-type containerRuntimeInfo struct {
+type containerState struct {
// The current state of the running container
State ContainerStatus `json:"state"`
// The path to the JSON OCI runtime spec for this container
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 73f9c6961..5f43d03a7 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -141,7 +141,7 @@ func newContainer(rspec *spec.Spec, lockDir string) (*Container, error) {
ctr := new(Container)
ctr.config = new(ContainerConfig)
- ctr.state = new(containerRuntimeInfo)
+ ctr.state = new(containerState)
ctr.config.ID = stringid.GenerateNonCryptoID()
ctr.config.Name = namesgenerator.GetRandomName(0)
diff --git a/libpod/sql_state.go b/libpod/sql_state.go
index 4299b29ab..42f5fe11e 100644
--- a/libpod/sql_state.go
+++ b/libpod/sql_state.go
@@ -527,7 +527,7 @@ func (s *SQLState) UpdateContainer(ctr *Container) error {
return errors.Wrapf(err, "error parsing database state for container %s", ctr.ID())
}
- newState := new(containerRuntimeInfo)
+ newState := new(containerState)
newState.State = ContainerStatus(state)
newState.ConfigPath = configPath
newState.RunDir = runDir
diff --git a/libpod/sql_state_internal.go b/libpod/sql_state_internal.go
index 1dbc466e4..24d5d8bd4 100644
--- a/libpod/sql_state_internal.go
+++ b/libpod/sql_state_internal.go
@@ -467,7 +467,7 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) {
ctr := new(Container)
ctr.config = new(ContainerConfig)
- ctr.state = new(containerRuntimeInfo)
+ ctr.state = new(containerState)
ctr.config.ID = id
ctr.config.Name = name
diff --git a/libpod/test_common.go b/libpod/test_common.go
index 29461c12c..131a44d0f 100644
--- a/libpod/test_common.go
+++ b/libpod/test_common.go
@@ -47,7 +47,7 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
},
},
},
- state: &containerRuntimeInfo{
+ state: &containerState{
State: ContainerStateRunning,
ConfigPath: "/does/not/exist/specs/" + id,
RunDir: "/does/not/exist/tmp/",