@Test public void shouldNotSendCleanupRequestInCaseOfKeytabDoesNotNeedToBeUpdated() { Stack stack = aStack(); Optional<KerberosConfig> kerberosConfig = Optional.of(mock(KerberosConfig.class)); when(kerberosConfigService.get(ENVIRONMENT_CRN, STACK_NAME)).thenReturn(kerberosConfig); when(environmentConfigProvider.isChildEnvironment(ENVIRONMENT_CRN)).thenReturn(true); when(kerberosDetailService.keytabsShouldBeUpdated(CLOUD_PLATFORM, true, kerberosConfig)).thenReturn(false); victim.cleanup(stack); verifyNoMoreInteractions(freeIpaV1Endpoint); }
public void cleanup(Stack stack) { Set<String> hostNames = instanceMetadataProcessor.extractFqdn(stack); Set<String> ips = instanceMetadataProcessor.extractIps(stack); LOGGER.info("Full cleanup invoked with hostnames {} and IPs {}", hostNames, ips); cleanup(stack, Set.of(), hostNames, ips); }
FreeIpaCleanupService { public void cleanup(Stack stack) { Set<String> hostNames = instanceMetadataProcessor.extractFqdn(stack); Set<String> ips = instanceMetadataProcessor.extractIps(stack); LOGGER.info("Full cleanup invoked with hostnames {} and IPs {}", hostNames, ips); cleanup(stack, Set.of(), hostNames, ips); } }
FreeIpaCleanupService { public void cleanup(Stack stack) { Set<String> hostNames = instanceMetadataProcessor.extractFqdn(stack); Set<String> ips = instanceMetadataProcessor.extractIps(stack); LOGGER.info("Full cleanup invoked with hostnames {} and IPs {}", hostNames, ips); cleanup(stack, Set.of(), hostNames, ips); }  }
FreeIpaCleanupService { public void cleanup(Stack stack) { Set<String> hostNames = instanceMetadataProcessor.extractFqdn(stack); Set<String> ips = instanceMetadataProcessor.extractIps(stack); LOGGER.info("Full cleanup invoked with hostnames {} and IPs {}", hostNames, ips); cleanup(stack, Set.of(), hostNames, ips); }  void cleanup(Stack stack); void cleanupOnScale(Stack stack, Set<String> hostNames, Set<String> ips); void cleanupOnRecover(Stack stack, Set<String> hostNames, Set<String> ips); void cleanupDnsOnly(Stack stack, Set<String> hostNames, Set<String> ips); }
FreeIpaCleanupService { public void cleanup(Stack stack) { Set<String> hostNames = instanceMetadataProcessor.extractFqdn(stack); Set<String> ips = instanceMetadataProcessor.extractIps(stack); LOGGER.info("Full cleanup invoked with hostnames {} and IPs {}", hostNames, ips); cleanup(stack, Set.of(), hostNames, ips); }  void cleanup(Stack stack); void cleanupOnScale(Stack stack, Set<String> hostNames, Set<String> ips); void cleanupOnRecover(Stack stack, Set<String> hostNames, Set<String> ips); void cleanupDnsOnly(Stack stack, Set<String> hostNames, Set<String> ips);  }