Roe hit
Roe hit

Reputation: 467

Is it optimal to connect to Openshift through its REST services or through a CLI script?

I've been writing an Openshift client in Java and wanted to find out if the CLIs internally call the REST services in which case, I can try to use the REST services directly. I'm using Openshift 3.1

I'm connecting to openshift the following way by creating a factory which refers the .conf file. I'm creating the connection from a connection factory. I wanted to know if CLI is optimal or is it a Java client that is.

final OpenShiftConnectionFactory connectionFactory = new OpenShiftConnectionFactory();

IOpenShiftConnection connection2 = new OpenShiftConnectionFactory()
      .getConnection("domain", "user", "password");

PS: If anyone has written any other Openshift client or has an example , if you can give me a short overview on your approach, that's great too.

Upvotes: 1

Views: 271

Answers (1)

Oligzeev
Oligzeev

Reputation: 511

openshift-java-client is a useful tool to make java openshift client and can save a couple of days. Definitely it's optimal in terms of LOE and rewrite all that stuff unnecessarily. However, make attantion that Openshift CLI wrote on GO, so openshift's CLI should be more optimal in terms of resources usage, but inside it's basically REST client.

In summary, if you prefer java and If you're making CLI (not front-end) and not have high NFRs, I suggest to stay on java and openshift-java-client.

Upvotes: 1

Related Questions