コード例 #1
0
    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
コード例 #2
0
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
コード例 #3
0
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'))
コード例 #4
0
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
コード例 #5
0
    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
コード例 #6
0
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)
コード例 #7
0
    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'))
コード例 #8
0
    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'))
コード例 #9
0
    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