refstack-client/playbooks/tempestconf-refstack-devstack.yaml
Martin Kopec fb9f35d13f Improve python3 compatibility
The review:
 * adds a python3 job in order to test the refstack-client with
   python3 as well.
 * adds a job which runs unit tests by python3.7
 * changes default python3 (when -p 3 is specified) in setup_env script
   to version 3.6.0
 * converts downloaded list of tests from bytes to str in order to unify
   the types used for python2 and python3 compatibility.
 * edits -p argument in the setup_env script so that it also accepts a full
   version of Python a user wants to run with, before there were 2 options:
    * python2.7.8
    * python3.6.0
 * sets object-storage.operator_role to Member in tempest.conf in order to run
   tempest.api.object_storage.test_container_services.ContainerTest tests

Change-Id: I961f0f093bd7d40fde7e448ea12ef9907c61d126
2019-09-09 16:38:21 +00:00

40 lines
1.7 KiB
YAML

- hosts: all
roles:
- run-devstack
- hosts: tempest
vars:
set_auth_url: "OS_AUTH_URL=$SERVICE_PROTOCOL://$SERVICE_HOST/identity/v3"
devstack_base_dir: "/opt/stack"
aditional_tempestconf_params: "auth.tempest_roles Member object-storage.operator_role Member"
tasks:
- name: Setup Tempest Run Directory
include_role:
name: setup-tempest-run-dir
- name: Setup Tempest Data Directory
include_role:
name: setup-tempest-data-dir
- name: ACL devstack files
include_role:
name: acl-devstack-files
- name: Generate configuration file for Tempest as admin
include_role:
name: generate-tempestconf-file
vars:
output_path: "/etc/openstack/tempest_admin.conf"
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
user: admin
- name: Generate accounts.yaml file for Demo
include_role:
name: generate-accounts-file
vars:
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc admin admin; {{ set_auth_url }}"
accounts_file_destination: "/etc/openstack"
tempest_config_file: "/etc/openstack/tempest_admin.conf"
- name: Generate tempest.conf using refstack-client and run tempest tests
include_role:
name: generate-tempestconf-refstack
vars:
source_credentials_commands: "export HOST_IP={{ ansible_default_ipv4.address }}; source {{ devstack_base_dir }}/devstack/openrc {{ user }} {{ user }}; {{ set_auth_url }}"
user: demo