Add region label to dynamic provisioned cinder PVs

This commit is contained in:
Seungcheol Ko
2018-07-09 21:55:03 +09:00
parent 86b9a53226
commit 1df1181b4f
5 changed files with 19 additions and 13 deletions

View File

@@ -104,6 +104,7 @@ func TestReadConfig(t *testing.T) {
auth-url = http://auth.url
user-id = user
tenant-name = demo
region = RegionOne
[LoadBalancer]
create-monitor = yes
monitor-delay = 1m
@@ -136,6 +137,10 @@ func TestReadConfig(t *testing.T) {
t.Errorf("incorrect tenant name: %s", cfg.Global.TenantName)
}
if cfg.Global.Region != "RegionOne" {
t.Errorf("incorrect region: %s", cfg.Global.Region)
}
if !cfg.LoadBalancer.CreateMonitor {
t.Errorf("incorrect lb.createmonitor: %t", cfg.LoadBalancer.CreateMonitor)
}
@@ -554,7 +559,7 @@ func TestVolumes(t *testing.T) {
tags := map[string]string{
"test": "value",
}
vol, _, _, err := os.CreateVolume("kubernetes-test-volume-"+rand.String(10), 1, "", "", &tags)
vol, _, _, _, err := os.CreateVolume("kubernetes-test-volume-"+rand.String(10), 1, "", "", &tags)
if err != nil {
t.Fatalf("Cannot create a new Cinder volume: %v", err)
}