s3token: Fix Keystone API configuration
Upstream removed the api_version configuration option and started to expect the version to be encoded in the Keystone URL at Rocky. Add S3 API functional test. Remove invalid configuration items in the s3token section. Remove configuration templates for OpenStack versions prior to Mitaka. Change-Id: Ia3306441222f7c078d460c659701a57a5944c928 Func-Test-Pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/194 Closes-Bug: #1867373
This commit is contained in:
parent
4af22b4352
commit
ed9051a9f3
|
@ -210,8 +210,6 @@ class SwiftIdentityContext(OSContextGenerator):
|
|||
unit, relid),
|
||||
'service_port': relation_get('service_port',
|
||||
unit, relid),
|
||||
'admin_token': relation_get('admin_token',
|
||||
unit, relid),
|
||||
'api_version': relation_get('api_version',
|
||||
unit, relid) or '2',
|
||||
}
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache swift3 s3token authtoken keystone proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache tempauth proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ proxy_ip }}:11211
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystone]
|
||||
paste.filter_factory = keystone.middleware.swift_auth:filter_factory
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystone.middleware.auth_token:filter_factory
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ service_port }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_user }}
|
||||
admin_password = {{ service_password }}
|
||||
{% if delay_auth_decision|lower == 'true' %}
|
||||
delay_auth_decision = 1
|
||||
{% else %}
|
||||
delay_auth_decision = 0
|
||||
{% endif %}
|
||||
|
||||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystone.middleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
service_protocol = {{ service_protocol }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift#swift3
|
||||
{% endif %}
|
|
@ -1,86 +0,0 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if statsd_host %}
|
||||
log_statsd_host = {{ statsd_host }}
|
||||
log_statsd_port = {{ statsd_port }}
|
||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache swift3 s3token authtoken keystone container-quotas account-quotas proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache {{ auth_type }} container-quotas account-quotas proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ proxy_ip }}:11211
|
||||
|
||||
[filter:account-quotas]
|
||||
use = egg:swift#account_quotas
|
||||
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystone]
|
||||
paste.filter_factory = swift.common.middleware.keystoneauth:filter_factory
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystone.middleware.auth_token:filter_factory
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ service_port }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_user }}
|
||||
admin_password = {{ service_password }}
|
||||
delay_auth_decision = {{ delay_auth_decision|lower }}
|
||||
signing_dir = /etc/swift
|
||||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystone.middleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
service_protocol = {{ service_protocol }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'swauth' %}
|
||||
[filter:swauth]
|
||||
use = egg:swauth#swauth
|
||||
set log_name = swauth
|
||||
super_admin_key = {{ swauth_admin_key }}
|
||||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
|
@ -1,87 +0,0 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if statsd_host %}
|
||||
log_statsd_host = {{ statsd_host }}
|
||||
log_statsd_port = {{ statsd_port }}
|
||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache swift3 authtoken keystoneauth container-quotas account-quotas proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = healthcheck cache {{ auth_type }} container-quotas account-quotas proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ proxy_ip }}:11211
|
||||
|
||||
[filter:account-quotas]
|
||||
use = egg:swift#account_quotas
|
||||
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystoneauth]
|
||||
use = egg:swift#keystoneauth
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ service_port }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_user }}
|
||||
admin_password = {{ service_password }}
|
||||
delay_auth_decision = {{ delay_auth_decision|lower }}
|
||||
signing_dir = /etc/swift
|
||||
cache = swift.cache
|
||||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystone.middleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
service_protocol = {{ service_protocol }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'swauth' %}
|
||||
[filter:swauth]
|
||||
use = egg:swauth#swauth
|
||||
set log_name = swauth
|
||||
super_admin_key = {{ swauth_admin_key }}
|
||||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
|
@ -1,127 +0,0 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
bind_ip = {{ bind_host }}
|
||||
log_name = swift
|
||||
log_facility = LOG_LOCAL0
|
||||
log_level = {{ log_level }}
|
||||
log_address = /dev/log
|
||||
log_headers = {{ log_headers }}
|
||||
|
||||
{% if statsd_host %}
|
||||
log_statsd_host = {{ statsd_host }}
|
||||
log_statsd_port = {{ statsd_port }}
|
||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
|
||||
{% endif %}
|
||||
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost {{ auth_type }} staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ memcached_ip }}:11211
|
||||
|
||||
[filter:account-quotas]
|
||||
use = egg:swift#account_quotas
|
||||
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
[filter:proxy-logging]
|
||||
use = egg:swift#proxy_logging
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
||||
[filter:bulk]
|
||||
use = egg:swift#bulk
|
||||
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
|
||||
[filter:dlo]
|
||||
use = egg:swift#dlo
|
||||
|
||||
[filter:formpost]
|
||||
use = egg:swift#formpost
|
||||
|
||||
[filter:tempurl]
|
||||
use = egg:swift#tempurl
|
||||
|
||||
[filter:container_sync]
|
||||
use = egg:swift#container_sync
|
||||
|
||||
[filter:gatekeeper]
|
||||
use = egg:swift#gatekeeper
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystoneauth]
|
||||
use = egg:swift#keystoneauth
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ service_port }}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_user }}
|
||||
admin_password = {{ service_password }}
|
||||
delay_auth_decision = {{ delay_auth_decision|lower }}
|
||||
signing_dir = {{ signing_dir }}
|
||||
cache = swift.cache
|
||||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'swauth' %}
|
||||
[filter:swauth]
|
||||
use = egg:swauth#swauth
|
||||
set log_name = swauth
|
||||
super_admin_key = {{ swauth_admin_key }}
|
||||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
||||
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
max_manifest_segments = {{ static_large_object_segments }}
|
||||
{% endif %}
|
|
@ -1,135 +0,0 @@
|
|||
[DEFAULT]
|
||||
bind_port = {{ bind_port }}
|
||||
workers = {{ workers }}
|
||||
user = swift
|
||||
bind_ip = {{ bind_host }}
|
||||
log_name = swift
|
||||
log_facility = LOG_LOCAL0
|
||||
log_level = {{ log_level }}
|
||||
log_address = /dev/log
|
||||
log_headers = {{ log_headers }}
|
||||
|
||||
{% if statsd_host %}
|
||||
log_statsd_host = {{ statsd_host }}
|
||||
log_statsd_port = {{ statsd_port }}
|
||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
|
||||
{% endif %}
|
||||
|
||||
{% if ssl %}
|
||||
cert_file = {{ ssl_cert }}
|
||||
key_file = {{ ssl_key }}
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache swift3 s3token container_sync bulk tempurl slo dlo formpost authtoken keystoneauth staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% else %}
|
||||
[pipeline:main]
|
||||
pipeline = gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost {{ auth_type }} staticweb container-quotas account-quotas proxy-logging proxy-server
|
||||
{% endif %}
|
||||
|
||||
[app:proxy-server]
|
||||
use = egg:swift#proxy
|
||||
allow_account_management = true
|
||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
|
||||
node_timeout = {{ node_timeout }}
|
||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
|
||||
|
||||
[filter:tempauth]
|
||||
use = egg:swift#tempauth
|
||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
|
||||
|
||||
[filter:healthcheck]
|
||||
use = egg:swift#healthcheck
|
||||
|
||||
[filter:cache]
|
||||
use = egg:swift#memcache
|
||||
memcache_servers = {{ memcached_ip }}:11211
|
||||
|
||||
[filter:account-quotas]
|
||||
use = egg:swift#account_quotas
|
||||
|
||||
[filter:container-quotas]
|
||||
use = egg:swift#container_quotas
|
||||
|
||||
[filter:proxy-logging]
|
||||
use = egg:swift#proxy_logging
|
||||
|
||||
[filter:staticweb]
|
||||
use = egg:swift#staticweb
|
||||
|
||||
[filter:bulk]
|
||||
use = egg:swift#bulk
|
||||
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
|
||||
[filter:dlo]
|
||||
use = egg:swift#dlo
|
||||
|
||||
[filter:formpost]
|
||||
use = egg:swift#formpost
|
||||
|
||||
[filter:tempurl]
|
||||
use = egg:swift#tempurl
|
||||
|
||||
[filter:container_sync]
|
||||
use = egg:swift#container_sync
|
||||
|
||||
[filter:gatekeeper]
|
||||
use = egg:swift#gatekeeper
|
||||
|
||||
{% if auth_type == 'keystone' %}
|
||||
[filter:keystoneauth]
|
||||
use = egg:swift#keystoneauth
|
||||
operator_roles = {{ operator_roles }}
|
||||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
{% if api_version == '3' -%}
|
||||
auth_plugin = password
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
username = {{ service_user }}
|
||||
password = {{ service_password }}
|
||||
project_domain_name = {{ admin_domain_name }}
|
||||
user_domain_name = {{ admin_domain_name }}
|
||||
project_name = {{ admin_tenant_name }}
|
||||
{% else -%}
|
||||
admin_tenant_name = {{ service_tenant }}
|
||||
admin_user = {{ service_user }}
|
||||
admin_password = {{ service_password }}
|
||||
{% endif -%}
|
||||
delay_auth_decision = {{ delay_auth_decision|lower }}
|
||||
signing_dir = {{ signing_dir }}
|
||||
cache = swift.cache
|
||||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystoneclient.middleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
{% endif %}
|
||||
|
||||
{% if auth_type == 'swauth' %}
|
||||
[filter:swauth]
|
||||
use = egg:swauth#swauth
|
||||
set log_name = swauth
|
||||
super_admin_key = {{ swauth_admin_key }}
|
||||
default_swift_cluster = local#https://{{ proxy_ip }}:8080/v1
|
||||
{% endif %}
|
||||
|
||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
|
||||
[filter:slo]
|
||||
use = egg:swift#slo
|
||||
max_manifest_size = 536870912
|
||||
max_manifest_segments = {{ static_large_object_segments }}
|
||||
{% endif %}
|
|
@ -110,6 +110,7 @@ operator_roles = {{ operator_roles }}
|
|||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
auth_version = {{ api_version }}
|
||||
{% if api_version == '3' -%}
|
||||
auth_plugin = password
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
|
@ -129,13 +130,9 @@ cache = swift.cache
|
|||
|
||||
[filter:s3token]
|
||||
paste.filter_factory = keystonemiddleware.s3_token:filter_factory
|
||||
service_host = {{ keystone_host }}
|
||||
service_port = {{ service_port }}
|
||||
auth_port = {{ auth_port }}
|
||||
auth_host = {{ keystone_host }}
|
||||
auth_protocol = {{ auth_protocol }}
|
||||
auth_token = {{ admin_token }}
|
||||
admin_token = {{ admin_token }}
|
||||
|
||||
[filter:swift3]
|
||||
use = egg:swift3#swift3
|
||||
|
|
|
@ -122,11 +122,10 @@ operator_roles = {{ operator_roles }}
|
|||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v3
|
||||
auth_plugin = password
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
username = {{ service_user }}
|
||||
password = {{ service_password }}
|
||||
project_domain_name = {{ admin_domain_name }}
|
||||
|
@ -139,8 +138,7 @@ include_service_catalog = false
|
|||
|
||||
[filter:s3token]
|
||||
use = egg:swift#s3token
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
|
||||
[filter:s3api]
|
||||
use = egg:swift#s3api
|
||||
|
|
|
@ -122,11 +122,10 @@ operator_roles = {{ operator_roles }}
|
|||
|
||||
[filter:authtoken]
|
||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}
|
||||
identity_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
auth_uri = {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v3
|
||||
auth_plugin = password
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
username = {{ service_user }}
|
||||
password = {{ service_password }}
|
||||
project_domain_name = {{ admin_domain_name }}
|
||||
|
@ -138,8 +137,7 @@ cache = swift.cache
|
|||
|
||||
[filter:s3token]
|
||||
use = egg:swift#s3token
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}
|
||||
auth_version = 3
|
||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
|
||||
|
||||
[filter:s3api]
|
||||
use = egg:swift#s3api
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
charm_name: swift-proxy
|
||||
gate_bundles:
|
||||
- bionic-train
|
||||
- bionic-stein
|
||||
- bionic-rocky
|
||||
- bionic-queens
|
||||
- xenial-queens
|
||||
- test-s3api: bionic-train
|
||||
- test-s3api: bionic-stein
|
||||
- test-s3api: bionic-rocky
|
||||
- test-s3api: bionic-queens
|
||||
- test-s3api: xenial-queens
|
||||
- xenial-pike
|
||||
- xenial-ocata
|
||||
- xenial-mitaka
|
||||
|
@ -20,5 +20,9 @@ configure:
|
|||
tests:
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftImageCreateTest
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftProxyTests
|
||||
- test-s3api:
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftImageCreateTest
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftProxyTests
|
||||
- zaza.openstack.charm_tests.swift.tests.S3APITest
|
||||
- swift_gr_region1:
|
||||
- zaza.openstack.charm_tests.swift.tests.SwiftGlobalReplicationTests
|
||||
|
|
|
@ -50,7 +50,6 @@ class SwiftIdentityContextTest(unittest.TestCase):
|
|||
'service_password': 'svcpasswd',
|
||||
'service_tenant': 'svctenant',
|
||||
'service_port': 'svcport',
|
||||
'admin_token': 'token',
|
||||
'api_version': None,
|
||||
}
|
||||
mock_config.return_value = None
|
||||
|
@ -87,7 +86,6 @@ class SwiftIdentityContextTest(unittest.TestCase):
|
|||
'service_domain': 'service_domain',
|
||||
'service_tenant': 'svctenant',
|
||||
'service_port': 'svcport',
|
||||
'admin_token': 'token',
|
||||
'api_version': '3',
|
||||
'admin_domain_id': 'admin_dom_id',
|
||||
'service_tenant_id': 'svc_tenant_id',
|
||||
|
|
|
@ -29,58 +29,9 @@ class ProxyServerTemplateTestCase(unittest.TestCase):
|
|||
|
||||
return env.get_template('proxy-server.conf')
|
||||
|
||||
def test_essex_keystone_includes_correct_egg(self):
|
||||
"""Regression test for bug 1251551."""
|
||||
template = self.get_template_for_release('essex')
|
||||
|
||||
result = template.render(auth_type='keystone')
|
||||
|
||||
self.assertIn("use = egg:swift#swift3", result)
|
||||
|
||||
def test_essex_keystone_includes_correct_delay_auth_true(self):
|
||||
"""Regression test for bug 1251551."""
|
||||
template = self.get_template_for_release('essex')
|
||||
|
||||
result = template.render(auth_type='keystone',
|
||||
delay_auth_decision='true')
|
||||
|
||||
self.assertIn("delay_auth_decision = 1", result)
|
||||
|
||||
def test_essex_keystone_includes_correct_delay_auth_false(self):
|
||||
"""Regression test for bug 1251551."""
|
||||
template = self.get_template_for_release('essex')
|
||||
|
||||
result = template.render(auth_type='keystone',
|
||||
delay_auth_decision='anything')
|
||||
|
||||
self.assertIn("delay_auth_decision = 0", result)
|
||||
|
||||
def test_os_release_not_in_templates(self):
|
||||
"""Regression test for bug 1251551.
|
||||
|
||||
The os_release is no longer provided as context to the templates.
|
||||
"""
|
||||
for release in ('essex', 'grizzly', 'havana', 'icehouse'):
|
||||
template = self.get_template_for_release(release)
|
||||
with open(template.filename, 'r') as template_orig:
|
||||
self.assertNotIn(
|
||||
'os_release', template_orig.read(),
|
||||
"The template '{}' contains os_release which is "
|
||||
"no longer provided in the context.".format(
|
||||
template.filename))
|
||||
|
||||
def test_config_renders_for_all_releases(self):
|
||||
"""The configs render without syntax error."""
|
||||
for release in ('essex', 'grizzly', 'havana', 'icehouse'):
|
||||
template = self.get_template_for_release(release)
|
||||
|
||||
result = template.render()
|
||||
|
||||
self.assertTrue(result.startswith("[DEFAULT]"))
|
||||
|
||||
def test_statsd_config_for_all_releases(self):
|
||||
"""The configs contain statsd settings if statsd-host is set."""
|
||||
for release in ('grizzly', 'havana', 'icehouse', 'mitaka'):
|
||||
for release in ('mitaka'):
|
||||
template = self.get_template_for_release(release)
|
||||
|
||||
result = template.render(statsd_host='127.0.0.1')
|
||||
|
|
Loading…
Reference in New Issue