Search in sources :

Example 1 with SshGenerateRequest

use of org.cloudfoundry.credhub.request.SshGenerateRequest in project credhub by cloudfoundry-incubator.

the class SshCredentialRegeneratable method createGenerateRequest.

@Override
public BaseCredentialGenerateRequest createGenerateRequest(CredentialVersion credentialVersion, List<EventAuditRecordParameters> auditRecordParameters) {
    SshCredentialVersion sshCredential = (SshCredentialVersion) credentialVersion;
    SshGenerateRequest generateRequest = new SshGenerateRequest();
    generateRequest.setName(sshCredential.getName());
    generateRequest.setType(sshCredential.getCredentialType());
    SshGenerationParameters generationParameters = new SshGenerationParameters();
    generationParameters.setSshComment(sshCredential.getComment());
    generateRequest.setGenerationParameters(generationParameters);
    generateRequest.setOverwrite(true);
    return generateRequest;
}
Also used : SshGenerateRequest(org.cloudfoundry.credhub.request.SshGenerateRequest) SshCredentialVersion(org.cloudfoundry.credhub.domain.SshCredentialVersion) SshGenerationParameters(org.cloudfoundry.credhub.request.SshGenerationParameters)

Aggregations

SshCredentialVersion (org.cloudfoundry.credhub.domain.SshCredentialVersion)1 SshGenerateRequest (org.cloudfoundry.credhub.request.SshGenerateRequest)1 SshGenerationParameters (org.cloudfoundry.credhub.request.SshGenerationParameters)1