Commit c04f04c2 authored by Davanum Srinivas's avatar Davanum Srinivas

Ability to run the openstack tests against DevStack

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
parent 9af33988
......@@ -412,8 +412,26 @@ func configFromEnv() (cfg Config, ok bool) {
cfg.Global.Username = os.Getenv("OS_USERNAME")
cfg.Global.Password = os.Getenv("OS_PASSWORD")
cfg.Global.Region = os.Getenv("OS_REGION_NAME")
cfg.Global.TenantName = os.Getenv("OS_TENANT_NAME")
if cfg.Global.TenantName == "" {
cfg.Global.TenantName = os.Getenv("OS_PROJECT_NAME")
}
cfg.Global.TenantId = os.Getenv("OS_TENANT_ID")
if cfg.Global.TenantId == "" {
cfg.Global.TenantId = os.Getenv("OS_PROJECT_ID")
}
cfg.Global.DomainId = os.Getenv("OS_DOMAIN_ID")
if cfg.Global.DomainId == "" {
cfg.Global.DomainId = os.Getenv("OS_USER_DOMAIN_ID")
}
cfg.Global.DomainName = os.Getenv("OS_DOMAIN_NAME")
if cfg.Global.DomainName == "" {
cfg.Global.DomainName = os.Getenv("OS_USER_DOMAIN_NAME")
}
ok = (cfg.Global.AuthUrl != "" &&
cfg.Global.Username != "" &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment