blob: 70f1d198eaa3753ac255290db65b40860b5e7393 [file] [log] [blame]
/**
* 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.openstack.quantum.v1_0;
import java.util.Set;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.location.Region;
import org.jclouds.location.functions.RegionToEndpoint;
import org.jclouds.openstack.quantum.v1_0.features.NetworkAsyncApi;
import org.jclouds.openstack.quantum.v1_0.features.PortAsyncApi;
import org.jclouds.rest.annotations.Delegate;
import org.jclouds.rest.annotations.EndpointParam;
import com.google.inject.Provides;
/**
* Provides asynchronous access to Quantum via their REST API.
* <p/>
*
* @see QuantumApi
* @see <a href="http://docs.openstack.org/api/openstack-network/1.0/content">api doc</a>
* @author Adam Lowe
*/
public interface QuantumAsyncApi {
/**
*
* @return the Region codes configured
*/
@Provides
@Region
Set<String> getConfiguredRegions();
/**
* Provides asynchronous access to Network features.
*/
@Delegate
NetworkAsyncApi getNetworkApiForRegion(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region);
/**
* Provides asynchronous access to Port features.
*/
@Delegate
@Path("/networks/{net}")
PortAsyncApi getPortApiForRegionAndNetwork(@EndpointParam(parser = RegionToEndpoint.class) @Nullable String region,
@PathParam("net") String networkId);
}