Publish non-openstack namespace tempest plugins

This commit changes to publish non-openstack namespace tempest plugins
to the tempest registry doc page. We missed some tempest plugins such as
airship's tempest-plugin because of the recent namespace change. And
also, this commit adds two projects[0] to .zuul.yaml because it had
been added already.

This commit republish them on the doc page, and add two projects to the
blacklist to pass the sanity tests.

Change-Id: Ieecb8989ff8959f1b2c0e5f2f6b8ea2c3ebbcaa9
diff --git a/.zuul.yaml b/.zuul.yaml
index 0d2005b..8ffe90d 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -418,6 +418,7 @@
       - opendev.org/openstack/senlin-tempest-plugin
       - opendev.org/openstack/solum-tempest-plugin
       - opendev.org/x/tap-as-a-service
+      - opendev.org/x/tap-as-a-service-tempest-plugin
       - opendev.org/openstack/telemetry-tempest-plugin
       - opendev.org/openstack/tempest-horizon
       - opendev.org/x/tobiko
@@ -428,6 +429,7 @@
       - opendev.org/openstack/vitrage-tempest-plugin
       - opendev.org/x/vmware-nsx-tempest-plugin
       - opendev.org/openstack/watcher-tempest-plugin
+      - opendev.org/x/whitebox-tempest-plugin
       - opendev.org/openstack/zaqar-tempest-plugin
       - opendev.org/openstack/zun-tempest-plugin
 
diff --git a/tools/generate-tempest-plugins-list.py b/tools/generate-tempest-plugins-list.py
index 746cb34..55cda97 100644
--- a/tools/generate-tempest-plugins-list.py
+++ b/tools/generate-tempest-plugins-list.py
@@ -47,15 +47,10 @@
 '''
 
 
-def is_in_openstack_namespace(proj):
-    return proj.startswith('openstack/')
-
 # Rather than returning a 404 for a nonexistent file, cgit delivers a
 # 0-byte response to a GET request.  It also does not provide a
 # Content-Length in a HEAD response, so the way we tell if a file exists
 # is to check the length of the entire GET response body.
-
-
 def has_tempest_plugin(proj):
     try:
         r = urllib.urlopen(
@@ -76,19 +71,33 @@
 # cross-site scripting attacks.  Therefore we must discard it so the
 # json library won't choke.
 content = r.read().decode('utf-8')[4:]
-projects = sorted(filter(is_in_openstack_namespace, json.loads(content)))
+projects = sorted(json.loads(content))
 
-# Retrieve projects having no deb, puppet, ui or spec namespace as those
+# Retrieve projects having no deployment tool repo (such as deb,
+# puppet, ansible, etc.), infra repos, ui or spec namespace as those
 # namespaces do not contains tempest plugins.
 projects_list = [i for i in projects if not (
+    i.startswith('openstack-dev/') or
+    i.startswith('openstack-infra/') or
+    i.startswith('openstack/ansible-') or
+    i.startswith('openstack/charm-') or
+    i.startswith('openstack/cookbook-openstack-') or
+    i.startswith('openstack/devstack-') or
+    i.startswith('openstack/fuel-') or
     i.startswith('openstack/deb-') or
     i.startswith('openstack/puppet-') or
+    i.startswith('openstack/openstack-ansible-') or
+    i.startswith('x/deb-') or
+    i.startswith('x/fuel-') or
+    i.startswith('x/python-') or
+    i.startswith('zuul/') or
     i.endswith('-ui') or
     i.endswith('-specs'))]
 
 found_plugins = list(filter(has_tempest_plugin, projects_list))
 
-# Every element of the found_plugins list begins with "openstack/".
-# We drop those initial 10 octets when printing the list.
+# We have tempest plugins not only in 'openstack/' namespace but also the
+# other name spaces such as 'airship/', 'x/', etc.
+# So, we print all of them here.
 for project in found_plugins:
-    print(project[10:])
+    print(project)
diff --git a/tools/generate-tempest-plugins-list.sh b/tools/generate-tempest-plugins-list.sh
index b4e5430..c0d47a1 100755
--- a/tools/generate-tempest-plugins-list.sh
+++ b/tools/generate-tempest-plugins-list.sh
@@ -69,8 +69,8 @@
 i=0
 for plugin in ${sorted_plugins}; do
     i=$((i+1))
-    giturl="https://opendev.org/openstack/${plugin}"
-    gitlink="https://opendev.org/openstack/${plugin}"
+    giturl="https://opendev.org/${plugin}"
+    gitlink="https://opendev.org/cgit/${plugin}"
     printf "%-3s %-${name_col_len}s %s\n" "$i" "${plugin}" "\`${giturl} <${gitlink}>\`__"
 done
 
diff --git a/tools/tempest-plugin-sanity.sh b/tools/tempest-plugin-sanity.sh
index b291fcc..56ce521 100644
--- a/tools/tempest-plugin-sanity.sh
+++ b/tools/tempest-plugin-sanity.sh
@@ -48,8 +48,10 @@
 # TODO(masayukig): Some of these can be removed from BLACKLIST in the future.
 # barbican-tempest-plugin: https://review.opendev.org/#/c/634631/
 # cyborg-tempest-plugin: https://review.opendev.org/659687
+# gce-api: It looks gce-api doesn't support python3 yet.
 # intel-nfv-ci-tests: https://review.opendev.org/#/c/634640/
 # networking-ansible: https://review.opendev.org/#/c/634647/
+# networking-bgpvpn: https://review.opendev.org/#/c/662142/
 # networking-generic-switch: https://review.opendev.org/#/c/634846/
 # networking-l2gw-tempest-plugin: https://review.opendev.org/#/c/635093/
 # networking-midonet: https://review.opendev.org/#/c/635096/
@@ -61,19 +63,21 @@
 # valet: https://review.opendev.org/#/c/638339/
 
 BLACKLIST="
-barbican-tempest-plugin
-cyborg-tempest-plugin
-intel-nfv-ci-tests
-networking-ansible
-networking-generic-switch
-networking-l2gw-tempest-plugin
-networking-midonet
-networking-plumgrid
-networking-spp
-neutron-dynamic-routing
-neutron-vpnaas
-nova-lxd
-valet
+openstack/barbican-tempest-plugin
+openstack/cyborg-tempest-plugin
+x/gce-api
+x/intel-nfv-ci-tests
+x/networking-ansible
+openstack/networking-bgpvpn
+openstack/networking-generic-switch
+openstack/networking-l2gw-tempest-plugin
+openstack/networking-midonet
+x/networking-plumgrid
+x/networking-spp
+openstack/neutron-dynamic-routing
+openstack/neutron-vpnaas
+x/nova-lxd
+x/valet
 "
 
 # Function to clone project using zuul-cloner or from git
@@ -81,11 +85,11 @@
     if [ -e /usr/zuul-env/bin/zuul-cloner ]; then
         /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
         https://opendev.org \
-        openstack/"$1"
+        "$1"
 
     elif [ -e /usr/bin/git ]; then
-        /usr/bin/git clone https://opendev.org/openstack/"$1" \
-        openstack/"$1"
+        /usr/bin/git clone https://opendev.org/"$1" \
+        "$1"
 
     fi
 }
@@ -103,10 +107,10 @@
 
 # Function to install project
 function install_project() {
-    "$TVENV" pip install "$SANITY_DIR"/openstack/"$1"
+    "$TVENV" pip install "$SANITY_DIR"/"$1"
     # Check for test-requirements.txt file in a project then install it.
-    if [ -e "$SANITY_DIR"/openstack/"$1"/test-requirements.txt ]; then
-        "$TVENV" pip install -r "$SANITY_DIR"/openstack/"$1"/test-requirements.txt
+    if [ -e "$SANITY_DIR"/"$1"/test-requirements.txt ]; then
+        "$TVENV" pip install -r "$SANITY_DIR"/"$1"/test-requirements.txt
     fi
 }
 
@@ -124,7 +128,7 @@
     # Remove the sanity workspace in case of remaining
     rm -fr "$SANITY_DIR"/tempest_sanity
     # Remove the project directory after sanity run
-    rm -fr "$SANITY_DIR"/openstack/"$1"
+    rm -fr "$SANITY_DIR"/"$1"
 
     return $retval
 }