Change StateUnknown to StateInit

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu
2019-02-04 11:17:31 -08:00
parent dd2846d941
commit bfd25c80b4
6 changed files with 21 additions and 21 deletions

View File

@@ -93,7 +93,7 @@ func (s *Store) Get(id string) (Sandbox, error) {
if err != nil {
return sb, err
}
if sb.Status.Get().State == StateUnknown {
if sb.Status.Get().State == StateInit {
return Sandbox{}, store.ErrNotExist
}
return sb, nil
@@ -123,7 +123,7 @@ func (s *Store) List() []Sandbox {
defer s.lock.RUnlock()
var sandboxes []Sandbox
for _, sb := range s.sandboxes {
if sb.Status.Get().State == StateUnknown {
if sb.Status.Get().State == StateInit {
continue
}
sandboxes = append(sandboxes, sb)