提交 0a2ec452 编写于 作者: C Cleber Rosa

avocado/utils/lv_utils.py: keep thin_lv_create() for compatibility sake

And issue a deprecation warning.  It will then be removed in a couple
of Avocado releases.

Reference: https://trello.com/c/7TBqcAkR/1447-thinlvcreate-deprecate-the-utility-functionSigned-off-by: NCleber Rosa <crosa@redhat.com>
上级 cde488e8
......@@ -391,6 +391,27 @@ def lv_create(vg_name, lv_name, lv_size, force_flag=True,
LOGGER.debug("Created thin volume:%s", lv_name)
def thin_lv_create(vg_name, thinpool_name="lvthinpool", thinpool_size="1.5G",
thinlv_name="lvthin", thinlv_size="1G"):
"""
Create a thin volume from given volume group.
Note: this is a deprecated API and will be removed soon.
:param vg_name: An exist volume group
:param thinpool_name: The name of thin pool
:param thinpool_size: The size of thin pool to be created
:param thinlv_name: The name of thin volume
:param thinlv_size: The size of thin volume
"""
LOGGER.warn("thin_lv_create() is a deprecated API and will be removed "
"soon. Please resort to using lv_create() which is now "
"capable of creathing thin logical volumes")
lv_create(vg_name=vg_name, lv_name=thinlv_name, lv_size=thinlv_size,
pool_name=thinpool_name, pool_size=thinpool_size)
return (thinpool_name, thinlv_name)
def lv_list(vg_name=None):
"""
List all info about available logical volumes.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册