swift3: remove support

The swift3 middleware has been deprecated in replacement with the
s3api middleware instead.  This removes all the swift3 references
to hopefully enable someone to cleanly add s3api eventually.

Change-Id: I3a8a1ab861ec81b1f4f8dbc02a6a332d4ce495b8
This commit is contained in:
Mohammed Naser 2019-03-29 09:41:50 -04:00
parent 52aacc5f0b
commit 4de1219730
6 changed files with 0 additions and 144 deletions

View File

@ -38,14 +38,9 @@ swift_install_method: "source"
swift_git_repo: https://git.openstack.org/openstack/swift
swift_git_install_branch: master
# Git repo details for swift3 middleware
swift_swift3_git_repo: https://git.openstack.org/openstack/swift3
swift_swift3_git_install_branch: master
swift_upper_constraints_url: "{{ requirements_git_url | default('https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=' ~ requirements_git_install_branch | default('master')) }}"
swift_git_constraints:
- "git+{{ swift_git_repo }}@{{ swift_git_install_branch }}#egg=swift"
- "git+{{ swift_swift3_git_repo }}@{{ swift_swift3_git_install_branch }}#egg=swift3"
- "--constraint {{ swift_upper_constraints_url }}"
swift_pip_install_args: "{{ pip_install_options | default('') }}"
@ -75,15 +70,6 @@ swift_syslog_log_perms: "0644"
## Auth token
swift_delay_auth_decision: true
## Swift3 middleware options
swift_swift3_enabled: false
swift_swift3_allow_no_owner: false
swift_swift3_location: US
swift_swift3_max_bucket_listing: 1000
swift_swift3_max_multi_delete_objects: 1000
swift_swift3_s3_acl: false
swift_swift3_storage_domain: ""
## Swift middleware
# NB: The order is important!
swift_middleware_list:
@ -98,8 +84,6 @@ swift_middleware_list:
- tempurl
- ratelimit
- authtoken
- "{% if swift_swift3_enabled | bool%}swift3{% endif %}"
- "{% if swift_swift3_enabled | bool%}s3token{% endif %}"
- keystoneauth
- staticweb
- copy
@ -335,7 +319,6 @@ swift_pip_packages:
- python-memcached
- python-swiftclient
- swift
- swift3
swift_account_replicator_init_overrides: {}
swift_account_replicator_server_init_overrides: {}

View File

@ -100,25 +100,6 @@ operator_roles = admin, {{ swift_operator_role }}
reseller_admin_role = {{ swift_reselleradmin_role }}
{% endif %}
{% if 'swift3' in swift_middleware_list %}
[filter:swift3]
use = egg:swift3#swift3
allow_no_owner = {{ swift_swift3_allow_no_owner }}
location = {{ swift_swift3_location }}
max_bucket_listing = {{ swift_swift3_max_bucket_listing }}
max_multi_delete_objects = {{ swift_swift3_max_multi_delete_objects }}
s3_acl = {{ swift_swift3_s3_acl }}
storage_domain = {{ swift_swift3_storage_domain }}
{% endif %}
{% if 's3token' in swift_middleware_list %}
[filter:s3token]
use = egg:swift3#s3token
www_authenticate_uri = {{ keystone_service_adminuri }}
{% endif %}
[filter:healthcheck]
use = egg:swift#healthcheck

View File

@ -1,91 +0,0 @@
---
# Copyright 2017, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Run functional tests for swift3 middleware
hosts: swift_proxy[0]
user: root
gather_facts: true
vars_files:
- common/test-vars.yml
tasks:
- name: Install prerequisite python packages
pip:
name: "{{ item }}"
state: present
virtualenv: "{{ swift_venv_bin | dirname }}"
extra_args: >-
{{ swift_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }}
{{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }}
{{ pip_install_options | default('') }}
with_items:
- s3cmd
- python-openstackclient
- name: Generate EC2 credentials
shell: |
. ~/openrc
. {{ swift_venv_bin }}/activate
openstack ec2 credentials create > /tmp/ec2_credentials.txt
args:
creates: /tmp/ec2_credentials.txt
- name: Extract EC2 access key
shell: awk '/access/ { print $4 }' /tmp/ec2_credentials.txt
changed_when: False
register: ec2_access_key
- name: Extract EC2 secret
shell: awk '/secret/ { print $4 }' /tmp/ec2_credentials.txt
changed_when: False
register: ec2_secret_key
- name: Set facts for .s3cfg template
set_fact:
ec2_access_key: "{{ ec2_access_key.stdout }}"
ec2_secret_key: "{{ ec2_secret_key.stdout }}"
- name: Generate .s3cfg
template:
src: s3cfg.j2
dest: /root/.s3cfg
- name: Verify we can create a bucket
shell: |
. {{ swift_venv_bin }}/activate
s3cmd mb s3://swift3-test
tags:
- skip_ansible_lint
- name: Verify we can put an object
shell: |
. {{ swift_venv_bin }}/activate
s3cmd put /root/openrc s3://swift3-test
tags:
- skip_ansible_lint
- name: Verify we can list the object
shell: |
. {{ swift_venv_bin }}/activate
s3cmd la | grep openrc
tags:
- skip_ansible_lint
- name: Verify we can remove buckets and objects
shell: |
. {{ swift_venv_bin }}/activate
s3cmd -r rb s3://swift3-test
tags:
- skip_ansible_lint

View File

@ -108,15 +108,6 @@ commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:swift3]
setenv =
{[testenv]setenv}
ANSIBLE_PARAMETERS=-e swift_swift3_enabled=True
TEST_PLAYBOOK={toxinidir}/tests/test.yml {toxinidir}/tests/test-swift-functional.yml {toxinidir}/tests/test-swift3-functional.yml
commands =
bash -c "{toxinidir}/tests/common/test-ansible-functional.sh"
[testenv:linters]
basepython = python3
commands =

View File

@ -13,12 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- job:
name: openstack-ansible-swift3-ubuntu-xenial
parent: openstack-ansible-functional-ubuntu-xenial
vars:
tox_env: swift3
- job:
name: openstack-ansible-deploy-aio_metal_swift-centos-7
parent: openstack-ansible-deploy-aio

View File

@ -24,8 +24,6 @@
- openstack-ansible-deploy-aio_metal_swift-centos-7
- openstack-ansible-deploy-aio_metal_swift-ubuntu-bionic
- openstack-ansible-deploy-aio_distro_metal_swift-centos-7
- openstack-ansible-swift3-ubuntu-xenial:
voting: false
gate:
jobs:
- openstack-ansible-deploy-aio_metal_swift-centos-7