use of com.sequenceiq.cloudbreak.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyConfigController method getPrivates.
@Override
public Set<ProxyConfigResponse> getPrivates() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<ProxyConfig> proxyConfigs = proxyConfigService.retrievePrivateProxyConfigs(user);
return proxyConfigMapper.mapEntityToResponse(proxyConfigs);
}
use of com.sequenceiq.cloudbreak.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyConfigController method getPublics.
@Override
public Set<ProxyConfigResponse> getPublics() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<ProxyConfig> proxyConfigs = proxyConfigService.retrieveAccountProxyConfigs(user);
return proxyConfigMapper.mapEntityToResponse(proxyConfigs);
}
use of com.sequenceiq.cloudbreak.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyConfigController method getPublic.
@Override
public ProxyConfigResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
ProxyConfig proxyConfig = proxyConfigService.getPublicProxyConfig(name, user);
return proxyConfigMapper.mapEntityToResponse(proxyConfig);
}
use of com.sequenceiq.cloudbreak.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyConfigProviderTest method testWithAuthProxy.
@Test
public void testWithAuthProxy() {
ProxyConfig proxyConfig = new ProxyConfig();
proxyConfig.setUserName("test");
proxyConfig.setPassword("test");
Map<String, Object> properties = testProxyCore(proxyConfig);
assertTrue(StringUtils.isNotBlank((String) properties.get("user")));
assertTrue(StringUtils.isNotBlank((String) properties.get("password")));
}
use of com.sequenceiq.cloudbreak.domain.ProxyConfig in project cloudbreak by hortonworks.
the class ProxyConfigProviderTest method testWithoutAuthProxy.
@Test
public void testWithoutAuthProxy() {
ProxyConfig proxyConfig = new ProxyConfig();
Map<String, Object> properties = testProxyCore(proxyConfig);
assertTrue(StringUtils.isNotBlank((String) properties.get("host")));
assertTrue(StringUtils.isNotBlank((String) properties.get("protocol")));
assertNotNull(properties.get("port"));
assertFalse(properties.containsKey("user"));
assertFalse(properties.containsKey("password"));
}
Aggregations