diff options
Diffstat (limited to 'k8s')
-rw-r--r-- | k8s/.gitignore | 71 | ||||
-rw-r--r-- | k8s/LICENSE.txt | 5 | ||||
-rw-r--r-- | k8s/configure/__init__.py | 3 | ||||
-rw-r--r-- | k8s/k8s-node-type.yaml | 3 | ||||
-rw-r--r-- | k8s/k8sclient/__init__.py | 5 | ||||
-rw-r--r-- | k8s/k8sclient/k8sclient.py | 1 | ||||
-rw-r--r-- | k8s/k8splugin/__init__.py | 3 | ||||
-rw-r--r-- | k8s/k8splugin/cloudify_importer.py | 1 | ||||
-rw-r--r-- | k8s/k8splugin/decorators.py | 3 | ||||
-rw-r--r-- | k8s/k8splugin/discovery.py | 3 | ||||
-rw-r--r-- | k8s/k8splugin/exceptions.py | 3 | ||||
-rw-r--r-- | k8s/k8splugin/utils.py | 3 | ||||
-rw-r--r-- | k8s/tests/common.py | 2 | ||||
-rw-r--r-- | k8s/tests/conftest.py | 3 | ||||
-rw-r--r-- | k8s/tests/test_decorators.py | 5 | ||||
-rw-r--r-- | k8s/tests/test_discovery.py | 11 | ||||
-rw-r--r-- | k8s/tests/test_k8sclient.py | 2 | ||||
-rw-r--r-- | k8s/tests/test_k8sclient_deploy.py | 2 | ||||
-rw-r--r-- | k8s/tests/test_tasks.py | 3 | ||||
-rw-r--r-- | k8s/tests/test_utils.py | 3 | ||||
-rw-r--r-- | k8s/tox.ini | 5 |
21 files changed, 30 insertions, 110 deletions
diff --git a/k8s/.gitignore b/k8s/.gitignore index be63b67..6996455 100644 --- a/k8s/.gitignore +++ b/k8s/.gitignore @@ -1,71 +1,2 @@ +# local additions to plugins .gitignore cfyhelper -.cloudify -*.swp -*.swn -*.swo -.DS_Store -.project -.pydevproject -venv - - -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coveragerc -.coverage.* -.cache -.pytest_cache/ -xunit-results.xml -nosetests.xml -coverage.xml -*,cover - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ diff --git a/k8s/LICENSE.txt b/k8s/LICENSE.txt index 43098d1..a4ece14 100644 --- a/k8s/LICENSE.txt +++ b/k8s/LICENSE.txt @@ -1,7 +1,7 @@ ============LICENSE_START======================================================= org.onap.dcae ================================================================================ -Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,10 +16,9 @@ See the License for the specific language governing permissions and limitations under the License. ============LICENSE_END========================================================= -ECOMP is a trademark and service mark of AT&T Intellectual Property. -Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. =================================================================== Licensed under the Creative Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except in compliance with the License. diff --git a/k8s/configure/__init__.py b/k8s/configure/__init__.py index b986659..8099c73 100644 --- a/k8s/configure/__init__.py +++ b/k8s/configure/__init__.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,4 +16,3 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property.
\ No newline at end of file diff --git a/k8s/k8s-node-type.yaml b/k8s/k8s-node-type.yaml index 3220bba..af50e70 100644 --- a/k8s/k8s-node-type.yaml +++ b/k8s/k8s-node-type.yaml @@ -1,5 +1,5 @@ # ================================================================================ -# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2020 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,7 +15,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. tosca_definitions_version: cloudify_dsl_1_3 diff --git a/k8s/k8sclient/__init__.py b/k8s/k8sclient/__init__.py index 6a53440..9974199 100644 --- a/k8s/k8sclient/__init__.py +++ b/k8s/k8sclient/__init__.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,5 +16,4 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. -from .k8sclient import deploy, undeploy, is_available, scale, upgrade, rollback, execute_command_in_deployment, parse_ports
\ No newline at end of file +from .k8sclient import deploy, undeploy, is_available, scale, upgrade, rollback, execute_command_in_deployment, parse_ports diff --git a/k8s/k8sclient/k8sclient.py b/k8s/k8sclient/k8sclient.py index e73d96a..0096182 100644 --- a/k8s/k8sclient/k8sclient.py +++ b/k8s/k8sclient/k8sclient.py @@ -17,7 +17,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import os import re import uuid diff --git a/k8s/k8splugin/__init__.py b/k8s/k8splugin/__init__.py index 7ca69b7..85e4411 100644 --- a/k8s/k8splugin/__init__.py +++ b/k8s/k8splugin/__init__.py @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. # REVIEW: Tried to source the version from here but you run into import issues # because "tasks" module is loaded. This method seems to be the PEP 396 @@ -25,4 +24,4 @@ from .tasks import create_for_components, create_for_components_with_streams, \ create_and_start_container, create_and_start_container_for_components, \ - stop_and_remove_container, cleanup_discovery, policy_update, scale, update_image
\ No newline at end of file + stop_and_remove_container, cleanup_discovery, policy_update, scale, update_image diff --git a/k8s/k8splugin/cloudify_importer.py b/k8s/k8splugin/cloudify_importer.py index 10a6cf5..b2e7bad 100644 --- a/k8s/k8splugin/cloudify_importer.py +++ b/k8s/k8splugin/cloudify_importer.py @@ -1,6 +1,7 @@ # ####### # Copyright (c) 2017 GigaSpaces Technologies Ltd. All rights reserved # Copyright (c) 2019 Pantheon.tech. All rights reserved +# Copyright (c) 2020 AT&T Intellectual Property. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/k8s/k8splugin/decorators.py b/k8s/k8splugin/decorators.py index b9b32bf..4137601 100644 --- a/k8s/k8splugin/decorators.py +++ b/k8s/k8splugin/decorators.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import copy diff --git a/k8s/k8splugin/discovery.py b/k8s/k8splugin/discovery.py index 76c160a..99f5023 100644 --- a/k8s/k8splugin/discovery.py +++ b/k8s/k8splugin/discovery.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +17,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import json import logging diff --git a/k8s/k8splugin/exceptions.py b/k8s/k8splugin/exceptions.py index 0d8a341..1c398c6 100644 --- a/k8s/k8splugin/exceptions.py +++ b/k8s/k8splugin/exceptions.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. class DockerPluginDeploymentError(RuntimeError): pass diff --git a/k8s/k8splugin/utils.py b/k8s/k8splugin/utils.py index 6475aaa..73eef61 100644 --- a/k8s/k8splugin/utils.py +++ b/k8s/k8splugin/utils.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); @@ -17,7 +17,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import string import random diff --git a/k8s/tests/common.py b/k8s/tests/common.py index 02b57e6..1801433 100644 --- a/k8s/tests/common.py +++ b/k8s/tests/common.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2019-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2020 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/k8s/tests/conftest.py b/k8s/tests/conftest.py index 4716b5a..ae09da1 100644 --- a/k8s/tests/conftest.py +++ b/k8s/tests/conftest.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import pytest diff --git a/k8s/tests/test_decorators.py b/k8s/tests/test_decorators.py index 552fa4b..2cb8288 100644 --- a/k8s/tests/test_decorators.py +++ b/k8s/tests/test_decorators.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. def test_wrapper_merge_inputs(mockconfig): from k8splugin import decorators as dec @@ -31,4 +30,4 @@ def test_wrapper_merge_inputs(mockconfig): expected = { "app_config": {"nested": { "a": 789, "b": 456, "c": "zyx" }, "foo": "duh"}, "image": "some-docker-image" } - assert expected == dec._wrapper_merge_inputs(task_func, properties, **kwargs)
\ No newline at end of file + assert expected == dec._wrapper_merge_inputs(task_func, properties, **kwargs) diff --git a/k8s/tests/test_discovery.py b/k8s/tests/test_discovery.py index 24e45ee..660a820 100644 --- a/k8s/tests/test_discovery.py +++ b/k8s/tests/test_discovery.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import pytest from functools import partial @@ -24,7 +23,7 @@ import requests def test_wrap_consul_call(mockconfig): from k8splugin import discovery as dis - + def foo(a, b, c="default"): return " ".join([a, b, c]) @@ -41,11 +40,11 @@ def test_wrap_consul_call(mockconfig): def test_generate_service_component_name(mockconfig): from k8splugin import discovery as dis - + component_type = "some-component-type" name = dis.generate_service_component_name(component_type) assert name.split("-", 1)[1] == component_type - + def test_find_matching_services(mockconfig): from k8splugin import discovery as dis @@ -68,4 +67,4 @@ def test_is_healthy_pure(mockconfig): def fake_is_healthy(name): return 0, [{ "Checks": [{"Status": "passing"}] }] - assert True == dis._is_healthy_pure(fake_is_healthy, "some-component")
\ No newline at end of file + assert True == dis._is_healthy_pure(fake_is_healthy, "some-component") diff --git a/k8s/tests/test_k8sclient.py b/k8s/tests/test_k8sclient.py index fcc6b95..4f669d8 100644 --- a/k8s/tests/test_k8sclient.py +++ b/k8s/tests/test_k8sclient.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # Copyright (c) 2019 Pantheon.tech. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/k8s/tests/test_k8sclient_deploy.py b/k8s/tests/test_k8sclient_deploy.py index 4e8a11d..3755855 100644 --- a/k8s/tests/test_k8sclient_deploy.py +++ b/k8s/tests/test_k8sclient_deploy.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2018-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2018-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/k8s/tests/test_tasks.py b/k8s/tests/test_tasks.py index 7f5d753..b82a4ae 100644 --- a/k8s/tests/test_tasks.py +++ b/k8s/tests/test_tasks.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. import copy import pytest diff --git a/k8s/tests/test_utils.py b/k8s/tests/test_utils.py index 0b7cba4..7e01a91 100644 --- a/k8s/tests/test_utils.py +++ b/k8s/tests/test_utils.py @@ -1,7 +1,7 @@ # ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ -# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. +# Copyright (c) 2017-2020 AT&T Intellectual Property. All rights reserved. # ================================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ # limitations under the License. # ============LICENSE_END========================================================= # -# ECOMP is a trademark and service mark of AT&T Intellectual Property. def test_random_string(mockconfig): from k8splugin import utils diff --git a/k8s/tox.ini b/k8s/tox.ini index 5b750e3..a8722d6 100644 --- a/k8s/tox.ini +++ b/k8s/tox.ini @@ -1,5 +1,6 @@ [tox] -envlist = py27,py36,cov +envlist = py27,py36,py37,py38,cov +skip_missing_interpreters = true [testenv] # coverage can only find modules if pythonpath is set @@ -24,6 +25,8 @@ setenv= commands= coverage combine coverage xml + coverage report + coverage html [pytest] junit_family = xunit2 |