require all projects to have published docs

Before we add projects to the project list page, ensure that they have
already published documentation for the relevant series.

Change-Id: Ia81a775c95caa1b3a32640abb86c1beb56697d6e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-07-14 12:27:53 -04:00
parent 66d276db05
commit d550f7d517
2 changed files with 58 additions and 49 deletions

View File

@ -70,7 +70,12 @@ def _check_url(url):
return (resp.status_code // 100) == 2, resp.status_code return (resp.status_code // 100) == 2, resp.status_code
# NOTE(dhellmann): List of tuple of flag name and URL template. None
# for the flag name means always apply the URL, otherwise look for a
# True value associated with the flag in the project data.
_URLS = [ _URLS = [
(None,
'https://docs.openstack.org/{name}/{series}/'),
('has_install_guide', ('has_install_guide',
'https://docs.openstack.org/{name}/{series}/install/'), 'https://docs.openstack.org/{name}/{series}/install/'),
('has_admin_guide', ('has_admin_guide',
@ -159,6 +164,9 @@ def load_project_data(source_directory, check_all_links=False):
# If the project claims to have a separately published guide # If the project claims to have a separately published guide
# of some sort, look for it before allowing the flag to stand. # of some sort, look for it before allowing the flag to stand.
for flag, url_template in _URLS: for flag, url_template in _URLS:
if flag is None:
flag_val = True
else:
flag_val = project.get(flag, False) flag_val = project.get(flag, False)
try: try:
url = url_template.format(series=series, **project) url = url_template.format(series=series, **project)
@ -179,7 +187,8 @@ def load_project_data(source_directory, check_all_links=False):
if flag_val and not exists: if flag_val and not exists:
logger.error( logger.error(
'%s set for %s but %s does not exist (%s)', '%s set for %s but %s does not exist (%s)',
flag, project['name'], url, status, flag or 'home page check', project['name'],
url, status,
) )
fail = True fail = True
elif (not flag_val) and check_all_links and exists: elif (not flag_val) and check_all_links and exists:

View File

@ -36,7 +36,7 @@
service: Image service Python Bindings service: Image service Python Bindings
type: client type: client
description: glance client description: glance client
- name: glance-store - name: glance_store
service: glance backend abstraction library service: glance backend abstraction library
type: library type: library
@ -55,10 +55,10 @@
- name: os-vif - name: os-vif
type: library type: library
service: Library for plugging and unplugging virtual interfaces. service: Library for plugging and unplugging virtual interfaces.
- name: osc-placement # - name: osc-placement
type: client # type: client
service: OpenStackClient plugin for the Nova Placement service. # service: OpenStackClient plugin for the Nova Placement service.
description: nova placement client # description: nova placement client
- name: neutron - name: neutron
service: Networking service service: Networking service
@ -202,13 +202,13 @@
type: client type: client
description: designate client description: designate client
- name: ec2-api # - name: ec2-api
service: EC2 API compatibility layer # service: EC2 API compatibility layer
service_type: ec2-api # service_type: ec2-api
# has_install_guide: true # # has_install_guide: true
# has_config_ref: true # # has_config_ref: true
has_api_ref: true # has_api_ref: true
type: service # type: service
- name: barbican - name: barbican
service: Key Manager service service: Key Manager service
@ -349,10 +349,10 @@
has_api_ref: true has_api_ref: true
# has_config_ref: true # has_config_ref: true
has_user_guide: true has_user_guide: true
- name: python-muranoclient # - name: python-muranoclient
service: Application Catalog service Python Bindings # service: Application Catalog service Python Bindings
type: client # type: client
description: murano client # description: murano client
- name: senlin - name: senlin
service: Clustering service service: Clustering service
@ -361,10 +361,10 @@
has_install_guide: false has_install_guide: false
# has_config_ref: true # has_config_ref: true
has_user_guide: true has_user_guide: true
- name: python-senlinclient # - name: python-senlinclient
service: Clustering service Python Bindings # service: Clustering service Python Bindings
type: client # type: client
description: senlin client # description: senlin client
- name: storlets - name: storlets
service: Compute inside Object Storage service service: Compute inside Object Storage service
@ -390,10 +390,10 @@
has_api_ref: true has_api_ref: true
# has_config_ref: true # has_config_ref: true
has_user_guide: true has_user_guide: true
- name: python-tackerclient # - name: python-tackerclient
service: NFV Orchestration service Python Bindings # service: NFV Orchestration service Python Bindings
type: client # type: client
description: tacker client # description: tacker client
- name: cloudkitty - name: cloudkitty
service: Rating service service: Rating service
@ -401,10 +401,10 @@
type: service type: service
has_install_guide: false has_install_guide: false
# has_config_ref: true # has_config_ref: true
- name: python-cloudkittyclient # - name: python-cloudkittyclient
service: Rating service Python Bindings # service: Rating service Python Bindings
type: client # type: client
description: cloudkitty client # description: cloudkitty client
- name: vitrage - name: vitrage
service: RCA (Root Cause Analysis) service service: RCA (Root Cause Analysis) service
@ -585,10 +585,10 @@
# has_install_guide: true # has_install_guide: true
# has_api_ref: true # has_api_ref: true
# type: service # type: service
- name: python-freezerclient # - name: python-freezerclient
service: Backup, Restore, and Disaster Recovery service client # service: Backup, Restore, and Disaster Recovery service client
type: client # type: client
description: freezer client # description: freezer client
- name: karbor - name: karbor
service: Data Protection Orchestration Service service: Data Protection Orchestration Service
@ -597,15 +597,15 @@
has_api_ref: true has_api_ref: true
# has_config_ref: true # has_config_ref: true
type: service type: service
- name: python-karborclient # - name: python-karborclient
service: Data Protection Orchestration Service client # service: Data Protection Orchestration Service client
type: client # type: client
description: karbor client # description: karbor client
- name: python-monascaclient # - name: python-monascaclient
service: Monitoring client # service: Monitoring client
type: client # type: client
description: monasca client # description: monasca client
- name: python-openstackclient - name: python-openstackclient
service: Command line interface to OpenStack service: Command line interface to OpenStack
@ -634,10 +634,10 @@
# has_api_ref: true # has_api_ref: true
# has_config_ref: true # has_config_ref: true
type: service type: service
- name: python-solumclient # - name: python-solumclient
service: Software Development Lifecycle Automation client # service: Software Development Lifecycle Automation client
type: client # type: client
description: solum client # description: solum client
- name: tricircle - name: tricircle
service: Networking automation across Neutron service service: Networking automation across Neutron service
@ -651,9 +651,9 @@
type: client type: client
description: tricircle client description: tricircle client
- name: os-win # - name: os-win
service: Windows / Hyper-V library for OpenStack projects. # service: Windows / Hyper-V library for OpenStack projects.
type: library # type: library
- name: openstackdocstheme - name: openstackdocstheme
service: Theme and extension support for Sphinx documentation for official projects service: Theme and extension support for Sphinx documentation for official projects