Skip to content

E2e: Enable bring your own OpenStack #1700

@lentzi90

Description

@lentzi90

/kind feature

Describe the solution you'd like

Our e2e tests currently require OpenStack admin credentials. My understanding is that it is only required for creating the volume type here:

func createTestVolumeType(e2eCtx *shared.E2EContext) {
providerClient, clientOpts, _, err := shared.GetAdminProviderClient(e2eCtx)
Expect(err).NotTo(HaveOccurred())
volumeClient, err := openstack.NewBlockStorageV3(providerClient, gophercloud.EndpointOpts{Region: clientOpts.RegionName})
Expect(err).NotTo(HaveOccurred())
shared.Logf("Creating test volume type")
_, err = volumetypes.Create(volumeClient, &volumetypes.CreateOpts{
Name: e2eCtx.E2EConfig.GetVariable(shared.OpenStackVolumeTypeAlt),
Description: "Test volume type",
IsPublic: pointer.Bool(true),
ExtraSpecs: map[string]string{},
}).Extract()
if capoerrors.IsConflict(err) {
shared.Logf("Volume type already exists. This may happen in development environments, but it is not expected in CI.")
return
}
Expect(err).NotTo(HaveOccurred())
}

If possible, I would like to change this so that the volume type can be pre-existing and configured like the other OpenStack variables. This would make it possible to run the e2e tests without OpenStack admin credentials, e.g. against a public OpenStack cloud.

Anything else you would like to add:
This should be a pretty good first issue.
/help

Metadata

Metadata

Assignees

Labels

good first issueDenotes an issue ready for a new contributor, according to the "help wanted" guidelines.help wantedDenotes an issue that needs help from a contributor. Must meet "help wanted" guidelines.kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions