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;
}
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());
}
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);
}
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;
}
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;
}
Aggregations