public class OpenShiftAssistant extends KubernetesAssistant
applicationName, client, namespace| Modifier and Type | Method and Description |
|---|---|
void |
awaitApplicationReadinessOrFail()
Awaits at most 5 minutes until all pods of the last deployed application are running.
|
void |
awaitApplicationReadinessOrFail(String applicationName)
Awaits at most 5 minutes until all pods of the application are running.
|
void |
awaitUrl(URL routeUrl,
int... statusCodes)
Waits until the url responds with correct status code
|
void |
deploy(InputStream inputStream)
Deploys application reading resources from specified InputStream.
|
void |
deployApplication(String applicationName)
Deploys application finding resources in default location in classpath.
|
io.fabric8.openshift.api.model.v4_0.DeploymentConfig |
deploymentConfig()
Method that returns the current deployment configuration object
|
Optional<io.fabric8.openshift.api.model.v4_0.Project> |
findProject(String name)
Finds for the given project.
|
io.fabric8.openshift.clnt.v4_0.OpenShiftClient |
getClient() |
String |
getCurrentProjectName()
Gets the current OpenShift project used for deploying application.
|
Optional<URL> |
getRoute()
Returns the URL of the first route.
|
Optional<URL> |
getRoute(String routeName)
Gets the URL of the route with given name.
|
List<io.fabric8.openshift.api.model.v4_0.Project> |
listProjects()
Gets the list of all the OpenShift Projects.
|
boolean |
projectExists(String name)
Checks if the given project exists or not.
|
void |
scale(int replicas)
Scaling the last deployed application to given replicas
|
void |
scale(String applicationName,
int replicas)
Scaling the application to given replicas
|
OpenShiftAssistantTemplate |
usingTemplate(String templateURL)
Gets template URL string used for deploying application.
|
OpenShiftAssistantTemplate |
usingTemplate(URL templateURL)
Gets template URL used for deploying application.
|
awaitPodReadinessOrFail, cleanup, deploy, deployAll, deployAll, deployAll, deployAll, deployApplication, deployApplication, deployApplication, deployApplication, getPods, getServiceUrl, getServiceUrl, project, replicationControllerpublic void deployApplication(String applicationName) throws IOException
deployApplication in class KubernetesAssistantapplicationName - to configure in clusterIOExceptionpublic void deploy(InputStream inputStream) throws IOException
deploy in class KubernetesAssistantinputStream - where resources are readIOExceptionpublic Optional<URL> getRoute(String routeName)
routeName - to return its URLpublic Optional<URL> getRoute()
public void awaitUrl(URL routeUrl, int... statusCodes)
routeUrl - URL to check (usually a route one)statusCodes - list of status code that might return that service is up and running.
It is used as OR, so if one returns true, then the route is considered valid.
If not set, then only 200 status code is used.public void scale(int replicas)
scale in class KubernetesAssistantreplicas - to scale the applicationpublic void scale(String applicationName, int replicas)
scale in class KubernetesAssistantapplicationName - name of the application to scalereplicas - to scale the applicationpublic void awaitApplicationReadinessOrFail()
awaitApplicationReadinessOrFail in class KubernetesAssistantpublic void awaitApplicationReadinessOrFail(String applicationName)
awaitApplicationReadinessOrFail in class KubernetesAssistantapplicationName - name of the application to wait for pods readinesspublic io.fabric8.openshift.api.model.v4_0.DeploymentConfig deploymentConfig()
public OpenShiftAssistantTemplate usingTemplate(URL templateURL)
templateURL - url path to the templatepublic OpenShiftAssistantTemplate usingTemplate(String templateURL) throws MalformedURLException
templateURL - path to the templateMalformedURLExceptionpublic List<io.fabric8.openshift.api.model.v4_0.Project> listProjects()
public String getCurrentProjectName()
public boolean projectExists(String name) throws IllegalArgumentException
name - project nameIllegalArgumentExceptionpublic Optional<io.fabric8.openshift.api.model.v4_0.Project> findProject(String name) throws IllegalArgumentException
name - project nameOptional if project does not existIllegalArgumentExceptionpublic io.fabric8.openshift.clnt.v4_0.OpenShiftClient getClient()
Copyright © 2018 JBoss by Red Hat. All rights reserved.