Skip to content

Commit

Permalink
adapt patches to allow running csi without credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelEischer committed Nov 13, 2024
1 parent 7b1cf93 commit 6e8eacb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/csi/cinder/openstack/noop_openstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/snapshots"
"github.com/gophercloud/gophercloud/openstack/blockstorage/v3/volumes"
"github.com/gophercloud/gophercloud/openstack/compute/v2/servers"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/cloud-provider-openstack/pkg/util/metadata"
)

Expand All @@ -31,6 +32,8 @@ type NoopOpenStack struct {
metadataOpts metadata.Opts
}

var _ IOpenStack = &NoopOpenStack{}

func (os *NoopOpenStack) CreateVolume(name string, size int, vtype, availability string, snapshotID string, sourceVolID string, sourceBackupID string, tags map[string]string) (*volumes.Volume, error) {
return nil, fmt.Errorf("CreateVolume is not implemented for ephemeral storage in this configuration")
}
Expand Down Expand Up @@ -63,6 +66,10 @@ func (os *NoopOpenStack) WaitVolumeTargetStatus(volumeID string, tStatus []strin
return nil
}

func (os *NoopOpenStack) WaitVolumeTargetStatusWithCustomBackoff(volumeID string, tStatus []string, backoff *wait.Backoff) error {
return nil
}

func (os *NoopOpenStack) DetachVolume(instanceID, volumeID string) error {
return nil
}
Expand Down

0 comments on commit 6e8eacb

Please sign in to comment.