Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for GetVolumeName (0.16 sec)

  1. pkg/volume/flexvolume/plugin_test.go

    		assertDriverCall(t, fakeVolumeNameOutput(spec.Name()), getVolumeNameCmd,
    			specJSON(plugin, spec, nil)),
    	)
    
    	name, err := plugin.GetVolumeName(spec)
    	if err != nil {
    		t.Errorf("GetVolumeName() failed: %v", err)
    	}
    	expectedName := spec.Name()
    	if name != expectedName {
    		t.Errorf("GetVolumeName() returned %v instead of %v", name, expectedName)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Dec 21 06:54:44 UTC 2019
    - 1.5K bytes
    - Viewed (0)
  2. pkg/volume/flexvolume/plugin.go

    	return plugin.driverName
    }
    
    // GetVolumeName is part of the volume.VolumePlugin interface.
    func (plugin *flexVolumePlugin) GetVolumeName(spec *volume.Spec) (string, error) {
    	call := plugin.NewDriverCall(getVolumeNameCmd)
    	call.AppendSpec(spec, plugin.host, nil)
    
    	_, err := call.Run()
    	if isCmdNotSupportedErr(err) {
    		return (*pluginDefaults)(plugin).GetVolumeName(spec)
    	} else if err != nil {
    		return "", err
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  3. pkg/volume/flexvolume/plugin-defaults.go

    func logPrefix(plugin *flexVolumePlugin) string {
    	return "flexVolume driver " + plugin.driverName + ": "
    }
    
    func (plugin *pluginDefaults) GetVolumeName(spec *volume.Spec) (string, error) {
    	klog.V(4).Info(logPrefix((*flexVolumePlugin)(plugin)), "using default GetVolumeName for volume ", spec.Name())
    	return spec.Name(), nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 13 13:42:07 UTC 2021
    - 1021 bytes
    - Viewed (0)
  4. 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)
  5. pkg/volume/noop_expandable_plugin.go

    	return nil
    }
    
    func (n *noopExpandableVolumePluginInstance) GetPluginName() string {
    	return n.spec.KubeletExpandablePluginName()
    }
    
    func (n *noopExpandableVolumePluginInstance) GetVolumeName(spec *Spec) (string, error) {
    	return n.spec.Name(), nil
    }
    
    func (n *noopExpandableVolumePluginInstance) CanSupport(spec *Spec) bool {
    	return true
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. pkg/volume/flexvolume/flexvolume_test.go

      echo -n '{
        "device": "{{.DevicePath}}",
        "status": "Success"
      }'
      exit 0
    elif [ "$1" == "detach" -a $# -eq 2 ]; then
      echo -n '{
        "status": "Success"
      }'
      exit 0
    elif [ "$1" == "getvolumename" -a $# -eq 4 ]; then
      echo -n '{
        "status": "Success",
        "volume": "fakevolume"
      }'
      exit 0
    elif [ "$1" == "isattached" -a $# -eq 2 ]; then
      echo -n '{
        "status": "Success",
        "attached": true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Aug 01 15:56:32 UTC 2022
    - 6.8K bytes
    - Viewed (0)
  7. 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)
  8. pkg/volume/plugins_test.go

    }
    
    func (plugin *testPlugins) Init(host VolumeHost) error {
    	return nil
    }
    
    func (plugin *testPlugins) GetPluginName() string {
    	return testPluginName
    }
    
    func (plugin *testPlugins) GetVolumeName(spec *Spec) (string, error) {
    	return "", nil
    }
    
    func (plugin *testPlugins) CanSupport(spec *Spec) bool {
    	return true
    }
    
    func (plugin *testPlugins) RequiresRemount(spec *Spec) bool {
    	return false
    }
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 14 06:17:25 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  9. pkg/volume/flexvolume/driver-call.go

    import (
    	"encoding/json"
    	"errors"
    	"fmt"
    	"time"
    
    	"k8s.io/klog/v2"
    
    	"k8s.io/kubernetes/pkg/volume"
    )
    
    const (
    	// Driver calls
    	initCmd          = "init"
    	getVolumeNameCmd = "getvolumename"
    
    	isAttached = "isattached"
    
    	attachCmd        = "attach"
    	waitForAttachCmd = "waitforattach"
    	mountDeviceCmd   = "mountdevice"
    
    	detachCmd        = "detach"
    	unmountDeviceCmd = "unmountdevice"
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 25 02:39:55 UTC 2021
    - 7.5K bytes
    - Viewed (0)
  10. 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)
Back to top