diff --git a/pkg/api/validation/validation.go b/pkg/api/validation/validation.go index c3affacecb9..56738b2cb53 100644 --- a/pkg/api/validation/validation.go +++ b/pkg/api/validation/validation.go @@ -450,7 +450,7 @@ func validateVolumeSource(source *api.VolumeSource, fldPath *field.Path) field.E allErrs = append(allErrs, field.Forbidden(fldPath.Child("glusterfs"), "may not specify more than 1 volume type")) } else { numVolumes++ - allErrs = append(allErrs, validateGlusterfs(source.Glusterfs, fldPath.Child("glusterfs"))...) + allErrs = append(allErrs, validateGlusterfsVolumeSource(source.Glusterfs, fldPath.Child("glusterfs"))...) } } if source.Flocker != nil { @@ -784,7 +784,7 @@ func validateQuobyteVolumeSource(quobyte *api.QuobyteVolumeSource, fldPath *fiel return allErrs } -func validateGlusterfs(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path) field.ErrorList { +func validateGlusterfsVolumeSource(glusterfs *api.GlusterfsVolumeSource, fldPath *field.Path) field.ErrorList { allErrs := field.ErrorList{} if len(glusterfs.EndpointsName) == 0 { allErrs = append(allErrs, field.Required(fldPath.Child("endpoints"), "")) @@ -1242,7 +1242,7 @@ func ValidatePersistentVolume(pv *api.PersistentVolume) field.ErrorList { allErrs = append(allErrs, field.Forbidden(specPath.Child("glusterfs"), "may not specify more than 1 volume type")) } else { numVolumes++ - allErrs = append(allErrs, validateGlusterfs(pv.Spec.Glusterfs, specPath.Child("glusterfs"))...) + allErrs = append(allErrs, validateGlusterfsVolumeSource(pv.Spec.Glusterfs, specPath.Child("glusterfs"))...) } } if pv.Spec.Flocker != nil { diff --git a/pkg/api/validation/validation_test.go b/pkg/api/validation/validation_test.go index 97087e1e8da..626c557993a 100644 --- a/pkg/api/validation/validation_test.go +++ b/pkg/api/validation/validation_test.go @@ -998,7 +998,7 @@ func TestValidateGlusterfs(t *testing.T) { } for i, tc := range testCases { - errs := validateGlusterfs(tc.gfs, field.NewPath("field")) + errs := validateGlusterfsVolumeSource(tc.gfs, field.NewPath("field")) if len(errs) > 0 && tc.errtype == "" { t.Errorf("[%d: %q] unexpected error(s): %v", i, tc.name, errs)