2 ##############################################################################
3 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 - name: get nova-compute host
13 source /etc/yardstick/openstack.creds;
14 openstack availability zone list --long | grep nova-compute | sort | awk '{print $7}';
17 register: compute_nodes
19 - name: delete flavor yardstick-pinned-flavor
23 name: yardstick-pinned-flavor
25 - name: get flavor list
27 source /etc/yardstick/openstack.creds;
28 openstack flavor list | grep "True" | cut -f 2 -d ' ';
33 - name: unset flavor default property
35 source /etc/yardstick/openstack.creds;
36 openstack flavor unset --property aggregate_instance_extra_specs:pinned {{item}};
40 - '{{ flavors.stdout_lines }}'
42 - name: delete pinned-cpu and regular host aggregate
44 source /etc/yardstick/openstack.creds;
45 nova aggregate-remove-host pinned-cpu {{ compute_nodes.stdout_lines[0] }};
46 nova aggregate-remove-host regular {{ compute_nodes.stdout_lines[1] }};
47 openstack aggregate delete pinned-cpu;
48 openstack aggregate delete regular;