tests: update the type for the rule used in pools

As of ceph 12.2.5 the type of the parameter `type` is not a name anymore but
an id, therefore an `int` is expected otherwise it will fail with the
following error

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
pull/2544/merge
Guillaume Abrioux 2018-04-25 17:33:35 +02:00
parent adeecc51f8
commit a68091c923
11 changed files with 28 additions and 28 deletions

View File

@ -23,7 +23,7 @@ dummy:
# pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
# pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#test2:
@ -31,7 +31,7 @@ dummy:
# pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
# pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#pools:

View File

@ -91,7 +91,7 @@ dummy:
# pg_num: "{{ osd_pool_default_pg_num }}"
# pgp_num: "{{ osd_pool_default_pg_num }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#openstack_cinder_pool:
@ -99,7 +99,7 @@ dummy:
# pg_num: "{{ osd_pool_default_pg_num }}"
# pgp_num: "{{ osd_pool_default_pg_num }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#openstack_nova_pool:
@ -107,7 +107,7 @@ dummy:
# pg_num: "{{ osd_pool_default_pg_num }}"
# pgp_num: "{{ osd_pool_default_pg_num }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#openstack_cinder_backup_pool:
@ -115,7 +115,7 @@ dummy:
# pg_num: "{{ osd_pool_default_pg_num }}"
# pgp_num: "{{ osd_pool_default_pg_num }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""
#openstack_gnocchi_pool:
@ -123,7 +123,7 @@ dummy:
# pg_num: "{{ osd_pool_default_pg_num }}"
# pgp_num: "{{ osd_pool_default_pg_num }}"
# rule_name: "replicated_rule"
# type: "replicated"
# type: 1
# erasure_profile: ""
# expected_num_objects: ""

View File

@ -15,7 +15,7 @@ test:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
test2:
@ -23,7 +23,7 @@ test2:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
pools:

View File

@ -69,8 +69,8 @@
{{ item.get('pg_num', hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num']) }}
{{ item.pgp_num | default(item.pg_num) }}
{{ item.rule_name | default("replicated_rule") }}
{{ item.type | default("replicated") }}
{%- if item.type | default("replicated") == 'erasure' and item.erasure_profile != '' %}
{{ 1 if item.type|default(1) == 'replicated' else 3 if item.type|default(1) == 'erasure' else item.type|default(1) }}
{%- if (item.type | default("1") == '3' or item.type | default("1") == 'erasure') and item.erasure_profile != '' %}
{{ item.erasure_profile }}
{%- endif %}
{{ item.expected_num_objects | default('') }}

View File

@ -83,7 +83,7 @@ openstack_glance_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_cinder_pool:
@ -91,7 +91,7 @@ openstack_cinder_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_nova_pool:
@ -99,7 +99,7 @@ openstack_nova_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_cinder_backup_pool:
@ -107,7 +107,7 @@ openstack_cinder_backup_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_gnocchi_pool:
@ -115,7 +115,7 @@ openstack_gnocchi_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "replicated_rule"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""

View File

@ -6,8 +6,8 @@
{{ item.pg_num }}
{{ item.pgp_num | default(item.pg_num) }}
{{ item.rule_name | default("replicated_rule") }}
{{ item.type | default("replicated") }}
{%- if item.type | default("replicated") == 'erasure' and item.erasure_profile != '' %}
{{ 1 if item.type|default(1) == 'replicated' else 3 if item.type|default(1) == 'erasure' else item.type|default(1) }}
{%- if (item.type | default("1") == '3' or item.type | default("1") == 'erasure') and item.erasure_profile != '' %}
{{ item.erasure_profile }}
{%- endif %}
{{ item.expected_num_objects | default('') }}

View File

@ -6,7 +6,7 @@ test:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
test2:
@ -14,7 +14,7 @@ test2:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
pools:

View File

@ -19,7 +19,7 @@ openstack_glance_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_cinder_pool:
@ -27,7 +27,7 @@ openstack_cinder_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_pools:

View File

@ -5,7 +5,7 @@ test:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
test2:
@ -13,7 +13,7 @@ test2:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
pools:

View File

@ -6,7 +6,7 @@ test:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
test2:
@ -14,7 +14,7 @@ test2:
pg_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
pgp_num: "{{ hostvars[groups[mon_group_name][0]]['osd_pool_default_pg_num'] }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
pools:

View File

@ -19,7 +19,7 @@ openstack_glance_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_cinder_pool:
@ -27,7 +27,7 @@ openstack_cinder_pool:
pg_num: "{{ osd_pool_default_pg_num }}"
pgp_num: "{{ osd_pool_default_pg_num }}"
rule_name: "HDD"
type: "replicated"
type: 1
erasure_profile: ""
expected_num_objects: ""
openstack_pools: