From eb2f28539efb84963a9a18e798229627b9281a10 Mon Sep 17 00:00:00 2001 From: Liam Young Date: Fri, 8 Jul 2016 13:58:41 +0000 Subject: [PATCH] Tidy/Fix Apache template Remove old template for apache pre-2.4 and update openstack_https_frontend.conf to match adapter parameters Add tox targets to placate CI Change-Id: I03acf7e3e524b2a15756a07e0a2d13ed88eaefac --- templates/openstack_https_frontend | 24 ---------------------- templates/openstack_https_frontend.conf | 27 ++++++++++++++++++++++++- test-requirements.txt | 2 ++ tox.ini | 23 +++++++++++++++++++-- 4 files changed, 49 insertions(+), 27 deletions(-) delete mode 100644 templates/openstack_https_frontend mode change 120000 => 100644 templates/openstack_https_frontend.conf create mode 100644 test-requirements.txt diff --git a/templates/openstack_https_frontend b/templates/openstack_https_frontend deleted file mode 100644 index ce28fa3..0000000 --- a/templates/openstack_https_frontend +++ /dev/null @@ -1,24 +0,0 @@ -{% if endpoints -%} -{% for ext_port in ext_ports -%} -Listen {{ ext_port }} -{% endfor -%} -{% for address, endpoint, ext, int in endpoints -%} - - ServerName {{ endpoint }} - SSLEngine on - SSLCertificateFile /etc/apache2/ssl/{{ namespace }}/cert_{{ endpoint }} - SSLCertificateKeyFile /etc/apache2/ssl/{{ namespace }}/key_{{ endpoint }} - ProxyPass / http://localhost:{{ int }}/ - ProxyPassReverse / http://localhost:{{ int }}/ - ProxyPreserveHost on - -{% endfor -%} - - Order deny,allow - Allow from all - - - Order allow,deny - Allow from all - -{% endif -%} diff --git a/templates/openstack_https_frontend.conf b/templates/openstack_https_frontend.conf deleted file mode 120000 index 9a2f6f2..0000000 --- a/templates/openstack_https_frontend.conf +++ /dev/null @@ -1 +0,0 @@ -openstack_https_frontend \ No newline at end of file diff --git a/templates/openstack_https_frontend.conf b/templates/openstack_https_frontend.conf new file mode 100644 index 0000000..ebac26a --- /dev/null +++ b/templates/openstack_https_frontend.conf @@ -0,0 +1,26 @@ +{% if options.endpoints -%} +{% for ext_port in options.ext_ports -%} +Listen {{ ext_port }} +{% endfor -%} +{% for address, endpoint, ext, int in options.endpoints -%} + + ServerName {{ endpoint }} + SSLEngine on + SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2 + SSLCipherSuite HIGH:!RC4:!MD5:!aNULL:!eNULL:!EXP:!LOW:!MEDIUM + SSLCertificateFile /etc/apache2/ssl/{{ options.service_name }}/cert_{{ endpoint }} + SSLCertificateKeyFile /etc/apache2/ssl/{{ options.service_name }}/key_{{ endpoint }} + ProxyPass / http://localhost:{{ int }}/ + ProxyPassReverse / http://localhost:{{ int }}/ + ProxyPreserveHost on + +{% endfor -%} + + Order deny,allow + Allow from all + + + Order allow,deny + Allow from all + +{% endif -%} diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 0000000..095ec9c --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +flake8>=2.2.4,<=2.4.1 +os-testr>=0.4.1 diff --git a/tox.ini b/tox.ini index 729f836..adc1255 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = True -envlist = pep8,build +envlist = pep8 [testenv] basepython = python2.7 @@ -13,14 +13,33 @@ install_command = pip install {opts} {packages} deps = -r{toxinidir}/requirements.txt -whitelist_externals = /bin/true +whitelist_externals = /bin/true /bin/echo [testenv:build] commands = + /bin/echo 'WARNING: *build* target is for testing only.' charm-build --log-level DEBUG -o {toxinidir}/build . [testenv:venv] commands = {posargs} +[testenv:py27] +basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +commands = /bin/true + +[testenv:py34] +basepython = python3.4 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +commands = /bin/true + +[testenv:py35] +basepython = python3.5 +deps = -r{toxinidir}/test-requirements.txt +# TODO: Need to write unit tests then remove the following command. +commands = /bin/true + [testenv:pep8] commands = /bin/true