mirror of https://github.com/apache/jclouds.git
Issue 674: fixed merge problem
This commit is contained in:
parent
de19f777a6
commit
7f3ca1ad70
|
@ -25,6 +25,7 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.inject.Singleton;
|
import javax.inject.Singleton;
|
||||||
|
|
||||||
|
@ -48,9 +49,11 @@ import org.jclouds.ec2.services.SecurityGroupAsyncClient;
|
||||||
import org.jclouds.ec2.services.SecurityGroupClient;
|
import org.jclouds.ec2.services.SecurityGroupClient;
|
||||||
import org.jclouds.ec2.services.WindowsAsyncClient;
|
import org.jclouds.ec2.services.WindowsAsyncClient;
|
||||||
import org.jclouds.ec2.services.WindowsClient;
|
import org.jclouds.ec2.services.WindowsClient;
|
||||||
|
import org.jclouds.http.HttpResponseException;
|
||||||
import org.jclouds.http.RequiresHttp;
|
import org.jclouds.http.RequiresHttp;
|
||||||
import org.jclouds.location.Region;
|
import org.jclouds.location.Region;
|
||||||
import org.jclouds.location.Zone;
|
import org.jclouds.location.Zone;
|
||||||
|
import org.jclouds.logging.Logger;
|
||||||
import org.jclouds.rest.ConfiguresRestClient;
|
import org.jclouds.rest.ConfiguresRestClient;
|
||||||
|
|
||||||
import com.google.common.base.Predicates;
|
import com.google.common.base.Predicates;
|
||||||
|
@ -133,6 +136,20 @@ public class EC2RestClientModule<S extends EC2Client, A extends EC2AsyncClient>
|
||||||
}
|
}
|
||||||
|
|
||||||
@Singleton
|
@Singleton
|
||||||
|
public static class RegionIdToZoneId implements javax.inject.Provider<Map<String, String>> {
|
||||||
|
@Resource
|
||||||
|
protected Logger logger = Logger.NULL;
|
||||||
|
|
||||||
|
private final AvailabilityZoneAndRegionClient client;
|
||||||
|
private final Map<String, URI> regions;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
public RegionIdToZoneId(EC2Client client, @Region Map<String, URI> regions) {
|
||||||
|
this.client = client.getAvailabilityZoneAndRegionServices();
|
||||||
|
this.regions = regions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Singleton
|
||||||
@Zone
|
@Zone
|
||||||
@Override
|
@Override
|
||||||
public Map<String, String> get() {
|
public Map<String, String> get() {
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
/**
|
||||||
|
* Licensed to jclouds, Inc. (jclouds) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file
|
||||||
|
* distributed with this work for additional information
|
||||||
|
* regarding copyright ownership. jclouds licenses this file
|
||||||
|
* to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance
|
||||||
|
* with the License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
package org.jclouds.ec2.config;
|
package org.jclouds.ec2.config;
|
||||||
|
|
||||||
import static org.easymock.classextension.EasyMock.*;
|
import static org.easymock.classextension.EasyMock.*;
|
||||||
|
|
Loading…
Reference in New Issue