File tree Expand file tree Collapse file tree 1 file changed +2
-31
lines changed
cloud-control-manager/cloud-driver/drivers/azure Expand file tree Collapse file tree 1 file changed +2
-31
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,11 @@ package azure
1212
1313import (
1414 "context"
15- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
16- "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
1715 "os"
1816 "time"
1917
18+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
19+ "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
2020 "github.com/Azure/azure-sdk-for-go/sdk/azcore"
2121 "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
2222 "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
@@ -305,35 +305,6 @@ func (driver *AzureDriver) ConnectCloud(connectionInfo idrv.ConnectionInfo) (ico
305305 AccountsClient : accountsClient ,
306306 }
307307
308- regionZoneHandler , err := iConn .CreateRegionZoneHandler ()
309- if err != nil {
310- return nil , err
311- }
312- regionZoneInfo , err := regionZoneHandler .GetRegionZone (connectionInfo .RegionInfo .Region )
313- if err != nil {
314- return nil , err
315- }
316-
317- if len (regionZoneInfo .ZoneList ) == 0 {
318- cblog .Warn ("Zone is not available for this region. (" + connectionInfo .RegionInfo .Region + ")" )
319- iConn .Region .Zone = ""
320- } else {
321- var zoneFound bool
322- for _ , zone := range regionZoneInfo .ZoneList {
323- if zone .Name == connectionInfo .RegionInfo .Zone {
324- zoneFound = true
325- break
326- }
327- }
328-
329- if ! zoneFound {
330- cblog .Warn ("Configured zone is not found in the selected region." +
331- " (Region: " + connectionInfo .RegionInfo .Region + ", Zone: " + connectionInfo .RegionInfo .Zone + ")" )
332- cblog .Warn ("1 will be used as the default zone." )
333- iConn .Region .Zone = "1"
334- }
335- }
336-
337308 return & iConn , nil
338309}
339310
You can’t perform that action at this time.
0 commit comments