Search in sources :

Example 1 with OpenShiftTemplate

use of org.guvnor.ala.openshift.access.OpenShiftTemplate in project kie-wb-common by kiegroup.

the class OpenShiftClientServiceImpl method getTemplateModel.

@Override
public TemplateDescriptorModel getTemplateModel(final String url) {
    checkNotNull("url", url);
    OpenShiftTemplate template = new OpenShiftTemplate(url);
    List<TemplateParam> params = buildTemplateParams(template);
    final TemplateDescriptorModel descriptorModel = new TemplateDescriptorModel(params);
    return descriptorModel;
}
Also used : TemplateDescriptorModel(org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel) OpenShiftTemplate(org.guvnor.ala.openshift.access.OpenShiftTemplate) TemplateParam(org.guvnor.ala.ui.openshift.model.TemplateParam)

Example 2 with OpenShiftTemplate

use of org.guvnor.ala.openshift.access.OpenShiftTemplate in project kie-wb-common by kiegroup.

the class OpenShiftAccessTest method testTemplateParams.

@Test
public void testTemplateParams() throws Exception {
    String templateUri = getUri("bpmsuite70-execserv.json");
    OpenShiftTemplate template = new OpenShiftTemplate(templateUri);
    Map<String, Parameter> params = template.getParameterMap();
    verifyParameter(params, "APPLICATION_NAME", "Application Name", "The name for the application.", true, null, null, "myapp");
    verifyParameter(params, "KIE_SERVER_PWD", "KIE Server Password", "KIE execution server password (Sets the org.kie.server.pwd system property)", false, "expression", "[a-zA-Z]{6}[0-9]{1}!", null);
}
Also used : Parameter(org.guvnor.ala.openshift.access.OpenShiftTemplate.Parameter) OpenShiftTemplate(org.guvnor.ala.openshift.access.OpenShiftTemplate) Test(org.junit.Test)

Aggregations

OpenShiftTemplate (org.guvnor.ala.openshift.access.OpenShiftTemplate)2 Parameter (org.guvnor.ala.openshift.access.OpenShiftTemplate.Parameter)1 TemplateDescriptorModel (org.guvnor.ala.ui.openshift.model.TemplateDescriptorModel)1 TemplateParam (org.guvnor.ala.ui.openshift.model.TemplateParam)1 Test (org.junit.Test)1