Search in sources :

Example 1 with EnvironmentAuthenticationRequest

use of com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentAuthenticationRequest in project cloudbreak by hortonworks.

the class EnvironmentApiConverterTest method createAuthenticationRequest.

private EnvironmentAuthenticationRequest createAuthenticationRequest() {
    EnvironmentAuthenticationRequest authenticationRequest = new EnvironmentAuthenticationRequest();
    authenticationRequest.setPublicKey(" public-\nkey ");
    authenticationRequest.setPublicKeyId("my-public-key-id");
    authenticationRequest.setLoginUserName("cloudbreak");
    return authenticationRequest;
}
Also used : EnvironmentAuthenticationRequest(com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentAuthenticationRequest)

Example 2 with EnvironmentAuthenticationRequest

use of com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentAuthenticationRequest in project cloudbreak by hortonworks.

the class EnvironmentChangeAuthenticationAction method action.

@Override
public EnvironmentTestDto action(TestContext testContext, EnvironmentTestDto testDto, EnvironmentClient environmentClient) throws Exception {
    EnvironmentEditRequest request = new EnvironmentEditRequest();
    EnvironmentAuthenticationRequest environmentAuthenticationRequest = new EnvironmentAuthenticationRequest();
    environmentAuthenticationRequest.setPublicKey(testDto.getRequest().getAuthentication().getPublicKey());
    environmentAuthenticationRequest.setPublicKeyId(testDto.getRequest().getAuthentication().getPublicKeyId());
    request.setAuthentication(environmentAuthenticationRequest);
    testDto.setResponse(environmentClient.getDefaultClient().environmentV1Endpoint().editByCrn(testDto.getResponse().getCrn(), request));
    Log.when(LOGGER, "Environment edit authentication action posted");
    return testDto;
}
Also used : EnvironmentAuthenticationRequest(com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentAuthenticationRequest) EnvironmentEditRequest(com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentEditRequest)

Aggregations

EnvironmentAuthenticationRequest (com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentAuthenticationRequest)2 EnvironmentEditRequest (com.sequenceiq.environment.api.v1.environment.model.request.EnvironmentEditRequest)1