Skip to content

Commit 6e8eacb

Browse files
adapt patches to allow running csi without credentials
1 parent 7b1cf93 commit 6e8eacb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/csi/cinder/openstack/noop_openstack.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots"
2424
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
2525
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
26+
"k8s.io/apimachinery/pkg/util/wait"
2627
"k8s.io/cloud-provider-openstack/pkg/util/metadata"
2728
)
2829

@@ -31,6 +32,8 @@ type NoopOpenStack struct {
3132
metadataOpts metadata.Opts
3233
}
3334

35+
var _ IOpenStack = &NoopOpenStack{}
36+
3437
func (os *NoopOpenStack) CreateVolume(name string, size int, vtype, availability string, snapshotID string, sourceVolID string, sourceBackupID string, tags map[string]string) (*volumes.Volume, error) {
3538
return nil, fmt.Errorf("CreateVolume is not implemented for ephemeral storage in this configuration")
3639
}
@@ -63,6 +66,10 @@ func (os *NoopOpenStack) WaitVolumeTargetStatus(volumeID string, tStatus []strin
6366
return nil
6467
}
6568

69+
func (os *NoopOpenStack) WaitVolumeTargetStatusWithCustomBackoff(volumeID string, tStatus []string, backoff *wait.Backoff) error {
70+
return nil
71+
}
72+
6673
func (os *NoopOpenStack) DetachVolume(instanceID, volumeID string) error {
6774
return nil
6875
}

0 commit comments

Comments
 (0)