コード例 #1
0
ファイル: manager.py プロジェクト: cclauss/ops.Validator
def recipes_add():
    """ Add detected recipes based on local cookbooks to db"""
    l = LocalStorage()
    for user in l.list_users():
        repo = RepoManager(user)
        for cb in l.list_cookbooks(user):
            system = l.find_system(cb)
            for r in l.list_recipes(cb):
                ro = Recipe()
                ro.name = r
                ro.cookbook = cb
                ro.version = repo.browse_file(r)
                ro.system = system
                ro.user = user
                ro.save()
コード例 #2
0
ファイル: manager.py プロジェクト: ging/fiware-validator
def recipes_add():
    """ Add detected recipes based on local cookbooks to db"""
    l = LocalStorage()
    for user in l.list_users():
        repo = RepoManager(user)
        for cb in l.list_cookbooks(user):
            system = l.find_system(cb)
            for r in l.list_recipes(cb):
                ro = Recipe()
                ro.name = r
                ro.cookbook = cb
                ro.version = repo.browse_file(r)
                ro.system = system
                ro.user = user
                ro.save()
コード例 #3
0
ファイル: manager.py プロジェクト: cclauss/ops.Validator
def cookbooks_add():
    """Add local cookbooks to db"""
    l = LocalStorage()
    for user in l.list_users():
        repo = RepoManager(user)
        for cb in l.list_cookbooks(user):
            system = l.find_system(cb)
            LOG.info("Adding cookbook %s" % cb)
            cb = CookBook()
            cb.name = cb
            cb.system = system
            cb.version = repo.version
            cb.path = os.path.join(l.path, cb)
            cb.user = user
            cb.save()
            for r in l.list_recipes(cb.path):
                ro = Recipe()
                ro.name = r
                ro.cookbook = cb
                ro.version = repo.browse_file(r)
                ro.system = system
                ro.user = user
                ro.save()
コード例 #4
0
ファイル: manager.py プロジェクト: ging/fiware-validator
def cookbooks_add():
    """Add local cookbooks to db"""
    l = LocalStorage()
    for user in l.list_users():
        repo = RepoManager(user)
        for cb in l.list_cookbooks(user):
            system = l.find_system(cb)
            LOG.info("Adding cookbook %s" % cb)
            cb = CookBook()
            cb.name = cb
            cb.system = system
            cb.version = repo.version
            cb.path = os.path.join(l.path, cb)
            cb.user = user
            cb.save()
            for r in l.list_recipes(cb.path):
                ro = Recipe()
                ro.name = r
                ro.cookbook = cb
                ro.version = repo.browse_file(r)
                ro.system = system
                ro.user = user
                ro.save()