Class SubnetServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.networking.internal.BaseNetworkingServices
-
- org.openstack4j.openstack.networking.internal.SubnetServiceImpl
-
- All Implemented Interfaces:
SubnetService,RestService
public class SubnetServiceImpl extends BaseNetworkingServices implements SubnetService
OpenStack (Neutron) Subnet based Operations implementation- Author:
- Jeremy Unruh
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description SubnetServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete 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.-
Methods inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
delete, deleteWithResponse, get, getProvider, getServiceVersion, getWithResponse, getXOpenstackRequestId, head, patch, patchWithResponse, post, postWithResponse, put, putWithResponse, request, toList, uri
-
-
-
-
Method Detail
-
list
public List<? extends Subnet> list()
List all the Subnet(s) which are authorized by the current Tenant- Specified by:
listin interfaceSubnetService- Returns:
- the list of subnets or empty
-
get
public Subnet get(String subnetId)
Gets a Subnet by ID- Specified by:
getin interfaceSubnetService- Parameters:
subnetId- the subnet identifier- Returns:
- the Subnet or null if not found
-
delete
public ActionResponse delete(String subnetId)
Delete a Subnet by ID- Specified by:
deletein interfaceSubnetService- Parameters:
subnetId- the subnet identifier to delete- Returns:
- the action response
-
create
public Subnet create(Subnet subnet)
Description copied from interface:SubnetServiceCreates a new Subnet- Specified by:
createin interfaceSubnetService- Parameters:
subnet- the subnet to create- Returns:
- the newly created subnet
-
update
public Subnet update(Subnet subnet)
Description copied from interface:SubnetServiceUpdates a Subnet.Example:
Subnet updateSN = update(existingSubnet.toBuilder().someChange(change).build());- Specified by:
updatein interfaceSubnetService- Parameters:
subnet- the subnet to update- Returns:
- the new subnet info
-
update
public Subnet update(String subnetId, Subnet subnet)
Description copied from interface:SubnetServiceThis method is needed if you are updating a subnet without pre-fetching the subnet prior. See example at SubnetService.update(Subnet)- Specified by:
updatein interfaceSubnetService- Parameters:
subnetId- the subnet identifier to updatesubnet- the subnet to update- Returns:
- the updated subnet
-
-