public interface OpenShiftHandle
| Modifier and Type | Method and Description |
|---|---|
void |
deletePod(String podName,
long gracePeriodSeconds)
Delete pod by name.
|
String |
exec(Map<String,String> labels,
int waitSeconds,
String... input) |
InputStream |
execute(int pod,
int port,
String path) |
InputStream |
execute(Map<String,String> labels,
int pod,
int port,
String path) |
InputStream |
execute(String podName,
int port,
String path) |
String |
getLog(String podName)
Get the logs for a given pod.
|
String |
getLog(String prefix,
Map<String,String> labels)
Get the logs for a given pod.
|
List<String> |
getPods()
Get all pods.
|
List<String> |
getPods(String prefix)
Get all pods.
|
Set<String> |
getReadyPods(String prefix)
Get ready pods.
|
<T> T |
jolokia(Class<T> expectedReturnType,
String podName,
Object input)
Input is on purpose plain Object.
|
void |
replacePods(String prefix,
int size,
int replicas)
Replace #size of pods via delete.
|
void |
scaleDeployment(String prefix,
int replicas)
Scale deployment to replicas.
|
InputStream |
streamLog(String podName)
Stream pod log into output stream.
|
void |
triggerDeploymentConfigUpdate(String prefix,
boolean wait)
Trigger deployment config update.
|
void |
triggerDeploymentConfigUpdate(String prefix,
boolean wait,
Map<String,String> variables)
Trigger deployment config update
|
String |
url(String podName,
int port,
String path,
String parameters) |
void |
waitForReadyPods(String prefix,
int replicas)
Wait for ready pods.
|
InputStream execute(String podName, int port, String path) throws Exception
ExceptionInputStream execute(int pod, int port, String path) throws Exception
ExceptionInputStream execute(Map<String,String> labels, int pod, int port, String path) throws Exception
ExceptionString exec(Map<String,String> labels, int waitSeconds, String... input) throws Exception
Exceptionvoid waitForReadyPods(String prefix, int replicas) throws Exception
prefix - the RC prefixreplicas - the expected size od ready podsException - for any errorvoid replacePods(String prefix, int size, int replicas) throws Exception
prefix - the RC prefixsize - the number of pods to replacereplicas - the number of exepcted replicas after replaceException - for any errorvoid scaleDeployment(String prefix, int replicas) throws Exception
prefix - the RC prefixreplicas - replicasException - for any errorString getLog(String podName) throws Exception
podName - the pod nameException - if a pod couldn't be found or if there's an error retrieving the logInputStream streamLog(String podName) throws Exception
podName - the pod nameException - for any errorString getLog(String prefix, Map<String,String> labels) throws Exception
prefix - Pod's name prefix, may be nulllabels - The labels for selecting the pod, may be nullException - if a pod couldn't be found or if there's an error retrieving the logSet<String> getReadyPods(String prefix) throws Exception
prefix - the prefixException - for any errorList<String> getPods() throws Exception
Exception - for any errorList<String> getPods(String prefix) throws Exception
prefix - RC name, if null all pods are returnedException - for any errorvoid deletePod(String podName, long gracePeriodSeconds) throws Exception
podName - pod namegracePeriodSeconds - grace period, -1 if none / defaultException - for any errorvoid triggerDeploymentConfigUpdate(String prefix, boolean wait) throws Exception
prefix - the deployment config prefixwait - wait until update is doneException - for any errorvoid triggerDeploymentConfigUpdate(String prefix, boolean wait, Map<String,String> variables) throws Exception
prefix - the deployment config prefixwait - wait until update is donevariables - Environment variables to insert into the deployment. If null
or empty, a dummy variable is inserted in order to trigger
the redeployment.Exception - for any errorCopyright © 2018 JBoss by Red Hat. All rights reserved.