Cyberduck Mountain Duck CLI

Changeset 14145


Ignore:
Timestamp:
Dec 13, 2013 10:26:34 AM (6 years ago)
Author:
dkocher
Message:

Read RAX-AUTH:defaultRegion.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/ch/cyberduck/core/openstack/SwiftRegionService.java

    r13920 r14145  
    6060            throw new InteroperabilityException("No region found in authentication context");
    6161        }
     62        for(Region region : session.getClient().getRegions()) {
     63            if(region.isDefault()) {
     64                log.warn(String.format("Fallback to default region %s", region.getRegionId()));
     65                return region;
     66            }
     67        }
    6268        final Region region = session.getClient().getRegions().iterator().next();
    63         log.warn(String.format("Fallback to first region found %s", region.getRegionId()));
     69        log.warn(String.format("Fallback to first region %s", region.getRegionId()));
    6470        if(null == region.getStorageUrl()) {
    6571            throw new InteroperabilityException(String.format("No storage endpoint found for region %s", region.getRegionId()));
Note: See TracChangeset for help on using the changeset viewer.
swiss made software