Skip to content

Commit e0b0f25

Browse files
authored
check for thinlv name before assigning to thinlv_params (#276)
Only set the thinlv_param name if thinlv has 'name'
1 parent 8b868a3 commit e0b0f25

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

library/blivet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ def get_vol_size(volume):
13751375

13761376
thinlv_params = dict(thin_pool=True, size=tlv_size, parents=[pool_device])
13771377

1378-
if thinlv is not None:
1378+
if thinlv['name'] is not None:
13791379
thinlv_params.update(dict(name=thinlv['name']))
13801380

13811381
try:
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
# This file was generated by generate_tests.py
3+
- hosts: all
4+
tags:
5+
- tests::nvme
6+
tasks:
7+
- name: set disk interface for test
8+
set_fact:
9+
storage_test_use_interface: "nvme"
10+
11+
- import_playbook: tests_create_thinp_then_remove.yml
12+
tags:
13+
- tests::nvme
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
# This file was generated by generate_tests.py
3+
- hosts: all
4+
tags:
5+
- tests::scsi
6+
tasks:
7+
- name: set disk interface for test
8+
set_fact:
9+
storage_test_use_interface: "scsi"
10+
11+
- import_playbook: tests_create_thinp_then_remove.yml
12+
tags:
13+
- tests::scsi

0 commit comments

Comments
 (0)