use of com.openshift.client.IOpenShiftConnection in project camel by apache.
the class OpenShiftHelper method loginAndGetDomain.
public static IDomain loginAndGetDomain(OpenShiftEndpoint endpoint, String openshiftServer) {
// grab all applications
IOpenShiftConnection connection = new OpenShiftConnectionFactory().getConnection(endpoint.getClientId(), endpoint.getUsername(), endpoint.getPassword(), openshiftServer);
IUser user = connection.getUser();
IDomain domain;
if (endpoint.getDomain() != null) {
domain = user.getDomain(endpoint.getDomain());
} else {
domain = user.getDefaultDomain();
}
return domain;
}
Aggregations