def get_projects(self):
        """ Get the projects list from database """

        repos_list = []

        gerrit_projects_db = self.projects_db

        db = Database(user="root", passwd="", host="localhost", port=3306,
                      scrdb=None, shdb=gerrit_projects_db, prjdb=None)

        sql = """
            SELECT DISTINCT(repository_name)
            FROM project_repositories
            WHERE data_source='scr'
        """

        repos_list_raw = db.execute(sql)

        # Convert from review.openstack.org_openstack/rpm-packaging-tools to
        # openstack_rpm-packaging-tools
        for repo in repos_list_raw:
            # repo_name = repo[0].replace("review.openstack.org_","")
            repo_name = repo[0].replace(self.repository + "_", "")
            repos_list.append(repo_name)

        return repos_list
Get the projects list from database