Add Status implementation.

This commit is contained in:
Random-Liu
2016-11-01 20:20:13 -07:00
parent fc10a25ae1
commit 55c5232810
10 changed files with 154 additions and 6 deletions

View File

@@ -216,3 +216,14 @@ func buildFullContainerLogsPath(podUID types.UID, containerName string, restartC
func buildPodLogsDirectory(podUID types.UID) string {
return filepath.Join(podLogsRootDirectory, string(podUID))
}
// getRuntimeCondition gets specified runtime condition from the runtime status.
func getRuntimeCondition(status *runtimeApi.RuntimeStatus, t string) *runtimeApi.RuntimeCondition {
conditions := status.GetConditions()
for _, condition := range conditions {
if condition.GetType() == t {
return condition
}
}
return nil
}