diff options
author | Miroslav Los <miroslav.los@pantheon.tech> | 2019-11-14 17:36:44 +0100 |
---|---|---|
committer | Miroslav Los <miroslav.los@pantheon.tech> | 2020-02-14 17:34:04 +0100 |
commit | 9b7e81e78c70514aa123482610e274869b6ba137 (patch) | |
tree | e2e44b515d518825db9240a5e4a8fe2efe0b3126 /dnsdesig | |
parent | 4daa9d9a30306cfa6d25999cdc992d886fa405a8 (diff) |
Support python3 in all plugins
Unify tox/requirements/setup.py requirement specifications.
Use cloudify-common 5.0.5 release.
For helm, use a dev cloudify-common build with better python3 code.
Use PEP 508 URLs in requirements for the non-PyPI (github) release.
Fix mixed indentation and trailing whitespace.
Signed-off-by: Miroslav Los <miroslav.los@pantheon.tech>
Issue-ID: CCSDK-1931
Change-Id: I607957d9e2c299121785f3f02420c6038966a200
Diffstat (limited to 'dnsdesig')
-rw-r--r-- | dnsdesig/dns_types.yaml | 2 | ||||
-rw-r--r-- | dnsdesig/dnsdesig/dns_plugin.py | 10 | ||||
-rw-r--r-- | dnsdesig/pom.xml | 4 | ||||
-rw-r--r-- | dnsdesig/requirements.txt | 2 | ||||
-rw-r--r-- | dnsdesig/setup.py | 11 | ||||
-rw-r--r-- | dnsdesig/tests/test_plugin.py | 7 | ||||
-rw-r--r-- | dnsdesig/tox.ini | 8 |
7 files changed, 26 insertions, 18 deletions
diff --git a/dnsdesig/dns_types.yaml b/dnsdesig/dns_types.yaml index f07a8f7..c158317 100644 --- a/dnsdesig/dns_types.yaml +++ b/dnsdesig/dns_types.yaml @@ -24,7 +24,7 @@ plugins: dns_designate: executor: central_deployment_agent package_name: dnsdesig - package_version: 1.0.0 + package_version: 1.1.0 node_types: ccsdk.nodes.dns.arecord: diff --git a/dnsdesig/dnsdesig/dns_plugin.py b/dnsdesig/dnsdesig/dns_plugin.py index d46468d..e1fe850 100644 --- a/dnsdesig/dnsdesig/dns_plugin.py +++ b/dnsdesig/dnsdesig/dns_plugin.py @@ -2,13 +2,14 @@ # org.onap.ccsdk # ============================================================================= # Copyright (c) 2018 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"); # 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. @@ -17,7 +18,6 @@ # ============LICENSE_END====================================================== import requests -from urlparse import urlparse from cloudify import ctx from cloudify.decorators import operation from cloudify.exceptions import NonRecoverableError, RecoverableError @@ -34,8 +34,8 @@ def _get_auth_info(openstack): (tok, gbls, urls) = _get_auth_info_v2(openstack) else: (tok, gbls, urls) = _get_auth_info_v3(openstack) - if len(urls.keys()) == 1: - reg = urls.keys()[0] + if len(urls) == 1: + reg = list(urls)[0] else: reg = openstack['region'] if reg in urls and 'dns' in urls[reg]: diff --git a/dnsdesig/pom.xml b/dnsdesig/pom.xml index fdf5395..f978ad7 100644 --- a/dnsdesig/pom.xml +++ b/dnsdesig/pom.xml @@ -23,7 +23,7 @@ limitations under the License. <parent> <groupId>org.onap.ccsdk.platform</groupId> <artifactId>plugins</artifactId> - <version>1.0.1-SNAPSHOT</version> + <version>1.1.0-SNAPSHOT</version> </parent> <!--- CHANGE THE FOLLOWING 3 OBJECTS for your own repo --> @@ -31,7 +31,7 @@ limitations under the License. <artifactId>dnsdesig</artifactId> <name>dnsdesig</name> - <version>1.0.1-SNAPSHOT</version> + <version>1.1.0-SNAPSHOT</version> <url>http://maven.apache.org</url> <properties> <!-- name from the setup.py file --> diff --git a/dnsdesig/requirements.txt b/dnsdesig/requirements.txt index e69de29..abbe5e5 100644 --- a/dnsdesig/requirements.txt +++ b/dnsdesig/requirements.txt @@ -0,0 +1,2 @@ +requests +cloudify-common>=5.0.5 diff --git a/dnsdesig/setup.py b/dnsdesig/setup.py index 35578ce..d34d362 100644 --- a/dnsdesig/setup.py +++ b/dnsdesig/setup.py @@ -2,13 +2,14 @@ # org.onap.ccsdk # ============================================================================= # Copyright (c) 2018 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"); # 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. @@ -21,7 +22,7 @@ from setuptools import setup, find_packages setup( name='dnsdesig', - version='1.0.1', + version='1.1.0', packages=find_packages(), author='AT&T', description=('Cloudify plugin for creating DNS entries using Designate.'), @@ -31,5 +32,7 @@ setup( zip_safe=False, package_data={'':['LICENSE.txt']}, install_requires=[ - ] + 'requests', + 'cloudify-common>=5.0.5', + ], ) diff --git a/dnsdesig/tests/test_plugin.py b/dnsdesig/tests/test_plugin.py index 78b3483..80e68ec 100644 --- a/dnsdesig/tests/test_plugin.py +++ b/dnsdesig/tests/test_plugin.py @@ -2,6 +2,7 @@ # org.onap.ccsdk # ============================================================================= # Copyright (c) 2018 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"); # you may not use this file except in compliance with the License. @@ -189,9 +190,9 @@ _answers = [ 'publicURL': 'https://example.com/dns', 'region': 'r' }, - { - 'publicURL': 'https://example.com/otherregions' - } + { + 'publicURL': 'https://example.com/otherregions' + } ] } ] diff --git a/dnsdesig/tox.ini b/dnsdesig/tox.ini index 0b0f114..dd74ebb 100644 --- a/dnsdesig/tox.ini +++ b/dnsdesig/tox.ini @@ -2,6 +2,7 @@ # org.onap.ccsdk # ============================================================================= # Copyright (c) 2017 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"); # you may not use this file except in compliance with the License. @@ -17,14 +18,15 @@ # ============LICENSE_END====================================================== [tox] -envlist = py27 +envlist = py27,py36,py37 +skip_missing_interpreters = true + [testenv] deps= - requests - cloudify==3.4 pytest coverage pytest-cov + -r requirements.txt setenv= PYTHONPATH={toxinidir} commands= |