[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: OpenShift -Java _Client



Hi Shabna

IApplication#start
IApplication#stop
IApplication#stop(force)
IApplication#restart

Checking the app reached the targeted state is possible but not very handy yet. Some enhancements in this area would be nice (contributions are highly welcomed ;):
1) get the gear groups for a given app (IApplication#getGearGroups)
2) get all gears for each gear group (IGearGroup#getGears)
3) check the state of each gear (IGear#getState == "started" / "stopped") (states can be found here: http://openshift.github.io/documentation/oo_cartridge_developers_guide.html#the-code-status-code-action)

Cheers
André

On 07/15/2014 11:37 AM, Shabna M wrote:
Hi Andre

Just adding on to that ,is there a way provided by OpenShift java client to start,stop or restart a cartridge ?
I was not able to figure these methods.

Thanks for your support.
shabs


On Wed, Jul 9, 2014 at 12:51 PM, Shabna M <shabsrh gmail com> wrote:
Thanks for the respone.This is exactly what I was looking for!


On Mon, Jul 7, 2014 at 2:08 PM, André Dietisheim <adietish redhat com> wrote:
Hi Shabna

sorry for the late response, I was PTO last week.


On 07/02/2014 09:13 AM, Shabna M wrote:

Is there a way to set environment variable to an Open Shift Cartridge using Open Shift Java Client or any other way apart from rhc set env ?


yes you can using the openshift-java-client. There are several methods to list, add, remove env variables in a given application:

IApplication:
public Map<String, IEnvironmentVariable> getEnvironmentVariables() throws OpenShiftSSHOperationException
public String getEnvironmentVariableValue(String name)
public IEnvironmentVariable addEnvironmentVariable(String name, String value) throws OpenShiftException
public void removeEnvironmentVariable(String name) throws OpenShiftException;
etc.

Is this what you're looking for?

Cheers
André





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]