Skip to content
This repository was archived by the owner on Mar 22, 2018. It is now read-only.

Commit c8860a4

Browse files
author
Kubernetes Submit Queue
authored
Merge pull request #53510 from dims/run-tests-with-devstack
Automatic merge from submit-queue (batch tested with PRs 52768, 51898, 53510, 53097, 53058). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Ability to run the openstack tests against DevStack **What this PR does / why we need it**: Some of the environment variables have changed as devstack defaults have changed. So look for the older env variables first and try the newer ones later. At a minimum you need the following for v3 authentication which is the default with latest devstack. If you miss the Tenant information then the token issued will be a unscoped token (and will not have any service catalog information). OS_AUTH_URL=http://192.168.0.42/identity OS_REGION_NAME=RegionOne OS_USERNAME=demo OS_PASSWORD=supersecret OS_TENANT_NAME=demo OS_USER_DOMAIN_ID=default **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
2 parents 8707a36 + af69115 commit c8860a4

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

pkg/cloudprovider/providers/openstack/openstack_test.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,26 @@ func configFromEnv() (cfg Config, ok bool) {
411411
cfg.Global.Username = os.Getenv("OS_USERNAME")
412412
cfg.Global.Password = os.Getenv("OS_PASSWORD")
413413
cfg.Global.Region = os.Getenv("OS_REGION_NAME")
414+
415+
cfg.Global.TenantName = os.Getenv("OS_TENANT_NAME")
416+
if cfg.Global.TenantName == "" {
417+
cfg.Global.TenantName = os.Getenv("OS_PROJECT_NAME")
418+
}
419+
420+
cfg.Global.TenantId = os.Getenv("OS_TENANT_ID")
421+
if cfg.Global.TenantId == "" {
422+
cfg.Global.TenantId = os.Getenv("OS_PROJECT_ID")
423+
}
424+
414425
cfg.Global.DomainId = os.Getenv("OS_DOMAIN_ID")
426+
if cfg.Global.DomainId == "" {
427+
cfg.Global.DomainId = os.Getenv("OS_USER_DOMAIN_ID")
428+
}
429+
415430
cfg.Global.DomainName = os.Getenv("OS_DOMAIN_NAME")
431+
if cfg.Global.DomainName == "" {
432+
cfg.Global.DomainName = os.Getenv("OS_USER_DOMAIN_NAME")
433+
}
416434

417435
ok = (cfg.Global.AuthUrl != "" &&
418436
cfg.Global.Username != "" &&

0 commit comments

Comments
 (0)