We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0e22825 + a55d220 commit d886a78Copy full SHA for d886a78
modules/openstack/openstack.go
@@ -40,20 +40,25 @@ type AuthOpts struct {
40
TenantName string
41
DomainName string
42
Region string
43
+ Scope *gophercloud.AuthScope
44
}
45
46
// NewOpenStack creates a new new instance of the openstack struct from a config struct
47
func NewOpenStack(
48
log logr.Logger,
49
cfg AuthOpts,
50
) (*OpenStack, error) {
51
+
52
opts := gophercloud.AuthOptions{
53
IdentityEndpoint: cfg.AuthURL,
54
Username: cfg.Username,
55
Password: cfg.Password,
56
TenantName: cfg.TenantName,
57
DomainName: cfg.DomainName,
58
59
+ if cfg.Scope != nil {
60
+ opts.Scope = cfg.Scope
61
+ }
62
63
provider, err := openstack.AuthenticatedClient(opts)
64
if err != nil {
0 commit comments