diff --git a/.rat-excludes b/.rat-excludes new file mode 100644 index 00000000..8d586fa3 --- /dev/null +++ b/.rat-excludes @@ -0,0 +1,107 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +# --------------------------------------------------------------------------- +# Apache RAT exclusion list +# Patterns are Ant-style globs; one per line. +# Files listed here legitimately carry no Apache license header. +# --------------------------------------------------------------------------- + +# Python bytecode and tool caches +**/__pycache__/** +**/*.pyc +**/*.pyo +.pytest_cache/** +.ruff_cache/** +*.egg-info/** + +# Truly empty __init__.py namespace markers (0 bytes, no content to annotate). +# Non-empty __init__.py files carry a full license header and are checked by RAT. +solrorbit/builder/**/__init__.py +solrorbit/tools/__init__.py +solrorbit/visualizations/__init__.py +tests/builder/**/__init__.py +tests/unit/__init__.py + +# Version / lock / pin files (no meaningful content to annotate) +version.txt +.python-version +docs/Gemfile.lock +docs/.ruby-version + +# Configuration and data resource files shipped with the package +# (ASF policy does not require headers in pure config/data files) +**/*.ini +**/*.json +**/*.yml +**/*.yaml +**/*.j2 +**/*.properties +**/*.options +**/*.xml + +# Test fixtures and binary test data +tests/builder/data/** +tests/utils/resources/** +it/resources/** + +# Binary and image files +**/*.svg +**/*.png +**/*.tar +**/*.tar.gz +**/*.tar.bz2 +**/*.tgz +**/*.bz2 +**/*.gz +**/*.zip +**/*.zst +**/*.crt +**/*.key + +# Documentation (Markdown source and Jekyll-generated output) +**/*.md +docs/_site/** +docs/_includes/** +docs/_layouts/** +docs/_sass/** +docs/assets/** +docs/Gemfile + +# GitHub and CI metadata files +.github/** +.ci/variables.json + +# IDE project files +.idea/** + +# Root-level project metadata +# (LICENSE and NOTICE are already excluded by RAT by default) +Makefile +pyproject.toml +MANIFEST.in + +# Tool and infrastructure config files (no license header required) +.coveragerc +**/.gitignore +.asf.yaml +.fossa.yml +docker/Dockerfile +docker/.dockerignore + +# Version files +solrorbit/min-version.txt diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 9860fd69..67481db3 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -11,6 +11,7 @@ Apache Solr Orbit. - [Running Tests](#running-tests) - [Submitting a Pull Request](#submitting-a-pull-request) - [Developing Breaking Changes](#developing-breaking-changes) +- [Release](#release) - [Miscellaneous](#miscellaneous) ## Prerequisites @@ -122,6 +123,32 @@ make it Develop breaking changes in a dedicated feature branch. Rebase onto `main` before the next release and merge at that point. +## Release + +### License audit (Apache RAT) + +[Apache RAT](https://creadur.apache.org/rat/) is required by ASF release policy to verify +that every file in a source release carries an approved license header. Run it before +cutting a release: + +```bash +make rat +``` + +RAT downloads its runner JAR to `~/.solr-orbit/cache/apache-rat/` on first use (requires +Python 3 and `java`). Exclusions for files that legitimately carry no header (test fixtures, +config files, generated output, binaries) are listed in `.rat-excludes`. + +If RAT reports unexpected unapproved files, either: +- Add the Apache license header to the file, or +- Add an exclusion pattern to `.rat-excludes` with a comment explaining why the file is exempt + +The full release pre-flight is run via: + +```bash +make release-checks release_version=0.9.2 next_version=0.9.3 +``` + ## Miscellaneous ### Avoiding secrets in commits diff --git a/Makefile b/Makefile index 6f927f82..6d9a15eb 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,10 @@ VERSIONS = $(shell jq -r '.python_versions | .[]' .ci/variables.json | sed '$$d' VERSION312 = $(shell jq -r '.python_versions | .[]' .ci/variables.json | sed '$$d' | grep 3\.12) PYENV_ERROR = "\033[0;31mIMPORTANT\033[0m: Please install pyenv and run \033[0;31meval \"\$$(pyenv init -)\"\033[0m.\n" +RAT_VERSION = 0.18 +RAT_JAR_DIR = $(HOME)/.solr-orbit/cache/apache-rat +RAT_JAR = $(RAT_JAR_DIR)/apache-rat-$(RAT_VERSION).jar + all: develop pyinst: @@ -98,11 +102,18 @@ coverage: coverage run -m pytest tests/ coverage html +$(RAT_JAR): + $(PYTHON) scripts/download-rat.py $(RAT_VERSION) $(RAT_JAR) + +rat: $(RAT_JAR) + @java -version > /dev/null 2>&1 || { echo "ERROR: java not found on PATH; install a JDK to run Apache RAT"; exit 1; } + java -jar $(RAT_JAR) --input-exclude-file .rat-excludes -- . + release-checks: - ./release-checks.sh $(release_version) $(next_version) + ./scripts/release-checks.sh $(release_version) $(next_version) # usage: e.g. make release release_version=0.9.2 next_version=0.9.3 release: release-checks clean it ./release.sh $(release_version) $(next_version) -.PHONY: install clean python-caches-clean tox-env-clean test it it312 benchmark coverage release release-checks pyinst +.PHONY: install clean python-caches-clean tox-env-clean lint format test it it312 benchmark coverage rat release release-checks pyinst diff --git a/scripts/download-rat.py b/scripts/download-rat.py new file mode 100644 index 00000000..135c4e16 --- /dev/null +++ b/scripts/download-rat.py @@ -0,0 +1,99 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +"""Download and verify the Apache RAT JAR. + +Usage: python3 scripts/download-rat.py + +Downloads apache-rat--bin.tar.gz from the Apache mirror, +verifies its SHA-512 checksum, extracts the JAR, and writes it to +. +""" + +import hashlib +import io +import sys +import tarfile +import urllib.error +import urllib.request +from pathlib import Path + +PRIMARY_URL = "https://downloads.apache.org/creadur" +ARCHIVE_URL = "https://archive.apache.org/dist/creadur" + + +def download(url: str) -> bytes: + print(f"Downloading {url}", flush=True) + with urllib.request.urlopen(url) as resp: + return resp.read() + + +def download_with_fallback(primary: str, archive: str) -> bytes: + """Try the primary mirror; fall back to the archive mirror on 404.""" + try: + return download(primary) + except urllib.error.HTTPError as exc: + if exc.code != 404: + raise + print("Primary URL returned 404; trying archive mirror …", flush=True) + return download(archive) + + +def main() -> None: + if len(sys.argv) != 3: + print(f"Usage: {sys.argv[0]} ", file=sys.stderr) + sys.exit(1) + + version, target = sys.argv[1], Path(sys.argv[2]) + tarball_name = f"apache-rat-{version}-bin.tar.gz" + subpath = f"apache-rat-{version}/{tarball_name}" + tar_url = f"{PRIMARY_URL}/{subpath}" + sha_url = f"{tar_url}.sha512" + tar_archive_url = f"{ARCHIVE_URL}/{subpath}" + sha_archive_url = f"{tar_archive_url}.sha512" + + tarball = download_with_fallback(tar_url, tar_archive_url) + # Apache .sha512 files use coreutils format: " " or BSD + # format: "SHA512 () = ". Extract the bare hex token. + sha_content = download_with_fallback(sha_url, sha_archive_url).decode().strip() + if "=" in sha_content: + # BSD format + expected_hex = sha_content.split("=", 1)[1].strip() + else: + # GNU coreutils format: first whitespace-delimited token is the hash + expected_hex = sha_content.split()[0] + + actual_hex = hashlib.sha512(tarball).hexdigest() + if actual_hex != expected_hex: + print(f"SHA-512 mismatch for {tarball_name}!", file=sys.stderr) + print(f" expected: {expected_hex}", file=sys.stderr) + print(f" actual: {actual_hex}", file=sys.stderr) + sys.exit(1) + print(f"SHA-512 verified: {tarball_name}", flush=True) + + jar_member = f"apache-rat-{version}/apache-rat-{version}.jar" + with tarfile.open(fileobj=io.BytesIO(tarball), mode="r:gz") as tf: + member = tf.getmember(jar_member) + jar_data = tf.extractfile(member).read() + + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(jar_data) + print(f"JAR written to {target}", flush=True) + + +if __name__ == "__main__": + main() diff --git a/scripts/release-checks.sh b/scripts/release-checks.sh new file mode 100755 index 00000000..fd4e5bd0 --- /dev/null +++ b/scripts/release-checks.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. + +set -euo pipefail +cd "$(dirname "$0")/.." + +release_version=${1:-} +next_version=${2:-} + +if [ -z "$release_version" ] || [ -z "$next_version" ]; then + echo "Usage: $0 " + echo " e.g. $0 0.9.2 0.9.3" + exit 1 +fi + +echo "Running release checks for version ${release_version} (next: ${next_version})" + +echo "--- Apache RAT license audit ---" +make rat + +echo "All release checks passed for version ${release_version}." diff --git a/solrorbit/aggregator.py b/solrorbit/aggregator.py index 7f099314..a8d5eaba 100644 --- a/solrorbit/aggregator.py +++ b/solrorbit/aggregator.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import os import statistics from typing import Any, Dict, List, Union diff --git a/solrorbit/builder/cluster_builder.py b/solrorbit/builder/cluster_builder.py index abdfdb09..2b219a69 100644 --- a/solrorbit/builder/cluster_builder.py +++ b/solrorbit/builder/cluster_builder.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. """ The ClusterBuilder is the interface into the builder system from the Dispatcher. This class orchestrates all of the builder subcomponents used to create and delete a cluster. diff --git a/solrorbit/builder/configs/listers/plugin_config_instance_lister.py b/solrorbit/builder/configs/listers/plugin_config_instance_lister.py index b11a50d6..a85c4559 100644 --- a/solrorbit/builder/configs/listers/plugin_config_instance_lister.py +++ b/solrorbit/builder/configs/listers/plugin_config_instance_lister.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import logging import os diff --git a/solrorbit/builder/configs/utils/config_path_resolver.py b/solrorbit/builder/configs/utils/config_path_resolver.py index 608c9bd6..49c5236b 100644 --- a/solrorbit/builder/configs/utils/config_path_resolver.py +++ b/solrorbit/builder/configs/utils/config_path_resolver.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import os from solrorbit.exceptions import SystemSetupError diff --git a/solrorbit/builder/downloaders/builders/binary_builder.py b/solrorbit/builder/downloaders/builders/binary_builder.py index 82a6934a..af5fda4c 100644 --- a/solrorbit/builder/downloaders/builders/binary_builder.py +++ b/solrorbit/builder/downloaders/builders/binary_builder.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from abc import ABC, abstractmethod diff --git a/solrorbit/builder/downloaders/builders/source_binary_builder.py b/solrorbit/builder/downloaders/builders/source_binary_builder.py index 0322e8c2..34b9aee8 100644 --- a/solrorbit/builder/downloaders/builders/source_binary_builder.py +++ b/solrorbit/builder/downloaders/builders/source_binary_builder.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import logging import os diff --git a/solrorbit/builder/downloaders/repositories/plugin_distribution_repository_provider.py b/solrorbit/builder/downloaders/repositories/plugin_distribution_repository_provider.py index 38a30264..e3fa64aa 100644 --- a/solrorbit/builder/downloaders/repositories/plugin_distribution_repository_provider.py +++ b/solrorbit/builder/downloaders/repositories/plugin_distribution_repository_provider.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. class PluginDistributionRepositoryProvider: def __init__(self, plugin, repository_url_provider): self.plugin = plugin diff --git a/solrorbit/builder/downloaders/repositories/repository_url_provider.py b/solrorbit/builder/downloaders/repositories/repository_url_provider.py index 2ad32508..6f64755b 100644 --- a/solrorbit/builder/downloaders/repositories/repository_url_provider.py +++ b/solrorbit/builder/downloaders/repositories/repository_url_provider.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from functools import reduce from solrorbit.exceptions import SystemSetupError diff --git a/solrorbit/builder/downloaders/repositories/source_repository_provider.py b/solrorbit/builder/downloaders/repositories/source_repository_provider.py index 72a1fd9a..227a0de2 100644 --- a/solrorbit/builder/downloaders/repositories/source_repository_provider.py +++ b/solrorbit/builder/downloaders/repositories/source_repository_provider.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import logging import os from collections import OrderedDict diff --git a/solrorbit/builder/executors/exception_handling_shell_executor.py b/solrorbit/builder/executors/exception_handling_shell_executor.py index 6a9135e6..5824712a 100644 --- a/solrorbit/builder/executors/exception_handling_shell_executor.py +++ b/solrorbit/builder/executors/exception_handling_shell_executor.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.builder.executors.shell_executor import ShellExecutor from solrorbit.exceptions import ExecutorError diff --git a/solrorbit/builder/executors/local_shell_executor.py b/solrorbit/builder/executors/local_shell_executor.py index c5fa3585..a9b6f440 100644 --- a/solrorbit/builder/executors/local_shell_executor.py +++ b/solrorbit/builder/executors/local_shell_executor.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import subprocess from solrorbit.builder.executors.shell_executor import ShellExecutor diff --git a/solrorbit/builder/executors/shell_executor.py b/solrorbit/builder/executors/shell_executor.py index 4a3ff9bc..9d926979 100644 --- a/solrorbit/builder/executors/shell_executor.py +++ b/solrorbit/builder/executors/shell_executor.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from abc import ABC, abstractmethod diff --git a/solrorbit/builder/installers/exception_handling_installer.py b/solrorbit/builder/installers/exception_handling_installer.py index e2960d40..fd97916e 100644 --- a/solrorbit/builder/installers/exception_handling_installer.py +++ b/solrorbit/builder/installers/exception_handling_installer.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.builder.installers.installer import Installer from solrorbit.exceptions import InstallError diff --git a/solrorbit/builder/installers/preparers/preparer.py b/solrorbit/builder/installers/preparers/preparer.py index e1dc7059..099fa1be 100644 --- a/solrorbit/builder/installers/preparers/preparer.py +++ b/solrorbit/builder/installers/preparers/preparer.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from abc import ABC, abstractmethod diff --git a/solrorbit/builder/launchers/docker_launcher.py b/solrorbit/builder/launchers/docker_launcher.py index 77306dfa..3fe9cffa 100644 --- a/solrorbit/builder/launchers/docker_launcher.py +++ b/solrorbit/builder/launchers/docker_launcher.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import logging import os diff --git a/solrorbit/builder/launchers/exception_handling_launcher.py b/solrorbit/builder/launchers/exception_handling_launcher.py index c1056a7d..fb316a23 100644 --- a/solrorbit/builder/launchers/exception_handling_launcher.py +++ b/solrorbit/builder/launchers/exception_handling_launcher.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.builder.launchers.launcher import Launcher from solrorbit.exceptions import LaunchError diff --git a/solrorbit/builder/launchers/no_op_launcher.py b/solrorbit/builder/launchers/no_op_launcher.py index a804c26e..2e8536f9 100644 --- a/solrorbit/builder/launchers/no_op_launcher.py +++ b/solrorbit/builder/launchers/no_op_launcher.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.builder.launchers.launcher import Launcher diff --git a/solrorbit/builder/models/architecture_types.py b/solrorbit/builder/models/architecture_types.py index 14854d92..3fb46447 100644 --- a/solrorbit/builder/models/architecture_types.py +++ b/solrorbit/builder/models/architecture_types.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/bootstrap_phase.py b/solrorbit/builder/models/bootstrap_phase.py index a5eea397..f931e8cf 100644 --- a/solrorbit/builder/models/bootstrap_phase.py +++ b/solrorbit/builder/models/bootstrap_phase.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/cluster.py b/solrorbit/builder/models/cluster.py index 2dfbd7f2..37bb3c52 100644 --- a/solrorbit/builder/models/cluster.py +++ b/solrorbit/builder/models/cluster.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass from typing import List diff --git a/solrorbit/builder/models/cluster_config_descriptor.py b/solrorbit/builder/models/cluster_config_descriptor.py index 1aaec117..b8e765cd 100644 --- a/solrorbit/builder/models/cluster_config_descriptor.py +++ b/solrorbit/builder/models/cluster_config_descriptor.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass, field from typing import List diff --git a/solrorbit/builder/models/cluster_config_instance.py b/solrorbit/builder/models/cluster_config_instance.py index 3ade3996..2f8aeb28 100644 --- a/solrorbit/builder/models/cluster_config_instance.py +++ b/solrorbit/builder/models/cluster_config_instance.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass, field from typing import List diff --git a/solrorbit/builder/models/cluster_config_types.py b/solrorbit/builder/models/cluster_config_types.py index bd570115..93ec5d87 100644 --- a/solrorbit/builder/models/cluster_config_types.py +++ b/solrorbit/builder/models/cluster_config_types.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/cluster_flavors.py b/solrorbit/builder/models/cluster_flavors.py index a26fc44e..270223ea 100644 --- a/solrorbit/builder/models/cluster_flavors.py +++ b/solrorbit/builder/models/cluster_flavors.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/cluster_infra_providers.py b/solrorbit/builder/models/cluster_infra_providers.py index 3a6b9cd7..5e4cb129 100644 --- a/solrorbit/builder/models/cluster_infra_providers.py +++ b/solrorbit/builder/models/cluster_infra_providers.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/config_instance_types.py b/solrorbit/builder/models/config_instance_types.py index b75a01e9..84da3663 100644 --- a/solrorbit/builder/models/config_instance_types.py +++ b/solrorbit/builder/models/config_instance_types.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from enum import Enum diff --git a/solrorbit/builder/models/host.py b/solrorbit/builder/models/host.py index 5ab00945..2d148c18 100644 --- a/solrorbit/builder/models/host.py +++ b/solrorbit/builder/models/host.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass from solrorbit.builder.models.node import Node diff --git a/solrorbit/builder/models/node.py b/solrorbit/builder/models/node.py index 21de8405..267449d3 100644 --- a/solrorbit/builder/models/node.py +++ b/solrorbit/builder/models/node.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass from typing import List diff --git a/solrorbit/builder/models/plugin_config_instance.py b/solrorbit/builder/models/plugin_config_instance.py index 58590f2f..1544fbb4 100644 --- a/solrorbit/builder/models/plugin_config_instance.py +++ b/solrorbit/builder/models/plugin_config_instance.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from dataclasses import dataclass, field from typing import List diff --git a/solrorbit/builder/provisioners/provisioner.py b/solrorbit/builder/provisioners/provisioner.py index 572c0cd0..84fcd28b 100644 --- a/solrorbit/builder/provisioners/provisioner.py +++ b/solrorbit/builder/provisioners/provisioner.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from abc import ABC, abstractmethod diff --git a/solrorbit/builder/utils/artifact_variables_provider.py b/solrorbit/builder/utils/artifact_variables_provider.py index a463e02a..37e87a3d 100644 --- a/solrorbit/builder/utils/artifact_variables_provider.py +++ b/solrorbit/builder/utils/artifact_variables_provider.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.builder.models.architecture_types import ArchitectureTypes diff --git a/solrorbit/builder/utils/git_manager.py b/solrorbit/builder/utils/git_manager.py index f7a938fa..73cfee52 100644 --- a/solrorbit/builder/utils/git_manager.py +++ b/solrorbit/builder/utils/git_manager.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. class GitManager: def __init__(self, executor): self.executor = executor diff --git a/solrorbit/builder/utils/host_cleaner.py b/solrorbit/builder/utils/host_cleaner.py index 52d679df..3dc8bd5d 100644 --- a/solrorbit/builder/utils/host_cleaner.py +++ b/solrorbit/builder/utils/host_cleaner.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import logging from solrorbit.utils import console diff --git a/solrorbit/builder/utils/jdk_resolver.py b/solrorbit/builder/utils/jdk_resolver.py index 2a4759e6..f4709586 100644 --- a/solrorbit/builder/utils/jdk_resolver.py +++ b/solrorbit/builder/utils/jdk_resolver.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import os import re diff --git a/solrorbit/builder/utils/path_manager.py b/solrorbit/builder/utils/path_manager.py index 89211547..22e45d1c 100644 --- a/solrorbit/builder/utils/path_manager.py +++ b/solrorbit/builder/utils/path_manager.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit.exceptions import ExecutorError from solrorbit.utils import io diff --git a/solrorbit/builder/utils/template_renderer.py b/solrorbit/builder/utils/template_renderer.py index 8f00af30..4994c6c9 100644 --- a/solrorbit/builder/utils/template_renderer.py +++ b/solrorbit/builder/utils/template_renderer.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import jinja2 from jinja2 import select_autoescape diff --git a/solrorbit/utils/periodic_waiter.py b/solrorbit/utils/periodic_waiter.py index 78478cd9..641703ee 100644 --- a/solrorbit/utils/periodic_waiter.py +++ b/solrorbit/utils/periodic_waiter.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from solrorbit import time diff --git a/tests/aggregator_test.py b/tests/aggregator_test.py index 7bc046ad..d73df28d 100644 --- a/tests/aggregator_test.py +++ b/tests/aggregator_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest.mock import Mock import pytest from solrorbit import config diff --git a/tests/builder/configs/listers/plugin_config_instance_lister_test.py b/tests/builder/configs/listers/plugin_config_instance_lister_test.py index 9ac48922..87e81326 100644 --- a/tests/builder/configs/listers/plugin_config_instance_lister_test.py +++ b/tests/builder/configs/listers/plugin_config_instance_lister_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import os from unittest import TestCase from unittest.mock import Mock diff --git a/tests/builder/configs/utils/config_path_resolver_test.py b/tests/builder/configs/utils/config_path_resolver_test.py index 2a73ad24..3d35bf98 100644 --- a/tests/builder/configs/utils/config_path_resolver_test.py +++ b/tests/builder/configs/utils/config_path_resolver_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/builders/source_binary_builder_test.py b/tests/builder/downloaders/builders/source_binary_builder_test.py index c8011ef1..44511fc0 100644 --- a/tests/builder/downloaders/builders/source_binary_builder_test.py +++ b/tests/builder/downloaders/builders/source_binary_builder_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/distribution_downloader_test.py b/tests/builder/downloaders/distribution_downloader_test.py index 8364e1d5..2fce2c4e 100644 --- a/tests/builder/downloaders/distribution_downloader_test.py +++ b/tests/builder/downloaders/distribution_downloader_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/repositories/distribution_repository_provider_test.py b/tests/builder/downloaders/repositories/distribution_repository_provider_test.py index 1b16db33..7f71a93e 100644 --- a/tests/builder/downloaders/repositories/distribution_repository_provider_test.py +++ b/tests/builder/downloaders/repositories/distribution_repository_provider_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/repositories/plugin_distribution_repository_provider_test.py b/tests/builder/downloaders/repositories/plugin_distribution_repository_provider_test.py index 7c753fd0..fbba816c 100644 --- a/tests/builder/downloaders/repositories/plugin_distribution_repository_provider_test.py +++ b/tests/builder/downloaders/repositories/plugin_distribution_repository_provider_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/repositories/repository_url_provider_test.py b/tests/builder/downloaders/repositories/repository_url_provider_test.py index 77a48699..b5a17bbc 100644 --- a/tests/builder/downloaders/repositories/repository_url_provider_test.py +++ b/tests/builder/downloaders/repositories/repository_url_provider_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/repositories/source_repository_provider_test.py b/tests/builder/downloaders/repositories/source_repository_provider_test.py index 734a30d9..9f0f92e8 100644 --- a/tests/builder/downloaders/repositories/source_repository_provider_test.py +++ b/tests/builder/downloaders/repositories/source_repository_provider_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/downloaders/source_downloader_test.py b/tests/builder/downloaders/source_downloader_test.py index 42180b7c..53fb0d09 100644 --- a/tests/builder/downloaders/source_downloader_test.py +++ b/tests/builder/downloaders/source_downloader_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/executors/exception_handling_executor_test.py b/tests/builder/executors/exception_handling_executor_test.py index c078584e..d87a2c60 100644 --- a/tests/builder/executors/exception_handling_executor_test.py +++ b/tests/builder/executors/exception_handling_executor_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import unittest.mock as mock from unittest import TestCase diff --git a/tests/builder/executors/shell_executor_test.py b/tests/builder/executors/shell_executor_test.py index e5eee723..bf4234f2 100644 --- a/tests/builder/executors/shell_executor_test.py +++ b/tests/builder/executors/shell_executor_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import unittest.mock as mock from unittest import TestCase diff --git a/tests/builder/installers/bare_installer_test.py b/tests/builder/installers/bare_installer_test.py index 7b86d690..dd8f84dc 100644 --- a/tests/builder/installers/bare_installer_test.py +++ b/tests/builder/installers/bare_installer_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/installers/docker_installer_test.py b/tests/builder/installers/docker_installer_test.py index 52c3cf74..68c1dd02 100644 --- a/tests/builder/installers/docker_installer_test.py +++ b/tests/builder/installers/docker_installer_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. # pylint: disable=protected-access import os diff --git a/tests/builder/installers/preparers/solr_preparer_test.py b/tests/builder/installers/preparers/solr_preparer_test.py index cc1ed7d3..a8882b20 100644 --- a/tests/builder/installers/preparers/solr_preparer_test.py +++ b/tests/builder/installers/preparers/solr_preparer_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import os from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/launchers/docker_launcher_test.py b/tests/builder/launchers/docker_launcher_test.py index 02fd2386..c72f65de 100644 --- a/tests/builder/launchers/docker_launcher_test.py +++ b/tests/builder/launchers/docker_launcher_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. # pylint: disable=protected-access from unittest import TestCase, mock diff --git a/tests/builder/launchers/local_process_launcher_test.py b/tests/builder/launchers/local_process_launcher_test.py index 61c76faa..9ec48c23 100644 --- a/tests/builder/launchers/local_process_launcher_test.py +++ b/tests/builder/launchers/local_process_launcher_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. # pylint: disable=protected-access import os diff --git a/tests/builder/utils/artifact_variables_provider_test.py b/tests/builder/utils/artifact_variables_provider_test.py index 2dd8fb76..be97f59c 100644 --- a/tests/builder/utils/artifact_variables_provider_test.py +++ b/tests/builder/utils/artifact_variables_provider_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase from unittest.mock import Mock diff --git a/tests/builder/utils/config_applier_test.py b/tests/builder/utils/config_applier_test.py index 48f05e82..ce4b575f 100644 --- a/tests/builder/utils/config_applier_test.py +++ b/tests/builder/utils/config_applier_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock, patch, mock_open diff --git a/tests/builder/utils/host_cleaner_test.py b/tests/builder/utils/host_cleaner_test.py index be5cea6d..d1397c1e 100644 --- a/tests/builder/utils/host_cleaner_test.py +++ b/tests/builder/utils/host_cleaner_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/utils/java_home_resolver_test.py b/tests/builder/utils/java_home_resolver_test.py index b9045882..c51fb56c 100644 --- a/tests/builder/utils/java_home_resolver_test.py +++ b/tests/builder/utils/java_home_resolver_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase from unittest.mock import Mock diff --git a/tests/builder/utils/jdk_resolver_test.py b/tests/builder/utils/jdk_resolver_test.py index e9845887..679ba0f5 100644 --- a/tests/builder/utils/jdk_resolver_test.py +++ b/tests/builder/utils/jdk_resolver_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase from unittest.mock import Mock diff --git a/tests/builder/utils/path_manager_test.py b/tests/builder/utils/path_manager_test.py index a305bba1..8ff0a170 100644 --- a/tests/builder/utils/path_manager_test.py +++ b/tests/builder/utils/path_manager_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/builder/utils/template_renderer_test.py b/tests/builder/utils/template_renderer_test.py index bf825888..e048f348 100644 --- a/tests/builder/utils/template_renderer_test.py +++ b/tests/builder/utils/template_renderer_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. from unittest import TestCase, mock from unittest.mock import Mock diff --git a/tests/utils/periodic_waiter_test.py b/tests/utils/periodic_waiter_test.py index a7712cc8..2705d5d5 100644 --- a/tests/utils/periodic_waiter_test.py +++ b/tests/utils/periodic_waiter_test.py @@ -1,3 +1,25 @@ +# SPDX-License-Identifier: Apache-2.0 +# +# Originally developed by OpenSearch Contributors; licensed under the Apache License, Version 2.0. +# License header was absent in the original source; added when adopted into Apache Solr Orbit. +# Modified by Apache Solr contributors; see git log for details. +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. import sys from unittest import TestCase from unittest.mock import Mock