@Test public void getCatalog() throws Exception { List<ImageCatalog> catalog = registryRepository.getCatalog(Collections.singletonList(AWS_REGISTRY)); Assert.assertNotNull(catalog); List<ImageCatalog> catalogni1Full = registryRepository.getCatalog(Collections.singletonList(PRIVATE_REGISTRY)); Assert.assertNotNull(catalogni1Full); }
public List<ImageCatalog> getCatalog(Collection<String> names) { if (CollectionUtils.isEmpty(names)) { names = getAvailableRegistries(); } return names.stream() .filter(f -> !getByName(f).getConfig().isDisabled()) .filter(f -> !StringUtils.hasText(getByName(f).getConfig().getErrorMessage())) .filter(f -> !(getByName(f) instanceof DockerHubRegistry)) .map(n -> { ImageCatalog imageCatalog = getByName(n).getCatalog(); imageCatalog.setName(n); return imageCatalog; }).collect(Collectors.toList()); }
RegistryRepository implements SupportSearch { public List<ImageCatalog> getCatalog(Collection<String> names) { if (CollectionUtils.isEmpty(names)) { names = getAvailableRegistries(); } return names.stream() .filter(f -> !getByName(f).getConfig().isDisabled()) .filter(f -> !StringUtils.hasText(getByName(f).getConfig().getErrorMessage())) .filter(f -> !(getByName(f) instanceof DockerHubRegistry)) .map(n -> { ImageCatalog imageCatalog = getByName(n).getCatalog(); imageCatalog.setName(n); return imageCatalog; }).collect(Collectors.toList()); } }
RegistryRepository implements SupportSearch { public List<ImageCatalog> getCatalog(Collection<String> names) { if (CollectionUtils.isEmpty(names)) { names = getAvailableRegistries(); } return names.stream() .filter(f -> !getByName(f).getConfig().isDisabled()) .filter(f -> !StringUtils.hasText(getByName(f).getConfig().getErrorMessage())) .filter(f -> !(getByName(f) instanceof DockerHubRegistry)) .map(n -> { ImageCatalog imageCatalog = getByName(n).getCatalog(); imageCatalog.setName(n); return imageCatalog; }).collect(Collectors.toList()); } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); }
RegistryRepository implements SupportSearch { public List<ImageCatalog> getCatalog(Collection<String> names) { if (CollectionUtils.isEmpty(names)) { names = getAvailableRegistries(); } return names.stream() .filter(f -> !getByName(f).getConfig().isDisabled()) .filter(f -> !StringUtils.hasText(getByName(f).getConfig().getErrorMessage())) .filter(f -> !(getByName(f) instanceof DockerHubRegistry)) .map(n -> { ImageCatalog imageCatalog = getByName(n).getCatalog(); imageCatalog.setName(n); return imageCatalog; }).collect(Collectors.toList()); } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); void init(List<RegistryConfig> configs); void register(RegistryService registryService); void unRegister(String name); List<ImageCatalog> getCatalog(Collection<String> names); Collection<String> getAvailableRegistries(); String resolveRegistryNameByImageName(String imageName); RegistryService getRegistryByImageName(String imageName); RegistryService getByName(String registryName); @Override SearchResult search(String query, final int page, final int size); }
RegistryRepository implements SupportSearch { public List<ImageCatalog> getCatalog(Collection<String> names) { if (CollectionUtils.isEmpty(names)) { names = getAvailableRegistries(); } return names.stream() .filter(f -> !getByName(f).getConfig().isDisabled()) .filter(f -> !StringUtils.hasText(getByName(f).getConfig().getErrorMessage())) .filter(f -> !(getByName(f) instanceof DockerHubRegistry)) .map(n -> { ImageCatalog imageCatalog = getByName(n).getCatalog(); imageCatalog.setName(n); return imageCatalog; }).collect(Collectors.toList()); } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); void init(List<RegistryConfig> configs); void register(RegistryService registryService); void unRegister(String name); List<ImageCatalog> getCatalog(Collection<String> names); Collection<String> getAvailableRegistries(); String resolveRegistryNameByImageName(String imageName); RegistryService getRegistryByImageName(String imageName); RegistryService getByName(String registryName); @Override SearchResult search(String query, final int page, final int size);  }