use of com.sequenceiq.cloudbreak.domain.Credential in project cloudbreak by hortonworks.
the class CredentialController method getPublic.
@Override
public CredentialResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Credential credentials = credentialService.getPublicCredential(name, user);
return convert(credentials);
}
use of com.sequenceiq.cloudbreak.domain.Credential in project cloudbreak by hortonworks.
the class CredentialController method getPrivates.
@Override
public Set<CredentialResponse> getPrivates() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<Credential> credentials = credentialService.retrievePrivateCredentials(user);
return convertCredentials(credentials);
}
use of com.sequenceiq.cloudbreak.domain.Credential in project cloudbreak by hortonworks.
the class CredentialController method createCredential.
private CredentialResponse createCredential(IdentityUser user, CredentialRequest credentialRequest, boolean publicInAccount) {
Credential credential = convert(credentialRequest, publicInAccount);
credential = credentialService.create(user, credential);
return convert(credential);
}
use of com.sequenceiq.cloudbreak.domain.Credential in project cloudbreak by hortonworks.
the class CredentialController method getPrivate.
@Override
public CredentialResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Credential credentials = credentialService.getPrivateCredential(name, user);
return convert(credentials);
}
use of com.sequenceiq.cloudbreak.domain.Credential in project cloudbreak by hortonworks.
the class DefaultStackHostServiceTypeTest method stack.
private Stack stack(Status stackStatus, Status clusterStatus) {
Credential gcpCredential = new Credential();
Stack stack = new Stack();
stack.setName("simplestack");
stack.setStackStatus(new StackStatus(stack, stackStatus, "", DetailedStackStatus.UNKNOWN));
stack.setCredential(gcpCredential);
stack.setId(1L);
Cluster cluster = new Cluster();
cluster.setStatus(clusterStatus);
cluster.setId(1L);
stack.setCluster(cluster);
return stack;
}
Aggregations