Refactor PodCondition to PodPhase

This commit is contained in:
markturansky
2014-11-21 14:04:32 -05:00
parent 9f5ebef3d8
commit 8159c8fd25
16 changed files with 57 additions and 57 deletions

View File

@@ -161,7 +161,7 @@ func init() {
},
func(in *newer.PodStatus, out *PodState, s conversion.Scope) error {
if err := s.Convert(&in.Condition, &out.Status, 0); err != nil {
if err := s.Convert(&in.Phase, &out.Status, 0); err != nil {
return err
}
if err := s.Convert(&in.Info, &out.Info, 0); err != nil {
@@ -173,7 +173,7 @@ func init() {
return nil
},
func(in *PodState, out *newer.PodStatus, s conversion.Scope) error {
if err := s.Convert(&in.Status, &out.Condition, 0); err != nil {
if err := s.Convert(&in.Status, &out.Phase, 0); err != nil {
return err
}
if err := s.Convert(&in.Info, &out.Info, 0); err != nil {
@@ -186,8 +186,8 @@ func init() {
return nil
},
// Convert all to the new PodCondition constants
func(in *newer.PodCondition, out *PodStatus, s conversion.Scope) error {
// Convert all to the new PodPhase constants
func(in *newer.PodPhase, out *PodStatus, s conversion.Scope) error {
switch *in {
case "":
*out = ""
@@ -200,13 +200,13 @@ func init() {
case newer.PodFailed:
*out = PodTerminated
default:
return errors.New("The string provided is not a valid PodCondition constant value")
return errors.New("The string provided is not a valid PodPhase constant value")
}
return nil
},
func(in *PodStatus, out *newer.PodCondition, s conversion.Scope) error {
func(in *PodStatus, out *newer.PodPhase, s conversion.Scope) error {
switch *in {
case "":
*out = ""
@@ -218,7 +218,7 @@ func init() {
// Older API versions did not contain enough info to map to PodSucceeded
*out = newer.PodFailed
default:
return errors.New("The string provided is not a valid PodCondition constant value")
return errors.New("The string provided is not a valid PodPhase constant value")
}
return nil
},