if (!env().bootstrapCarrierEnabled()) {
LOGGER.info("Carrier Bootstrap manually disabled.");
return Observable.error(new ConfigurationException("Carrier Bootstrap disabled through configuration."));
}
return cluster()
.<GetBucketConfigResponse>send(new GetBucketConfigRequest(bucket, hostname))
.map(new Func1<GetBucketConfigResponse, String>() {
@Override
public String call(GetBucketConfigResponse response) {
if (!response.status().isSuccess()) {
throw new IllegalStateException("Bucket config response did not return with success.");