Class KeypairServiceImpl
- java.lang.Object
-
- org.openstack4j.openstack.internal.BaseOpenStackService
-
- org.openstack4j.openstack.compute.internal.BaseComputeServices
-
- org.openstack4j.openstack.compute.internal.KeypairServiceImpl
-
- All Implemented Interfaces:
KeypairService,RestService
public class KeypairServiceImpl extends BaseComputeServices implements KeypairService
Keypair Service manages SSH Keys within OpenStack Compute (Nova).- 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 KeypairServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Keypaircreate(String name, String publicKey)Generates or imports a keypairActionResponsedelete(String name)Deletes the keypair by nameKeypairget(String name)Gets the keypair by nameList<? extends Keypair>list()Lists keypairs that are associated with the account making the request-
Methods inherited from class org.openstack4j.openstack.compute.internal.BaseComputeServices
invokeAction, invokeActionWithResponse
-
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 Keypair> list()
Lists keypairs that are associated with the account making the request- Specified by:
listin interfaceKeypairService- Returns:
- the list of keypairs
-
get
public Keypair get(String name)
Gets the keypair by name- Specified by:
getin interfaceKeypairService- Parameters:
name- the keypair name- Returns:
- the keypair
-
delete
public ActionResponse delete(String name)
Deletes the keypair by name- Specified by:
deletein interfaceKeypairService- Parameters:
name- the keypair name- Returns:
- the action response
-
create
public Keypair create(String name, @Nullable String publicKey)
Generates or imports a keypair- Specified by:
createin interfaceKeypairService- Parameters:
name- the name of the keypairpublicKey- the public key (optional), Null indicates one will be generated- Returns:
- the newly created keypair
-
-