Skip to content

skavanagh/openshift-java-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenShift Java Client

Java client for the OpenShift REST API. It pretty much offers all features that are currently available in the rhc-* command line tools (create/rename a domain, create/destroy applications, list applications, list available cartridges, add cartridges, etc.). This client is used by JBoss Tools for OpenShift.

Usage

An exemplary usage of the client may look like the following:

	IOpenShiftConnection connection = 
			new OpenShiftConnectionFactory().getConnection("myApplicationId", "user", "password");
	IUser user = connection.getUser();
	IDomain domain = user.createDomain("myDomain");
	IApplication as7Application = domain.createApplication("myApplication", LatestVersionOf.jbossAs().get(user));
	IEmbeddedCartridge mySqlCartridge = as7Application.addEmbeddableCartridge(LatestVersionOf.mySQL().get(user));
	String unstructuredCredentials = mySqlCartridge.getCreationLog();
	String mySqlConnectionUrl = mySqlCartridge.getUrl();

There are also 2 blog posts on jboss.org which discuss the API in more details:

Most insightful are the integration tests within the library which pretty much use the API in all details:

  • ApplicationResourceIntegrationTest
  • DomainResourceIntegrationTest
  • EmbeddedCartridgeResourceIntegrationTest
  • etc.

Download

You may either build from source using maven (mvn clean package) or get the prebuilt artifact from the maven central.

About

Java Client for the OpenShift REST API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 99.9%
  • Shell 0.1%