Remove python-keystoneclient package install

The tests were using our keystone module, and therefore
required the keystone client present. This patch changes
the tests to remove that requirement.

Now that we no longer use our own keystone module, but
instead make use of the ansible runtime venv's shade
library and upstream ansible modules, we can eliminate
this package/library being installed on the host.

Change-Id: I3b5066ef0f3f650beb9e057771d8636991d2bce2
This commit is contained in:
Jesse Pretorius 2018-08-01 11:15:55 +01:00
parent 0f95ab0ab1
commit e8508d4376
4 changed files with 35 additions and 38 deletions

View File

@ -13,63 +13,63 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# Test that users/projects etc are consistent on both keystone hosts - name: Test for expected user/project consistency
- name: Playbook for functional testing keystone hosts: localhost
hosts: keystone_all connection: local
user: root vars:
gather_facts: false ansible_python_interpreter: "{{ ansible_playbook_python }}"
tasks: tasks:
- name: Check the keystone api
uri:
url: "http://localhost:{{ item }}"
status_code: 300
register: result
until: result.status == 300
retries: 5
delay: 10
with_items:
- 5000
- 35357
- name: Check for expected users - name: Check for expected users
keystone: os_user_facts:
command: get_user cloud: default
user_name: "{{ item }}" name: "{{ item }}"
endpoint: "{{ keystone_service_adminurl }}" domain: default
login_user: "{{ keystone_admin_user_name }}" endpoint_type: admin
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
no_log: true
with_items: with_items:
- "admin" - "admin"
- "keystone" - "keystone"
register: _user_check
until: _user_check is success
retries: 5
delay: 10
- name: Check for expected projects - name: Check for expected projects
keystone: os_project_facts:
command: get_project cloud: default
project_name: "{{ item }}" name: "{{ item }}"
endpoint: "{{ keystone_service_adminurl }}" domain: default
login_user: "{{ keystone_admin_user_name }}" endpoint_type: admin
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
no_log: true
with_items: with_items:
- "admin" - "admin"
- "service" - "service"
register: _project_check
until: _project_check is success
retries: 5
delay: 10
- name: Test for SSL key/cert consistency
hosts: keystone_all
user: root
gather_facts: false
vars_files:
- common/test-vars.yml
tasks:
- name: Get SSL cert location and permissions - name: Get SSL cert location and permissions
stat: stat:
path: "/etc/ssl/certs/keystone.pem" path: "/etc/ssl/certs/keystone.pem"
register: keystone_ssl_cert_stats register: keystone_ssl_cert_stats
- name: Check SSL cert location and permissions - name: Check SSL cert location and permissions
fail: fail:
msg: "Keystone SSL cert permissions don't match 0640" msg: "Keystone SSL cert permissions don't match 0640"
when: keystone_ssl_cert_stats.stat.mode != "0640" when: keystone_ssl_cert_stats.stat.mode != "0640"
- name: Get SSL key location and permissions - name: Get SSL key location and permissions
stat: stat:
path: "/etc/ssl/private/keystone.key" path: "/etc/ssl/private/keystone.key"
register: keystone_ssl_key_stats register: keystone_ssl_key_stats
- name: Check SSL key location and permissions - name: Check SSL key location and permissions
fail: fail:
msg: "Keystone SSL key permissions don't match 0640" msg: "Keystone SSL key permissions don't match 0640"
when: keystone_ssl_key_stats.stat.mode != "0640" when: keystone_ssl_key_stats.stat.mode != "0640"
vars_files:
- common/test-vars.yml

View File

@ -18,7 +18,6 @@ keystone_distro_packages:
- cronie - cronie
- cronie-anacron - cronie-anacron
- git - git
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
- rsync - rsync
keystone_devel_distro_packages: keystone_devel_distro_packages:

View File

@ -18,7 +18,6 @@ keystone_distro_packages:
- ca-certificates - ca-certificates
- cronie - cronie
- git-core - git-core
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
- rsync - rsync
keystone_devel_distro_packages: keystone_devel_distro_packages:

View File

@ -15,7 +15,6 @@
keystone_distro_packages: keystone_distro_packages:
- git - git
- python-keystoneclient # Keystoneclient needed to OSA keystone lib
- rsync - rsync
keystone_devel_distro_packages: keystone_devel_distro_packages: