Merge pull request #8665 from markturansky/fix_pv_desc

Fixed PV Describe bug
This commit is contained in:
Tim Hockin 2015-05-22 08:25:05 -07:00
commit 64c4e264f2

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
})