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 0a97de4 commit fc9b9fb
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, 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 fc9b9fb

Please sign in to comment.