-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I1840cda6b6d8a057c8b0d04e26d3a42f56dd7948 Depends-On: http://gerrit.an.nuagenetworks.net:8080/61 (cherry picked from commit 55a56e1)
- Loading branch information
Showing
4 changed files
with
114 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,90 +1,42 @@ | ||
- hosts: all | ||
name: python-openstackclient functional tests | ||
- hosts: localhost | ||
vars: | ||
no_proxy: "{{ proxy_env['no_proxy'] }}" | ||
tasks: | ||
- name: compute no_proxy | ||
block: | ||
- set_fact: | ||
no_proxy: "{{ no_proxy }},{{ hostvars[item]['nodepool']['interface_ip'] }}" | ||
when: hostvars[item]['nodepool']['interface_ip'] is defined | ||
with_items: "{{ query('inventory_hostnames', 'all,!localhost') }}" | ||
- name: register no_proxy | ||
command: /bin/echo "{{ no_proxy }}" | ||
register: no_proxy_var | ||
|
||
- hosts: controller | ||
tasks: | ||
- name: fetch vsp_info | ||
slurp: | ||
src: /etc/ci/vsp_info.yaml | ||
register: vsp_info | ||
|
||
- name: Ensure legacy workspace directory | ||
file: | ||
path: '{{ ansible_user_dir }}/workspace' | ||
state: directory | ||
|
||
- shell: | ||
cmd: | | ||
set -e | ||
set -x | ||
cat > clonemap.yaml << EOF | ||
clonemap: | ||
- name: openstack/devstack-gate | ||
dest: devstack-gate | ||
EOF | ||
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \ | ||
git://git.opendev.org \ | ||
openstack/devstack-gate | ||
executable: /bin/bash | ||
chdir: '{{ ansible_user_dir }}/workspace' | ||
environment: '{{ zuul | zuul_legacy_vars }}' | ||
|
||
- shell: | ||
cmd: | | ||
set -e | ||
set -x | ||
export PYTHONUNBUFFERED=true | ||
export DEVSTACK_GATE_NEUTRON=1 | ||
export BRANCH_OVERRIDE=default | ||
export DEVSTACK_PROJECT_FROM_GIT=python-openstackclient | ||
export NUAGE_OS_RELEASE=${ZUUL_BRANCH#*/} | ||
export NODEPOOL_MIRROR_HOST={{ zuul_site_mirror_fqdn }} | ||
if [ -f /etc/ci/vsp_info.sh ]; then | ||
source /etc/ci/vsp_info.sh | ||
fi | ||
if [ "$BRANCH_OVERRIDE" != "default" ] ; then | ||
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE | ||
fi | ||
export VSP_RELEASE={{ nuage_vsp_release }} | ||
export DEVSTACK_GATE_TOPOLOGY=aio | ||
export DEVSTACK_GATE_LIBVIRT_TYPE=kvm | ||
# by default devstack-gate will include bunch of projects | ||
# we dont actually need. We ovewrite project list here | ||
PROJECTS="openstack/devstack-gate" | ||
PROJECTS="openstack/devstack $PROJECTS" | ||
PROJECTS="openstack/cinder $PROJECTS" | ||
PROJECTS="openstack/glance $PROJECTS" | ||
PROJECTS="openstack/keystone $PROJECTS" | ||
PROJECTS="openstack/neutron $PROJECTS" | ||
PROJECTS="openstack/nova $PROJECTS" | ||
PROJECTS="openstack/placement $PROJECTS" | ||
PROJECTS="openstack/python-openstackclient $PROJECTS" | ||
PROJECTS="openstack/requirements $PROJECTS" | ||
PROJECTS="OpenStack/nuage-openstack-neutron $PROJECTS" | ||
PROJECTS="OpenStack/nuage-openstack-neutronclient $PROJECTS" | ||
export DEVSTACK_GATE_PROJECTS_OVERRIDE="$PROJECTS" | ||
PRIMARY_IP="{{ hostvars['primary']['ansible_default_ipv4']['address'] }}" | ||
# add own address and VSD ip to no proxy | ||
export no_proxy=$no_proxy,${PRIMARY_IP},${VSD_SERVER%%:*} | ||
# get own ip and derrive cidr for public net from it, | ||
# to avoid overlap on VSD by multiple gate hosts | ||
group=$(echo ${PRIMARY_IP} | awk -F. '{print $3}') | ||
GW="172.${group}.${PRIMARY_IP##*.}.1" | ||
export DEVSTACK_GATE_FLOATING_RANGE="172.${group}.${PRIMARY_IP##*.}.0/24" | ||
export DEVSTACK_GATE_PUBLIC_NETWORK_GATEWAY="${GW}" | ||
function gate_hook { | ||
bash -xe $BASE/new/nuage-openstack-neutronclient/devstack/ci/gate_hook.sh | ||
} | ||
export -f gate_hook | ||
function post_test_hook { | ||
# Configure and run functional tests | ||
bash -xe $BASE/new/nuage-openstack-neutronclient/devstack/ci/post_test_hook.sh functional | ||
} | ||
export -f post_test_hook | ||
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh | ||
./safe-devstack-vm-gate-wrap.sh | ||
executable: /bin/bash | ||
chdir: '{{ ansible_user_dir }}/workspace' | ||
environment: '{{ zuul | zuul_legacy_vars | combine(proxy_env) }}' | ||
|
||
- hosts: all | ||
vars: | ||
vsp: "{{ hostvars['controller']['vsp_info']['content'] | b64decode | from_yaml}}" | ||
env: | ||
no_proxy: "{{ hostvars['localhost']['no_proxy_var'].stdout }},{{ vsp['vsd_server'].split(':')[0]}}" | ||
devstack_localrc: | ||
NUAGE_VSD_SERVERS: "{{ vsp['vsd_server'] }}" | ||
NUAGE_VSC_SERVER: "{{ vsp['vsc_controller'] }}" | ||
NUAGE_VSP_RELEASE: "{{ vsp['nuage_vsp_release'] }}" | ||
roles: | ||
- setup-nuage-source-dirs | ||
- write-vsp-devstack-local-conf | ||
- run-devstack | ||
# Run bindep and test-setup after devstack so that they won't interfere | ||
- role: bindep | ||
bindep_profile: test | ||
bindep_dir: "{{ zuul_work_dir }}" | ||
- test-setup | ||
- ensure-tox | ||
- tox | ||
environment: '{{ proxy_env|combine(env) }}' |