mirror of https://github.com/apache/cloudstack.git
Change in awsapi to get Default Zone for the account during runInstances, CreateVolume etc.
- If zoneName is specified we use that - If not, we choos the default zone marked for the account - If no such default zone is found, fall back to choosing the first available zone.
This commit is contained in:
parent
af3758eb62
commit
48573deb1f
|
|
@ -1646,7 +1646,13 @@ public class EC2Engine {
|
|||
if ( null != zoneName) {
|
||||
interestedZones = new String[1];
|
||||
interestedZones[0] = zoneName;
|
||||
}else {
|
||||
CloudStackZone zone = findZone();
|
||||
if(zone != null){
|
||||
return zone.getId();
|
||||
}
|
||||
}
|
||||
|
||||
zones = listZones(interestedZones, domainId);
|
||||
|
||||
if (zones == null || zones.getZoneIdAt( 0 ) == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue