def find_ci_id(self, name, type): sp = SearchParameters() sp.setType(Type.valueOf(str(type))) for p in XLReleaseServiceHolder.getRepositoryService().listEntities(sp): if str(p.getTitle()) == name: return p
def find_ci_id(name, type): sp = SearchParameters() sp.setType(Type.valueOf(type)) for p in XLReleaseServiceHolder.getRepositoryService().listEntities(sp): if str(p.getTitle()) == name: return p
def load_profile(profile): sp = SearchParameters() sp.setType(Type.valueOf('rel.ReleaseProfile')) for p in XLReleaseServiceHolder.getRepositoryService().listEntities(sp): if str(p.getTitle()) == profile: return json.loads(p.getProperty('profileJson'))
def ci_exists(storeName, type): sp = SearchParameters() sp.setType(Type.valueOf(type)) for p in __repositoryService.listEntities(sp): if str(p.getTitle()) == storeName: return True return False
def find_template_id_by_name(self, name): sp = SearchParameters() sp.setType(Type.valueOf(str('xlrelease.Release'))) for p in XLReleaseServiceHolder.getRepositoryService().listEntities(sp): if p.isTemplate() == True: if str(p.getTitle()) == str(name): Base.info("Found id: %s for name %s" % (str(p.getId()), name)) return str(p.getId()) return None
def load_ci_from_repo(storeName, type): sp = SearchParameters() sp.setType(Type.valueOf(type)) for p in __repositoryService.listEntities(sp): print p.getId() if str(p.getTitle()) == storeName: return p Base.fatal("unable to find json data repository: %s" % storeName) sys.exit(2)
def load_profile_from_xlr_repo(self, profileName): """ load the profile from the xlr repository :param profileName: name of the profile as it was configured :return: """ sp = SearchParameters() sp.setType(Type.valueOf('rel.ReleaseProfile')) for p in self.__repositoryService.listEntities(sp): if str(p.getTitle()) == profileName: return json.loads(p.getProperty('profileJson'))
def find_template_id_by_name(self, name): sp = SearchParameters() sp.setType(Type.valueOf(str('xlrelease.Release'))) for p in XLReleaseServiceHolder.getRepositoryService().listEntities( sp): if p.isTemplate() == True: if str(p.getTitle()) == str(name): Base.info("Found id: %s for name %s" % (str(p.getId()), name)) return str(p.getId()) return None