Class TrunkServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.networking.internal.BaseNetworkingServices
-
- org.openstack4j.openstack.networking.internal.TrunkServiceImpl
-
- All Implemented Interfaces:
TrunkService,RestService
public class TrunkServiceImpl extends BaseNetworkingServices implements TrunkService
OpenStack Network Trunk operations implementation- Author:
- Kashyap Jha
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstack4j.openstack.internal.BaseOpenStackService
BaseOpenStackService.Invocation<R>
-
-
Constructor Summary
Constructors Constructor Description TrunkServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TrunkaddTrunkSubport(String trunkId, TrunkSubport subPort)Adds a subport to the specified TrunkTrunkcreate(Trunk trunk)Creates a trunkActionResponsedelete(String trunkId)Delete a trunkTrunkget(String trunkId)Get a trunk by IDList<? extends Trunk>list()Lists all trunksList<NeutronTrunkSubport>listTrunkSubports(String trunkId)List the subports associated with the trunkTrunkremoveTrunkSubport(String trunkId, String portId)Removes subport from the specified trunkTrunkupdate(Trunk trunk)Updates a trunk object-
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 Trunk> list()
Lists all trunks- Specified by:
listin interfaceTrunkService- Returns:
- a list of trunks
-
create
public Trunk create(Trunk trunk)
Creates a trunk- Specified by:
createin interfaceTrunkService- Parameters:
trunk- the trunk to create- Returns:
- the created trunk object
-
get
public Trunk get(String trunkId)
Get a trunk by ID- Specified by:
getin interfaceTrunkService- Parameters:
trunkId- the trunk ID- Returns:
- the trunk object
-
delete
public ActionResponse delete(String trunkId)
Delete a trunk- Specified by:
deletein interfaceTrunkService- Parameters:
trunkId- ID of the trunk- Returns:
- action response
-
update
public Trunk update(Trunk trunk)
Updates a trunk object- Specified by:
updatein interfaceTrunkService- Parameters:
trunk- the trunk object to update- Returns:
- the updated trunk object
-
addTrunkSubport
public Trunk addTrunkSubport(String trunkId, TrunkSubport subPort)
Adds a subport to the specified Trunk- Specified by:
addTrunkSubportin interfaceTrunkService- Parameters:
trunkId- ID of the trunksubPort- subport object to add- Returns:
- the updated trunk object
-
removeTrunkSubport
public Trunk removeTrunkSubport(String trunkId, String portId)
Removes subport from the specified trunk- Specified by:
removeTrunkSubportin interfaceTrunkService- Parameters:
trunkId- trunk IDportId- the ID of the subport to remove- Returns:
- trunk object with the subport removed
-
listTrunkSubports
public List<NeutronTrunkSubport> listTrunkSubports(String trunkId)
List the subports associated with the trunk- Specified by:
listTrunkSubportsin interfaceTrunkService- Parameters:
trunkId- trunk ID- Returns:
- a list of subports
-
-