Search in sources :

Example 6 with GatewayTopology

use of com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology in project cloudbreak by hortonworks.

the class GatewayViewTest method gatewayTopology.

private GatewayTopology gatewayTopology(String... services) {
    GatewayTopology gatewayTopology = new GatewayTopology();
    gatewayTopology.setTopologyName("topology");
    ExposedServices exposedServices = new ExposedServices();
    exposedServices.setServices(List.of(services));
    gatewayTopology.setExposedServices(Json.silent(exposedServices));
    return gatewayTopology;
}
Also used : ExposedServices(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.ExposedServices) GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology)

Example 7 with GatewayTopology

use of com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology in project cloudbreak by hortonworks.

the class GatewayViewTest method testInitializeGatewayViewWithExposedServiceSetElement.

@Test
public void testInitializeGatewayViewWithExposedServiceSetElement() {
    GatewayTopology gatewayTopology = gatewayTopologyExposedServicesAsSet(exposedService("NAMENODE").getKnoxService());
    GatewayView gatewayView = new GatewayView(gatewayEnabled(gatewayTopology), "/cb/secret/signkey", ALL_SERVICES);
    Assert.assertEquals("/path", gatewayView.getPath());
    Assert.assertEquals("simple", gatewayView.getSsoProvider());
    Assert.assertEquals("tokencert", gatewayView.getTokenCert());
    Assert.assertEquals("topology", gatewayView.getTopologyName());
    Assert.assertTrue(gatewayView.getExposedServices().contains(exposedService("NAMENODE").getKnoxService()));
    Assert.assertEquals(GatewayType.CENTRAL, gatewayView.getGatewayType());
    Assert.assertEquals(SSOType.SSO_PROVIDER, gatewayView.getSsoType());
}
Also used : GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology) Test(org.junit.Test)

Example 8 with GatewayTopology

use of com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology in project cloudbreak by hortonworks.

the class TestUtil method setGatewayTopology.

private static void setGatewayTopology(Gateway gateway, String topologyName) {
    GatewayTopology gatewayTopology = new GatewayTopology();
    gatewayTopology.setTopologyName(topologyName);
    gatewayTopology.setExposedServices(getEmptyJson());
    gateway.getTopologies().add(gatewayTopology);
}
Also used : GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology)

Example 9 with GatewayTopology

use of com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology in project cloudbreak by hortonworks.

the class TestUtil method gatewayEnabledWithExposedKnoxServices.

public static Gateway gatewayEnabledWithExposedKnoxServices(String... exposedKnoxServices) {
    Gateway gateway = gatewayEnabled();
    GatewayTopology gatewayTopology = new GatewayTopology();
    gatewayTopology.setExposedServices(new Json(exposedKnoxServices));
    gateway.setTopologies(Sets.newHashSet(gatewayTopology));
    return gateway;
}
Also used : Gateway(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.Gateway) GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology) Json(com.sequenceiq.cloudbreak.common.json.Json)

Example 10 with GatewayTopology

use of com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology in project cloudbreak by hortonworks.

the class OpdbServiceEndpointCollectorTest method gatewayTopology.

private GatewayTopology gatewayTopology(String name) {
    GatewayTopologyV4Request gatewayTopologyJson = new GatewayTopologyV4Request();
    gatewayTopologyJson.setTopologyName(name);
    gatewayTopologyJson.setExposedServices(Arrays.asList("HBASEUI", "HBASEJARS", "AVATICA", "CM-UI", "CM-API", "WEBHBASE"));
    ExposedServices exposedServices = exposedServicesConverter.convert(gatewayTopologyJson);
    GatewayTopology gatewayTopology = new GatewayTopology();
    gatewayTopology.setTopologyName(name);
    gatewayTopology.setExposedServices(new Json(exposedServices));
    return gatewayTopology;
}
Also used : GatewayTopologyV4Request(com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.topology.GatewayTopologyV4Request) ExposedServices(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.ExposedServices) GatewayTopology(com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology) Json(com.sequenceiq.cloudbreak.common.json.Json)

Aggregations

GatewayTopology (com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.GatewayTopology)23 Test (org.junit.Test)11 ExposedServices (com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.ExposedServices)9 Json (com.sequenceiq.cloudbreak.common.json.Json)7 Gateway (com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.Gateway)7 GatewayTopologyV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.topology.GatewayTopologyV4Request)5 GatewayTopologyV4Response (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.response.cluster.gateway.topology.GatewayTopologyV4Response)3 ExposedService (com.sequenceiq.cloudbreak.api.service.ExposedService)3 BlueprintTextProcessor (com.sequenceiq.cloudbreak.template.processor.BlueprintTextProcessor)3 GatewayV4Request (com.sequenceiq.cloudbreak.api.endpoint.v4.stacks.request.cluster.gateway.GatewayV4Request)2 VirtualGroupRequest (com.sequenceiq.cloudbreak.auth.altus.VirtualGroupRequest)2 ClouderaManagerProduct (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerProduct)2 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)2 Blueprint (com.sequenceiq.cloudbreak.domain.Blueprint)2 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)2 IdBroker (com.sequenceiq.cloudbreak.domain.stack.cluster.IdBroker)2 TemplatePreparationObject (com.sequenceiq.cloudbreak.template.TemplatePreparationObject)2 GeneralClusterConfigs (com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs)2 BlueprintView (com.sequenceiq.cloudbreak.template.views.BlueprintView)2 Tenant (com.sequenceiq.cloudbreak.workspace.model.Tenant)2