Use opendev interop repo for querying guidelines
Refstack server was still downloading guidelines and capabilities from the old interop repositoty hosted on github.com. This patch changes default repo URLs so that the guidelines are download from the current interop repo hosted on opendev.org. Change-Id: Ic05a2a784c8e513e09bc430139011aa73bea062e
This commit is contained in:
parent
23fcee1239
commit
bbbe1f525b
@ -144,19 +144,19 @@
|
||||
# Template for test result url. (string value)
|
||||
#test_results_url = /#/results/%s
|
||||
|
||||
# The GitHub API URL of the repository and location of the
|
||||
# The opendev API URL of the repository and location of the
|
||||
# Interop Working Group capability files.
|
||||
# This URL is used to get a listing of all capability files. (string value)
|
||||
#github_api_capabilities_url = https://api.github.com/repos/openstack/interop/contents
|
||||
#opendev_api_capabilities_url = https://opendev.org/api/v1/repos/osf/interop/contents
|
||||
|
||||
# The GitHub API URL of the repository and location of any additional
|
||||
# The opendev API URL of the repository and location of any additional
|
||||
# guideline sources which will need to be parsed by the refstack API.
|
||||
#additional_capability_urls = https://api.github.com/repos/openstack/interop/contents/add-ons
|
||||
#additional_capability_urls = https://opendev.org/api/v1/repos/osf/interop/contents/add-ons
|
||||
|
||||
# This is the base URL that is used for retrieving specific capability
|
||||
# files. Capability file names will be appended to this URL to get the
|
||||
# contents of that file. (string value)
|
||||
#github_raw_base_url = https://raw.githubusercontent.com/openstack/interop/master/
|
||||
#opendev_raw_base_url = https://opendev.org/api/v1/repos/osf/interop/raw/
|
||||
|
||||
# Enable or disable anonymous uploads. If set to False, all clients
|
||||
# will need to authenticate and sign with a public/private keypair
|
||||
|
@ -80,22 +80,20 @@ API_OPTS = [
|
||||
default='/#/results/%s',
|
||||
help='Template for test result url.'
|
||||
),
|
||||
cfg.StrOpt('github_api_capabilities_url',
|
||||
default='https://api.github.com'
|
||||
'/repos/openstack/interop/contents',
|
||||
cfg.StrOpt('opendev_api_capabilities_url',
|
||||
default='https://opendev.org/api/v1/repos/osf/interop/contents',
|
||||
help='The GitHub API URL of the repository and location of the '
|
||||
'Interop Working Group capability files. This URL is used '
|
||||
'to get a listing of all capability files.'
|
||||
),
|
||||
cfg.StrOpt('additional_capability_urls',
|
||||
default='https://api.github.com'
|
||||
'/repos/openstack/interop/contents/add-ons',
|
||||
default='https://opendev.org/api/v1/'
|
||||
'repos/osf/interop/contents/add-ons',
|
||||
help=('The GitHub API URL of the repository and location of '
|
||||
'any additional guideline sources which will need to '
|
||||
'be parsed by the refstack API.')),
|
||||
cfg.StrOpt('github_raw_base_url',
|
||||
default='https://raw.githubusercontent.com'
|
||||
'/openstack/interop/master/',
|
||||
cfg.StrOpt('opendev_raw_base_url',
|
||||
default='https://opendev.org/api/v1/repos/osf/interop/raw/',
|
||||
help='This is the base URL that is used for retrieving '
|
||||
'specific capability files. Capability file names will '
|
||||
'be appended to this URL to get the contents of that file.'
|
||||
|
@ -27,7 +27,7 @@ CONF = cfg.CONF
|
||||
LOG = log.getLogger(__name__)
|
||||
|
||||
# Cached requests will expire after 12 hours.
|
||||
requests_cache.install_cache(cache_name='github_cache',
|
||||
requests_cache.install_cache(cache_name='opendev_cache',
|
||||
backend='memory',
|
||||
expire_after=43200)
|
||||
|
||||
@ -56,13 +56,13 @@ class Guidelines:
|
||||
if repo_url:
|
||||
self.repo_url = repo_url
|
||||
else:
|
||||
self.repo_url = CONF.api.github_api_capabilities_url
|
||||
self.repo_url = CONF.api.opendev_api_capabilities_url
|
||||
if self.repo_url and self.repo_url not in self.guideline_sources:
|
||||
self.guideline_sources.append(self.repo_url)
|
||||
if raw_url:
|
||||
self.raw_url = raw_url
|
||||
else:
|
||||
self.raw_url = CONF.api.github_raw_base_url
|
||||
self.raw_url = CONF.api.opendev_raw_base_url
|
||||
|
||||
def get_guideline_list(self):
|
||||
"""Return a list of a guideline files.
|
||||
|
Loading…
x
Reference in New Issue
Block a user