From 961d1170485c342d32f28251790a744201e2586f Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Fri, 5 Aug 2016 15:35:22 -0700 Subject: [PATCH] Create nova endpoints for tempest test Horizon tempest tests validate that the Project Overview page is accessible after logging in. I1b2ddee0395ad9f55692111604b31618c4eaf69e added permissions to this page, requiring that the compute service be registered within the keystone catalog. Add tasks to create the nova service and endpoints to allow the tempest tests to complete. Change-Id: Iec0f0f55477464979ef36eb71b9f606348857a52 --- tests/test-horizon-functional.yml | 39 +++++++++++++++++++++++++++++++ tests/test-vars.yml | 12 ++++++++++ 2 files changed, 51 insertions(+) diff --git a/tests/test-horizon-functional.yml b/tests/test-horizon-functional.yml index 9d34e67f..60264f81 100644 --- a/tests/test-horizon-functional.yml +++ b/tests/test-horizon-functional.yml @@ -18,6 +18,45 @@ user: root gather_facts: false tasks: +# Horizon tempest testing require the compute service +# and endpoints to be registered within the region + - name: Ensure nova service + keystone: + command: "ensure_service" + endpoint: "{{ keystone_service_adminurl }}" + login_user: "{{ keystone_admin_user_name }}" + login_password: "{{ keystone_auth_admin_password }}" + login_project_name: "{{ keystone_admin_tenant_name }}" + service_name: "{{ nova_service_name }}" + service_type: "{{ nova_service_type }}" + description: "{{ nova_service_description }}" + insecure: "{{ keystone_service_adminuri_insecure }}" + register: add_service + until: add_service|success + retries: 5 + delay: 2 + - name: Ensure nova endpoint + keystone: + command: "ensure_endpoint" + endpoint: "{{ keystone_service_adminurl }}" + login_user: "{{ keystone_admin_user_name }}" + login_password: "{{ keystone_auth_admin_password }}" + login_project_name: "{{ keystone_admin_tenant_name }}" + region_name: "{{ nova_service_region }}" + service_name: "{{ nova_service_name }}" + service_type: "{{ nova_service_type }}" + insecure: "{{ keystone_service_adminuri_insecure }}" + endpoint_list: + - url: "{{ nova_service_publicurl }}" + interface: "public" + - url: "{{ nova_service_internalurl }}" + interface: "internal" + - url: "{{ nova_service_adminurl }}" + interface: "admin" + register: add_service + until: add_service|success + retries: 5 + delay: 10 - name: Run tempest shell: | . {{ tempest_bin }}/activate diff --git a/tests/test-vars.yml b/tests/test-vars.yml index 84275477..6993e0fb 100644 --- a/tests/test-vars.yml +++ b/tests/test-vars.yml @@ -58,6 +58,18 @@ keystone_service_password: "secrete" keystone_venv_tag: "testing" memcached_encryption_key: "secrete" memcached_servers: 127.0.0.1 +nova_service_name: nova +nova_service_type: compute +nova_service_description: "Nova Compute Service" +nova_service_port: 8774 +nova_service_proto: http +nova_service_region: RegionOne +nova_service_publicuri: "{{ nova_service_proto }}://{{ external_lb_vip_address }}:{{ nova_service_port }}" +nova_service_publicurl: "{{ nova_service_publicuri }}/v2.1/%(tenant_id)s" +nova_service_adminuri: "{{ nova_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_service_port }}" +nova_service_adminurl: "{{ nova_service_adminuri }}/v2.1/%(tenant_id)s" +nova_service_internaluri: "{{ nova_service_proto }}://{{ internal_lb_vip_address }}:{{ nova_service_port }}" +nova_service_internalurl: "{{ nova_service_internaluri }}/v2.1/%(tenant_id)s" openrc_os_auth_url: "http://127.0.0.1:5000/v3" openrc_os_domain_name: "Default" openrc_os_password: "{{ keystone_auth_admin_password }}"