vendor update for CSI 0.3.0

This commit is contained in:
gman
2018-07-18 16:47:22 +02:00
parent 6f484f92fc
commit 8ea659f0d5
6810 changed files with 438061 additions and 193861 deletions

View File

@ -417,7 +417,7 @@ func (c *sioClient) WaitForAttachedDevice(token string) (string, error) {
return "", err
}
go func() {
glog.V(4).Infof(log("waiting for volume %s to be mapped/attached", token))
glog.V(4).Info(log("waiting for volume %s to be mapped/attached", token))
}()
if path, ok := devMap[token]; ok {
glog.V(4).Info(log("device %s mapped to vol %s", path, token))
@ -451,7 +451,7 @@ func (c *sioClient) WaitForDetachedDevice(token string) error {
return err
}
go func() {
glog.V(4).Infof(log("waiting for volume %s to be unmapped/detached", token))
glog.V(4).Info(log("waiting for volume %s to be unmapped/detached", token))
}()
// cant find vol id, then ok.
if _, ok := devMap[token]; !ok {

View File

@ -27,7 +27,6 @@ import (
)
const (
sioName = "scaleio"
sioPluginName = "kubernetes.io/scaleio"
sioConfigFileName = "sioconf.dat"
)

View File

@ -159,11 +159,11 @@ func TestUtilSaveConfig(t *testing.T) {
confKey.sslEnabled: "false",
}
if err := saveConfig(config, data); err != nil {
t.Fatal("failed while saving data", err)
t.Fatalf("failed while saving data: %v", err)
}
file, err := os.Open(config)
if err != nil {
t.Fatal("failed to open conf file: ", file)
t.Fatalf("failed to open conf file %s: %v", config, err)
}
defer file.Close()
dataRcvd := map[string]string{}

View File

@ -252,13 +252,17 @@ func (v *sioVolume) Delete() error {
// ************************
var _ volume.Provisioner = &sioVolume{}
func (v *sioVolume) Provision() (*api.PersistentVolume, error) {
func (v *sioVolume) Provision(selectedNode *api.Node, allowedTopologies []api.TopologySelectorTerm) (*api.PersistentVolume, error) {
glog.V(4).Info(log("attempting to dynamically provision pvc %v", v.options.PVC.Name))
if !util.AccessModesContainedInAll(v.plugin.GetAccessModes(), v.options.PVC.Spec.AccessModes) {
return nil, fmt.Errorf("invalid AccessModes %v: only AccessModes %v are supported", v.options.PVC.Spec.AccessModes, v.plugin.GetAccessModes())
}
if util.CheckPersistentVolumeClaimModeBlock(v.options.PVC) {
return nil, fmt.Errorf("%s does not support block volume provisioning", v.plugin.GetPluginName())
}
// setup volume attrributes
genName := v.generateName("k8svol", 11)
var oneGig int64 = 1024 * 1024 * 1024

View File

@ -296,7 +296,7 @@ func TestVolumeProvisioner(t *testing.T) {
}
sioVol.sioMgr.client = sio
spec, err := provisioner.Provision()
spec, err := provisioner.Provision(nil, nil)
if err != nil {
t.Fatalf("call to Provision() failed: %v", err)
}
@ -467,7 +467,7 @@ func TestVolumeProvisionerWithZeroCapacity(t *testing.T) {
}
sioVol.sioMgr.client = sio
_, err = provisioner.Provision()
_, err = provisioner.Provision(nil, nil)
if err == nil {
t.Fatalf("call to Provision() should fail with invalid capacity")
}
@ -516,7 +516,7 @@ func TestVolumeProvisionerWithSecretNamespace(t *testing.T) {
}
sioVol.sioMgr.client = sio
spec, err := sioVol.Provision()
spec, err := sioVol.Provision(nil, nil)
if err != nil {
t.Fatalf("call to Provision() failed: %v", err)
}