VOL-5160 - Repo triage build for release branching.
Makefile
makefiles
---------
o Copy in library makefiles from repo:onf-make.
o Selectively enable constants and library logic.
o Cleanup and refactoring effort is needed to enable bulk docker and lint
targets but that effort is deferred to a separate jira ticket.
VERSION
-------
o Change *-dev branch to a release version to exercise all pipeline
job steps (including task publish if any).
build/package/Dockerfile
cmd/bbsim-sadis-server.go
deployments/bbsim-sadis-server.yaml
internal/core/common.go
internal/core/sadis_if.go
internal/core/server.go
internal/core/store.go
internal/core/store_test.go
internal/core/watcher.go
internal/utils/config.go
internal/utils/utils.go
-----------------------
o Update copyright notice.
Change-Id: I86c89354cb62eda41971bc2c00603d1894977d5c
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/include.mk b/makefiles/lint/yaml./byrepo/voltha-lib-go/include.mk
new file mode 100644
index 0000000..6cbd0ea
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/include.mk
@@ -0,0 +1,27 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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))
+
+##--------------------##
+##---] INCLUDES [---##
+##--------------------##
+include $(ONF_MAKEDIR)/lint/yaml/byrepo/$(--repo-name--)/yamllint.mk
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/python.mk b/makefiles/lint/yaml./byrepo/voltha-lib-go/python.mk
new file mode 100644
index 0000000..cf0eef5
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/python.mk
@@ -0,0 +1,41 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+#
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+
+YAML_FILES ?= $(error YAML_FILES= is required)
+
+lint-yaml-dep = $(addsuffix ^lint-yaml,$(YAML_FILES))
+lint-yaml-src = $(firstword $(subst ^,$(space),$(1)))
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+.PHONY : lint-yaml
+lint : lint-yaml
+
+lint-yaml: $(venv-activate)
+lint-yaml: $(lint-yaml-dep)
+
+$(lint-yaml-dep):
+ $(vst-env) && yamllint -s $(call lint-yaml-src,$@)
+
+help::
+ @echo " lint-yaml Syntax check yaml sources"
+
+# [EOF]
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/repo b/makefiles/lint/yaml./byrepo/voltha-lib-go/repo
new file mode 100644
index 0000000..99e8451
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/repo
@@ -0,0 +1 @@
+Source from voltha-lib-go
\ No newline at end of file
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/todo b/makefiles/lint/yaml./byrepo/voltha-lib-go/todo
new file mode 100644
index 0000000..8400c64
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/todo
@@ -0,0 +1,39 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+# -----------------------------------------------------------------------
+
+##-------------------##
+##---] GLOBALS [---##
+##-------------------##
+env-clean = /usr/bin/env --ignore-environment
+xargs-n1 := xargs -0 -t -n1 --no-run-if-empty
+
+yamllint := $(env-clean) $(YAMLLINT)
+yamllint-args := -c .yamllint
+
+##-------------------##
+##---] TARGETS [---##
+##-------------------##
+lint : lint-yaml
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+lint-yaml:
+ $(HIDE)$(env-clean) find . -name '*.yaml' -type f -print0 \
+ | $(xargs-n1) $(yamllint) $(yamllint-args)
+
+## -----------------------------------------------------------------------
+## -----------------------------------------------------------------------
+help:
+ @echo
+ @echo "USAGE: $(MAKE)"
+ @echo " lint perform syntax checks on source"
+ @echo " test perform syntax checks on source"
+ @echo " pre-check Verify tools and deps are available for testing"
+ @echo
+ @echo "[LINT]"
+ @echo " lint-json Syntax check .json sources"
+ @echo " lint-yaml Syntax check .yaml sources"
+ @echo
+# [EOF]
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/urls b/makefiles/lint/yaml./byrepo/voltha-lib-go/urls
new file mode 100644
index 0000000..8747658
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/urls
@@ -0,0 +1,5 @@
+# -*- makefile -*-
+
+https://yamllint.readthedocs.io/en/stable/configuration.html
+
+# [EOF]
\ No newline at end of file
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.helm b/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.helm
new file mode 100644
index 0000000..bf1d2b9
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.helm
@@ -0,0 +1,32 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+#
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+---
+# yamllint.conf
+
+extends: default
+
+rules:
+ empty-lines:
+ max-end: 1
+ line-length:
+ max: 120
+ braces:
+ min-spaces-inside: 0
+ max-spaces-inside: 1
diff --git a/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.mk b/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.mk
new file mode 100644
index 0000000..fb56e3a
--- /dev/null
+++ b/makefiles/lint/yaml./byrepo/voltha-lib-go/yamllint.mk
@@ -0,0 +1,72 @@
+# -*- makefile -*-
+# -----------------------------------------------------------------------
+# Copyright 2022-2023 Open Networking Foundation (ONF) and the ONF Contributors
+#
+# 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.
+#
+# SPDX-FileCopyrightText: 2022 Open Networking Foundation (ONF) and the ONF Contributors
+# SPDX-License-Identifier: Apache-2.0
+# -----------------------------------------------------------------------
+
+$(if $(DEBUG),$(warning ENTER))
+
+--onf-mk-lint-yaml-- := true# # Inhibit loading downstream lint-yaml targets
+
+# yamllint := $(env-clean) yamllint
+# yamllint := $(activate) && yamllint
+
+YAMLLINT = $(activate) && yamllint
+
+## -------------------------------
+## Add requirement(s) for checking
+## -------------------------------
+yamllint-cfg := yamllint.helm
+yamllint-conf = $(wildcard $(yamllint-cfg) $(ONF_MAKEDIR)/lint/yaml/$(yamllint-cfg))
+yamllint-args += $(addprefix --config-file$(space),$(yamllint-conf))
+yamllint-args += --strict
+
+## -----------------------------------------------------------------------
+## Intent: Use the yaml command to perform syntax checking.
+## -----------------------------------------------------------------------
+ifndef NO-LINT-YAML
+ # lint-yaml-mode := $(if $(have-yaml-files),modified,all)
+ lint : lint-yaml
+ lint-yaml : lint-yaml-votlha-lib-go
+# lint-yaml : lint-yaml-all-votlha-lib-go-$(lint-yaml-mode)
+endif# NO-LINT-YAML
+
+## -----------------------------------------------------------------------
+## ----------------------------------------------------------------------
+lint-yaml-votlha-lib-go: lint-yaml-cmd-version
+
+ $(call banner-enter,Target $@)
+ $(HIDE)$(MAKE) --no-print-directory lint-yaml-install
+
+ $(HIDE)$(env-clean) $(call gen-yaml-find-cmd) \
+ | $(env-clean) $(xargs-cmd) -I'{}' \
+ bash -c "$(YAMLLINT) $(yamllint-args) {}"
+ $(call banner-leave,Target $@)
+
+## -----------------------------------------------------------------------
+## Intent: Display command usage
+## -----------------------------------------------------------------------
+help::
+ # lint-yaml help already displayed by lint/yaml/help.mk
+ ifdef VERBOSE
+ @echo ' $(MAKE) lint-yaml YAML_FILES=...'
+ @echo ' lint-yaml-votlha-lib-go lint-yaml for repo:voltha-lib-go'
+ endif
+
+$(if $(DEBUG),$(warning LEAVE))
+
+# [EOF]