aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/codesearch/create_config.py
diff options
context:
space:
mode:
authorPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-07 15:28:51 +0100
committerPawel Wieczorek <p.wieczorek2@samsung.com>2020-01-07 15:28:51 +0100
commitb4436f2b737ac9186e36eac10982f2e66b33aa6e (patch)
treef9163f0b15513e5efded5baabe8391601a98e6eb /bootstrap/codesearch/create_config.py
parente2aa848b52d50e98e2463088254668772a3c8d25 (diff)
Drop tool-specific naming convention (git hosting service)
Issue-ID: ONAPARC-540 Change-Id: Id1c8e94008752efd3d40d0e0eca44d81930c692a Signed-off-by: Pawel Wieczorek <p.wieczorek2@samsung.com>
Diffstat (limited to 'bootstrap/codesearch/create_config.py')
-rwxr-xr-xbootstrap/codesearch/create_config.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bootstrap/codesearch/create_config.py b/bootstrap/codesearch/create_config.py
index e7a55c39d..109219d2f 100755
--- a/bootstrap/codesearch/create_config.py
+++ b/bootstrap/codesearch/create_config.py
@@ -9,7 +9,7 @@ import urllib.request
import sys
DEFAULT_GERRIT = "https://gerrit.onap.org/r"
-DEFAULT_CGIT = "https://git.onap.org"
+DEFAULT_GIT = "https://git.onap.org"
API_PROJECTS = "/projects/"
MAGIC_PREFIX = ")]}'"
@@ -27,12 +27,12 @@ def get_projects_list(gerrit):
return projects.keys()
-def create_repos_list(projects, cgit):
+def create_repos_list(projects, git):
"""Create a map of all projects to their repositories' URLs."""
repos_list = {}
for project in projects:
repos_list[project] = {
- "url": "{}/{}".format(cgit, project),
+ "url": "{}/{}".format(git, project),
"url-pattern": {
"base-url": "{url}/tree/{path}{anchor}",
"anchor": "#n{line}"
@@ -46,7 +46,7 @@ def parse_arguments():
"""Return parsed command-line arguments."""
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--gerrit', help='Gerrit address', default=DEFAULT_GERRIT)
- parser.add_argument('--cgit', help='cgit address', default=DEFAULT_CGIT)
+ parser.add_argument('--git', help='git address', default=DEFAULT_GIT)
return parser.parse_args()
@@ -55,7 +55,7 @@ def main():
"""Main entry point for the script."""
arguments = parse_arguments()
- repos = create_repos_list(get_projects_list(arguments.gerrit), arguments.cgit)
+ repos = create_repos_list(get_projects_list(arguments.gerrit), arguments.git)
config = {
"max-concurrent-indexers": 2,
"dbpath": "data",