@Test public void getTags() throws Exception { RegistryService privHub = registryRepository.getByName(PRIVATE_REGISTRY); Tags ni1Tags = privHub.getTags("cluster-manager"); Assert.assertNotNull(ni1Tags); Assert.assertTrue(ni1Tags.getTags().size() > 0); RegistryService awshub = registryRepository.getByName(AWS_REGISTRY); Tags tagsAmazone = awshub.getTags("cluster-manager"); Assert.assertNotNull(tagsAmazone); Assert.assertTrue(tagsAmazone.getTags().size() > 0); RegistryService pdhub = registryRepository.getByName("codeabovelab"); Tags tags = pdhub.getTags("cluster-manager"); Assert.assertNotNull(tags); Assert.assertTrue(tags.getTags().size() > 0); RegistryService dhub = registryRepository.getByName(null); Tags tagsTutum = dhub.getTags("tutum/ubuntu"); Assert.assertNotNull(tagsTutum); Assert.assertTrue(tagsTutum.getTags().size() > 0); dhub = registryRepository.getByName(null); Tags tagsUbuntu = dhub.getTags("ubuntu"); Assert.assertNotNull(tagsUbuntu); Assert.assertTrue(tagsUbuntu.getTags().size() > 0); }
public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } RegistryRepository(KvMapperFactory mapperFactory,
                              DockerHubRegistry defaultRegistry,
                              RegistryFactory factory,
                              @Qualifier(RegistryEvent.BUS) MessageBus<RegistryEvent> eventBus); }
RegistryRepository implements SupportSearch { public RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } 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 RegistryService getByName(String registryName) { RegistryService service = null; if (registryName != null && !Objects.equals(defaultRegistry.getConfig().getName(), registryName)) { service = map.get(registryName); } if (service == null) { service = defaultRegistry; } return service; } 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);  }