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;
}
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;
}
Aggregations