From e9ed21988d9b886269f83794ebc1c9fc98fb4dfb Mon Sep 17 00:00:00 2001 From: Humble Chirammal Date: Fri, 9 Nov 2018 15:53:44 +0530 Subject: [PATCH] GetVolumeName() is used in a few places, all of which are not applicable to gluster: AD controller kubelet volume manager actual/desired sw for attachable volumes volume reconstruction This is a followup PR based on comment# https://github.com/kubernetes/kubernetes/pull/60195#discussion_r231675596 Signed-off-by: Humble Chirammal --- pkg/volume/glusterfs/glusterfs.go | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/pkg/volume/glusterfs/glusterfs.go b/pkg/volume/glusterfs/glusterfs.go index 81783c728a3..7700b0119f9 100644 --- a/pkg/volume/glusterfs/glusterfs.go +++ b/pkg/volume/glusterfs/glusterfs.go @@ -106,30 +106,7 @@ func (plugin *glusterfsPlugin) GetPluginName() string { } func (plugin *glusterfsPlugin) GetVolumeName(spec *volume.Spec) (string, error) { - var endpointName string - var endpointsNsPtr *string - - volPath, _, err := getVolumeInfo(spec) - if err != nil { - return "", err - } - - if spec.Volume != nil && spec.Volume.Glusterfs != nil { - endpointName = spec.Volume.Glusterfs.EndpointsName - } else if spec.PersistentVolume != nil && - spec.PersistentVolume.Spec.Glusterfs != nil { - endpointName = spec.PersistentVolume.Spec.Glusterfs.EndpointsName - endpointsNsPtr = spec.PersistentVolume.Spec.Glusterfs.EndpointsNamespace - if endpointsNsPtr != nil && *endpointsNsPtr != "" { - return fmt.Sprintf("%v:%v:%v", endpointName, *endpointsNsPtr, volPath), nil - } - return "", fmt.Errorf("invalid endpointsnamespace in provided glusterfs PV spec") - - } else { - return "", fmt.Errorf("unable to fetch required parameters from provided glusterfs spec") - } - - return fmt.Sprintf("%v:%v", endpointName, volPath), nil + return "", fmt.Errorf("GetVolumeName() is unimplemented for GlusterFS") } func (plugin *glusterfsPlugin) CanSupport(spec *volume.Spec) bool {