Interface NetworkApi
@Beta
@Path("/networks")
@Consumes("application/json")
@Produces("application/json")
public interface NetworkApi
Provides access to Network operations for the OpenStack Networking (Neutron) v2 API.
Each tenant can define one or more networks. A network is a virtual isolated layer-2 broadcast domain reserved to the
tenant. A tenant can create several ports for a network, and plug virtual interfaces into these ports.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate
(Network.CreateNetwork network) Create a new network with the specified typecom.google.common.collect.FluentIterable
<Network> createBulk
(com.google.common.collect.ImmutableList<Network.CreateNetwork> networks) Create multiple networksboolean
Deletes the specified networkReturn a specific networklist()
Returns all networks currently defined in Neutron for the current tenant.list
(PaginationOptions options) update
(String id, Network.UpdateNetwork network) Update a network
-
Method Details
-
list
Returns all networks currently defined in Neutron for the current tenant.- Returns:
- the list of all networks configured for the tenant
-
list
- See Also:
-
get
Return a specific network- Parameters:
id
- the id of the network to return- Returns:
- Network or null if not found
-
create
Create a new network with the specified type- Parameters:
network
- Describes the network to be created.- Returns:
- a reference of the newly-created network
-
createBulk
@Named("network:createBulk") @POST com.google.common.collect.FluentIterable<Network> createBulk(com.google.common.collect.ImmutableList<Network.CreateNetwork> networks) Create multiple networks- Parameters:
networks
- the bulk of networks to create- Returns:
- list of references of the newly-created networks
-
update
@Named("network:update") @PUT @Path("/{id}") Network update(@PathParam("id") String id, Network.UpdateNetwork network) Update a network- Parameters:
id
- the id of the network to updatenetwork
- the network to update- Returns:
- true if update successful, false if not
-
delete
Deletes the specified network- Parameters:
id
- the id of the network to delete- Returns:
- true if delete was successful, false if not
-