Bulk disable node==qa-test-vm offline + makefile edits

jjb/voltha-test/voltha-release-jobs/voltha-2.11.yaml
jjb/voltha-test/voltha-release-jobs/voltha-2.12.yaml
----------------------------------------------------
  o Disable 4 jobs hanging on node==qa-test-vm.

config.mk
makefiles/lint/include.mk
-------------------------
  o Refresh from repo:onf-make
  o Pull in more lint targets (~doc8).
  o Pull in per-repository configs to sync with config makefile v1.5
  o See comment at [EOF] for details.

makefiles/virtualenv.mk
-----------------------
  o Refresh target logic for pip install -r requirements.txt
  o if exists install as a single block not as reliable as multiple statements.

Change-Id: I6199498f672abd8fdc59c20a757190cc897e7a5c
diff --git a/config.mk b/config.mk
index 399fbe7..3cec7fd 100644
--- a/config.mk
+++ b/config.mk
@@ -16,7 +16,7 @@
 # -----------------------------------------------------------------------
 # https://gerrit.opencord.org/plugins/gitiles/onf-make
 # ONF.makefiles.include.version = 1.1
-# ONF.confg.mk                  = 1.1
+# ONF.confg.mk                  = 1.5
 # -----------------------------------------------------------------------
 
 --repo-name-- := ci-management
@@ -25,8 +25,8 @@
 ##--------------------------------##
 ##---]  Disable lint targets  [---##
 ##--------------------------------##
-# NO-LINT-DOC8      := true  **
-# NO-LINT-GOLANG    := true  **
+# NO-LINT-DOC8      := true
+# NO-LINT-GOLANG    := true
 NO-LINT-GROOVY      := true#               # Note[1]
 # NO-LINT-JJB       := true#               # Note[2]
 # NO-LINT-JSON      := true#               # Note[1]
@@ -34,11 +34,12 @@
 NO-LINT-REUSE       := true                # License check
 NO-LINT-ROBOT       := true
 NO-LINT-SHELL       := true#               # Note[1]
+# NO-LINT-TOX       := true#               # Note[1]
 NO-LINT-YAML        := true#               # Note[1]
 
+# NO-LINT-FLAKE8    := true#               # Note[1]
 NO-LINT-PYTHON      := true#               # Note[1]
 # NO-LINT-PYLINT    := true#               # Note[1]
-# NO-LINT-TOX       := true#               # Note[1]
 
 # Note[1] - A boatload of source to cleanup prior to enable.
 # Note[2] - No sources available
@@ -75,6 +76,10 @@
 onf-excl-dirs += patches#       # voltha docs - python upgrade
 onf-excl-dirs += .tox           # also a python dependency
 
+ifeq ($(--repo-name--),voltha-docs)
+  lint-doc8-excl += '_build'
+endif
+
 onf-excl-dirs ?= $(error onf-excl-dirs= is required)
 
 ##-----------------------------##
@@ -86,6 +91,9 @@
 $(if $(filter %ci-management,$(--repo-name--)),\
   $(eval --REPO-IS-CI-MANAGEMENT-- := true)\
 )
+$(if $(filter %voltha-docs,$(--repo-name--)),\
+  $(eval --REPO-IS-VOLTHA-DOCS-- := true)\
+)
 
 # create makefiles/config/byrepo/{--repo-name--}.mk for one-off snowflakes ?
 # $(if $(wildcard docker),$(eval USE-ONF-DOCKER-MK := true))
@@ -101,6 +109,11 @@
   onf-excl-dirs += packer
 endif
 
+ifdef --REPO-IS-VOLTHA-DOCS--
+  onf-excl-dirs += _build
+  onf-excl-dirs += repos
+endif
+
 ifdef NO-LINT-PYTHON
   NO-LINT-FLAKE8 := true
   NO-LINT-PYLINT := true
@@ -112,4 +125,16 @@
 
 onf-excl-dirs := $(sort $(strip $(onf-excl-dirs)))
 
+# [TODO]#
+#  --------------------------------------------------------------------
+#   o two distinct makefiles/ directories are needed, one for onf-make
+#   o second for repository specific makefile configs and logic.
+#   o Two independent vars specify path:
+#       ONF_MAKEDIR = library makefiles
+#       MAKEDIR     = repository specific content
+#   o Conditional repository testing above can crush down all the
+#     "if-this-repository-is-X-do-Y' logic above intoL
+#     include $(MAKEDIR)/config.mk   # repo:$(--repo-name--)
+#  --------------------------------------------------------------------
+
 # [EOF]
diff --git a/jjb/voltha-test/voltha-release-jobs/voltha-2.11.yaml b/jjb/voltha-test/voltha-release-jobs/voltha-2.11.yaml
index b7fdbd9..552e6b0 100644
--- a/jjb/voltha-test/voltha-release-jobs/voltha-2.11.yaml
+++ b/jjb/voltha-test/voltha-release-jobs/voltha-2.11.yaml
@@ -30,7 +30,7 @@
     jobs:
       # flex OCP pod with olt/onu - Default tech profile and timer based job
       - 'build_voltha_pod_release_timer':
-          disable-job: false
+          disable-job: true
           build-node: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
           release: '2.11'
diff --git a/jjb/voltha-test/voltha-release-jobs/voltha-2.12.yaml b/jjb/voltha-test/voltha-release-jobs/voltha-2.12.yaml
index 260494a..e56a555 100644
--- a/jjb/voltha-test/voltha-release-jobs/voltha-2.12.yaml
+++ b/jjb/voltha-test/voltha-release-jobs/voltha-2.12.yaml
@@ -30,7 +30,7 @@
     jobs:
       # flex OCP pod with olt/onu - Default tech profile and timer based job
       - 'build_voltha_pod_release_timer':
-          disable-job: false
+          disable-job: true
           build-node: 'qa-testvm-pod'
           config-pod: 'flex-ocp-cord'
           release: '2.12'
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 778d730..97ea39a 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -42,6 +42,7 @@
 include $(ONF_MAKEDIR)/commands/include.mk   # Tools and local installers
 
 include $(ONF_MAKEDIR)/virtualenv.mk#        # lint-{jjb,python} depends on venv
+# include $(ONF_MAKEDIR)/patches/include.mk#   # Patch when python 3.10+ in use
 include $(ONF_MAKEDIR)/lint/include.mk
 
 include $(ONF_MAKEDIR)/gerrit/include.mk
diff --git a/makefiles/lint/doc8/excl.mk b/makefiles/lint/doc8/excl.mk
new file mode 100644
index 0000000..efa71da
--- /dev/null
+++ b/makefiles/lint/doc8/excl.mk
@@ -0,0 +1,48 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2022 Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+
+## excl := $(wildcar */*/.git)
+lint-doc8-excl-raw += '$(venv-name)'
+lint-doc8-excl-raw += '*/$(venv-name)'
+$(if $(BUILDDIR),\
+  $(excl lint-doc8-excl-raw += '$(BUILDDIR)'))
+
+# YUCK! -- overhead
+#   o Submodule(s) use individual/variant virtualenv install paths.
+#   o Exclude special snowflakes to enable library makefile use.
+#   o All can use virtualenv.mk for consistent names and cleanup
+#   o [TODO] Ignore submodules, individual repos should check their sources.
+
+lint-doc8-excl-raw += '*/venv_cord'
+lint-doc8-excl-raw += '*/vst_venv'
+
+lint-doc8-excl-raw += './cord-tester'
+lint-doc8-excl-raw += './repos/cord-tester'
+
+lint-doc8-excl-raw += './bbsim/internal/bbsim/responders/sadis/dp.txt'
+lint-doc8-excl-raw += './repos/bbsim/internal/bbsim/responders/sadis/dp.txt'
+lint-doc8-excl-raw += './repos/voltha-helm-charts/voltha-infra/templates/NOTES.txt'
+lint-doc8-excl-raw += './voltha-helm-charts/voltha-infra/templates/NOTES.txt'
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/lint/doc8/include.mk b/makefiles/lint/doc8/include.mk
new file mode 100644
index 0000000..6490b89
--- /dev/null
+++ b/makefiles/lint/doc8/include.mk
@@ -0,0 +1,67 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2017-2022 Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---]  GLOBALS  [---##
+##-------------------##
+.PHONY: lint-doc8 lint-doc8-all lint-doc8-modified
+
+have-rst-files := $(if $(strip $(RST_SOURCE)),true)
+RST_SOURCE     ?= $(error RST_SOURCE= is required)
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+ifndef NO-LINT-DOC8
+  lint-doc8-mode := $(if $(have-doc8-files),modified,all)
+  lint : lint-doc8-$(lint-doc8-mode)
+endif# NO-LINT-DOC8
+
+# Consistent targets across lint makefiles
+lint-doc8-all      : lint-doc8
+lint-doc8-modified : lint-doc8
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+include $(ONF_MAKEDIR)/lint/doc8/excl.mk
+
+ifdef lint-doc8-excl
+  lint-doc8-excl-args += $(addprefix --ignore-path$(space),$(lint-doc8-excl))
+endif
+lint-doc8-excl-args += $(addprefix --ignore-path$(space),$(lint-doc8-excl-raw))
+
+lint-doc8-args += --max-line-length 120
+
+lint-doc8: $(venv-activate-script)
+	@echo
+	@echo '** -----------------------------------------------------------------------'
+	@echo '** doc8 *.rst syntax checking'
+	@echo '** -----------------------------------------------------------------------'
+	$(activate) && doc8 --version
+	@echo
+	$(activate) && doc8 $(lint-doc8-excl-args) $(lint-doc8-args) .
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
+help::
+	@echo '  lint-doc8          Syntax check python using the doc8 command'
+  ifdef VERBOSE
+	@echo '  lint-doc8-all       doc8 checking: exhaustive'
+	@echo '  lint-doc8-modified  doc8 checking: only modified'
+  endif
+
+# [EOF]
diff --git a/makefiles/lint/include.mk b/makefiles/lint/include.mk
index 894f718..2ae2575 100644
--- a/makefiles/lint/include.mk
+++ b/makefiles/lint/include.mk
@@ -1,5 +1,4 @@
 # -*- makefile -*-
-# -*- makefile -*-
 # -----------------------------------------------------------------------
 # Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
 #
@@ -28,6 +27,7 @@
 	@echo
 	@echo "[LINT]"
 
+include $(ONF_MAKEDIR)/lint/doc8
 include $(ONF_MAKEDIR)/lint/groovy.mk
 include $(ONF_MAKEDIR)/lint/jjb.mk
 include $(ONF_MAKEDIR)/lint/json.mk
diff --git a/makefiles/virtualenv.mk b/makefiles/virtualenv.mk
index dae1ab8..cf24024 100644
--- a/makefiles/virtualenv.mk
+++ b/makefiles/virtualenv.mk
@@ -15,7 +15,7 @@
 # limitations under the License.
 # -----------------------------------------------------------------------
 # https://gerrit.opencord.org/plugins/gitiles/onf-make
-# ONF.makefile.version = 1.0
+# ONF.makefile.version = 1.2
 # -----------------------------------------------------------------------
 
 $(if $(DEBUG),$(warning ENTER))
@@ -51,7 +51,10 @@
 	virtualenv -p python3 $(venv-name)
 	$(activate) && python -m pip install --upgrade pip
 	$(activate) && pip install --upgrade setuptools
-	$(activate) && { [[ -r requirements.txt ]] && python -m pip install -r requirements.txt; }
+	$(activate) && [[ -r requirements.txt ]] \
+	    && { python -m pip install -r requirements.txt; } \
+	    || { /bin/true; }
+
 	$(activate) && python --version
 
 ## -----------------------------------------------------------------------