Package org.openstack4j.api.networking
Interface SubnetService
-
- All Superinterfaces:
RestService
- All Known Implementing Classes:
SubnetServiceImpl
public interface SubnetService extends RestService
OpenStack (Neutron) Subnet based Operations- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Subnetcreate(Subnet subnet)Creates a new SubnetActionResponsedelete(String subnetId)Delete a Subnet by IDSubnetget(String subnetId)Gets a Subnet by IDList<? extends Subnet>list()List all the Subnet(s) which are authorized by the current TenantSubnetupdate(String subnetId, Subnet subnet)This method is needed if you are updating a subnet without pre-fetching the subnet prior.Subnetupdate(Subnet subnet)Updates a Subnet.
-
-
-
Method Detail
-
list
List<? extends Subnet> list()
List all the Subnet(s) which are authorized by the current Tenant- Returns:
- the list of subnets or empty
-
get
Subnet get(String subnetId)
Gets a Subnet by ID- Parameters:
subnetId- the subnet identifier- Returns:
- the Subnet or null if not found
-
delete
ActionResponse delete(String subnetId)
Delete a Subnet by ID- Parameters:
subnetId- the subnet identifier to delete- Returns:
- the action response
-
create
Subnet create(Subnet subnet)
Creates a new Subnet- Parameters:
subnet- the subnet to create- Returns:
- the newly created subnet
-
update
Subnet update(Subnet subnet)
Updates a Subnet.Example:
Subnet updateSN = update(existingSubnet.toBuilder().someChange(change).build());- Parameters:
subnet- the subnet to update- Returns:
- the new subnet info
-
update
Subnet update(String subnetId, Subnet subnet)
This method is needed if you are updating a subnet without pre-fetching the subnet prior. See example at update(Subnet)- Parameters:
subnetId- the subnet identifier to updatesubnet- the subnet to update- Returns:
- the updated subnet
-
-