4fa9872510
When using the glance v2 API the glance-registry service is optional, and the intention is to remove the glance-registry service in the S cycle. The glance v1 API is scheduled to be removed in Queens. This patch therefore disables the v1 API by default to give us as much time as possible to identify the impact of that and to get the issues resolved before it is removed from the code-base. The patch also cleans up the glance-registry init files to handle the transition in an existing environment. Tests are added to validate that enabling the v1 API still works, and enabling the v2 registry still works. Change-Id: I4c27aa0ca5b649e4fa76cfd0f326d80f50074db1
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
---
|
|
# Copyright 2015, 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: Playbook for testing glance
|
|
hosts: glance_all
|
|
user: root
|
|
gather_facts: true
|
|
tasks:
|
|
# Packages need to be installed outside
|
|
# of venv to be usable by Ansible
|
|
- name: Install testing pip packages
|
|
pip:
|
|
name: "shade"
|
|
|
|
- name: Check the glance-api
|
|
uri:
|
|
url: "http://localhost:9292"
|
|
status_code: 300
|
|
|
|
- name: Check the glance-registry
|
|
uri:
|
|
url: "http://localhost:9191"
|
|
status_code: 401
|
|
when:
|
|
- (glance_enable_v1_api | default(False)) | bool or (glance_enable_v2_registry | default(False)) | bool
|
|
|
|
- name: Download the Cirros image
|
|
get_url:
|
|
url: "http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-uec.tar.gz"
|
|
dest: "/var/tmp/cirros.tar.gz"
|
|
|
|
- name: Upload the Cirros image
|
|
os_image:
|
|
cloud: default
|
|
endpoint_type: internal
|
|
validate_certs: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}"
|
|
name: cirros
|
|
filename: "/var/tmp/cirros.tar.gz"
|
|
container_format: bare
|
|
disk_format: qcow2
|
|
is_public: True
|
|
register: cirros_image_create
|
|
until: cirros_image_create | success
|
|
retries: 5
|
|
delay: 15
|
|
|
|
vars_files:
|
|
- common/test-vars.yml
|
|
|