Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for GetVolumeName (0.17 sec)

  1. pkg/volume/configmap/configmap_test.go

    	if err != nil {
    		t.Errorf("Failed to make a new Mounter: %v", err)
    	}
    	if mounter == nil {
    		t.Fatalf("Got a nil Mounter")
    	}
    
    	vName, err := plugin.GetVolumeName(volume.NewSpecFromVolume(volumeSpec))
    	if err != nil {
    		t.Errorf("Failed to GetVolumeName: %v", err)
    	}
    	if vName != "test_volume_name/test_configmap_name" {
    		t.Errorf("Got unexpected VolumeName %v", vName)
    	}
    
    	volumePath := mounter.GetPath()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Sep 16 11:12:06 UTC 2022
    - 19.9K bytes
    - Viewed (0)
  2. pkg/controller/volume/attachdetach/testing/testvolumespec.go

    }
    
    func (plugin *TestPlugin) GetPluginName() string {
    	return TestPluginName
    }
    
    func (plugin *TestPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	plugin.pluginLock.Lock()
    	defer plugin.pluginLock.Unlock()
    	if spec == nil {
    		plugin.ErrorEncountered = true
    		return "", fmt.Errorf("GetVolumeName called with nil volume spec")
    	}
    	if spec.Volume != nil {
    		return spec.Name(), nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 17 08:48:30 UTC 2023
    - 16.5K bytes
    - Viewed (0)
  3. pkg/volume/csi/csi_test.go

    					t.Fatal("csiTest.VolumeAll failed to create new detacher: ", err)
    				}
    
    				t.Log("csiTest.VolumeAll preparing detacher.Detach...")
    				volName, err := volPlug.GetVolumeName(volSpec)
    				if err != nil {
    					t.Fatal("csiTest.VolumeAll volumePlugin.GetVolumeName failed:", err)
    				}
    				csiDetacher := getCsiAttacherFromVolumeDetacher(volDetacher, test.watchTimeout)
    				csiDetacher.csiClient = csiClient
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 15:55:13 UTC 2022
    - 21.1K bytes
    - Viewed (0)
  4. pkg/volume/configmap/configmap.go

    	plugin.host = host
    	plugin.getConfigMap = host.GetConfigMapFunc()
    	return nil
    }
    
    func (plugin *configMapPlugin) GetPluginName() string {
    	return configMapPluginName
    }
    
    func (plugin *configMapPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	volumeSource, _ := getVolumeSource(spec)
    	if volumeSource == nil {
    		return "", fmt.Errorf("Spec does not reference a ConfigMap volume type")
    	}
    
    	return fmt.Sprintf(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 10K bytes
    - Viewed (0)
  5. pkg/volume/csi/csi_plugin.go

    	return CSIPluginName
    }
    
    // GetvolumeName returns a concatenated string of CSIVolumeSource.Driver<volNameSe>CSIVolumeSource.VolumeHandle
    // That string value is used in Detach() to extract driver name and volumeName.
    func (p *csiPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	csi, err := getPVSourceFromSpec(spec)
    	if err != nil {
    		return "", errors.New(log("plugin.GetVolumeName failed to extract volume source from spec: %v", err))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 29.2K bytes
    - Viewed (0)
  6. pkg/volume/downwardapi/downwardapi.go

    	plugin.host = host
    	return nil
    }
    
    func (plugin *downwardAPIPlugin) GetPluginName() string {
    	return downwardAPIPluginName
    }
    
    func (plugin *downwardAPIPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	volumeSource, _ := getVolumeSource(spec)
    	if volumeSource == nil {
    		return "", fmt.Errorf("Spec does not reference a DownwardAPI volume type")
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  7. pkg/volume/portworx/portworx.go

    		portworxClient: client,
    	}
    
    	return nil
    }
    
    func (plugin *portworxVolumePlugin) GetPluginName() string {
    	return portworxVolumePluginName
    }
    
    func (plugin *portworxVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	volumeSource, _, err := getVolumeSource(spec)
    	if err != nil {
    		return "", err
    	}
    
    	return volumeSource.VolumeID, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  8. pkg/volume/projected/projected.go

    	plugin.deleteServiceAccountToken = host.DeleteServiceAccountTokenFunc()
    	return nil
    }
    
    func (plugin *projectedPlugin) GetPluginName() string {
    	return projectedPluginName
    }
    
    func (plugin *projectedPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	_, _, err := getVolumeSource(spec)
    	if err != nil {
    		return "", err
    	}
    
    	return spec.Name(), nil
    }
    
    func (plugin *projectedPlugin) CanSupport(spec *volume.Spec) bool {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  9. pkg/volume/volume.go

    // Detacher can detach a volume from a node.
    type Detacher interface {
    	DeviceUnmounter
    	// Detach the given volume from the node with the given Name.
    	// volumeName is name of the volume as returned from plugin's
    	// GetVolumeName().
    	Detach(volumeName string, nodeName types.NodeName) error
    }
    
    // DeviceUnmounter can unmount a block volume from the global path.
    type DeviceUnmounter interface {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. pkg/volume/hostpath/host_path.go

    	plugin.host = host
    	return nil
    }
    
    func (plugin *hostPathPlugin) GetPluginName() string {
    	return hostPathPluginName
    }
    
    func (plugin *hostPathPlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	volumeSource, _, err := getVolumeSource(spec)
    	if err != nil {
    		return "", err
    	}
    
    	return volumeSource.Path, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 15.3K bytes
    - Viewed (0)
Back to top