@Test public void shouldRegisterProxyConfigurationWithClusterProxy() throws ClusterProxyException { ConfigRegistrationResponse response = new ConfigRegistrationResponse(); response.setX509Unwrapped("X509PublicKey"); ConfigRegistrationRequest request = configRegistrationRequestWithTunnelEntries(); when(clusterProxyRegistrationClient.registerConfig(any())).thenReturn(response); when(securityConfigService.findOneByStackId(STACK_ID)).thenReturn(Optional.of(gatewaySecurityConfig())); ConfigRegistrationResponse registrationResponse = service.registerCluster(testStackUsingCCM()); assertEquals("X509PublicKey", registrationResponse.getX509Unwrapped()); verify(clusterProxyRegistrationClient).registerConfig(request); }
public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; } }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  ConfigRegistrationResponse registerCluster(Stack stack); ConfigRegistrationResponse reRegisterCluster(Stack stack); void registerGatewayConfiguration(Long stackId); boolean useClusterProxyForCommunication(Tunnel tunnel, String cloudPlatform); boolean useClusterProxyForCommunication(Stack stack); boolean isCreateConfigForClusterProxy(Stack stack); void deregisterCluster(Stack stack); String getProxyPath(String crn); com.sequenceiq.cloudbreak.api.endpoint.v4.autoscales.response.ClusterProxyConfiguration getClusterProxyConfigurationForAutoscale(); }
ClusterProxyService { public ConfigRegistrationResponse registerCluster(Stack stack) { ConfigRegistrationRequest proxyConfigRequest = createProxyConfigRequest(stack); ConfigRegistrationResponse configRegistrationResponse = clusterProxyRegistrationClient.registerConfig(proxyConfigRequest); stackUpdater.updateClusterProxyRegisteredFlag(stack, true); return configRegistrationResponse; }  ConfigRegistrationResponse registerCluster(Stack stack); ConfigRegistrationResponse reRegisterCluster(Stack stack); void registerGatewayConfiguration(Long stackId); boolean useClusterProxyForCommunication(Tunnel tunnel, String cloudPlatform); boolean useClusterProxyForCommunication(Stack stack); boolean isCreateConfigForClusterProxy(Stack stack); void deregisterCluster(Stack stack); String getProxyPath(String crn); com.sequenceiq.cloudbreak.api.endpoint.v4.autoscales.response.ClusterProxyConfiguration getClusterProxyConfigurationForAutoscale(); static final String CB_INTERNAL; }