fixed PV describe

This commit is contained in:
markturansky 2015-05-22 08:40:43 -04:00
parent d9d12fd3f7
commit bcd3c5a80f

View File

@ -304,11 +304,11 @@ func (d *PersistentVolumeDescriber) Describe(namespace, name string) (string, er
return tabbedString(func(out io.Writer) error {
fmt.Fprintf(out, "Name:\t%s\n", pv.Name)
fmt.Fprintf(out, "Labels:\t%s\n", formatLabels(pv.Labels))
fmt.Fprintf(out, "Status:\t%d\n", pv.Status.Phase)
fmt.Fprintf(out, "Status:\t%s\n", pv.Status.Phase)
if pv.Spec.ClaimRef != nil {
fmt.Fprintf(out, "Claim:\t%d\n", pv.Spec.ClaimRef.Namespace+"/"+pv.Spec.ClaimRef.Name)
fmt.Fprintf(out, "Claim:\t%s\n", pv.Spec.ClaimRef.Namespace+"/"+pv.Spec.ClaimRef.Name)
} else {
fmt.Fprintf(out, "Claim:\t%d\n", "")
fmt.Fprintf(out, "Claim:\t%s\n", "")
}
return nil
})