[blivet:master 03/11] Explicitly accept a string as well as a RAIDLevel object.
mulhern
amulhern at redhat.com
Tue Jun 17 15:07:54 UTC 2014
This aligns this choice with the equivalent for mdraid.mdcreate.
Signed-off-by: mulhern <amulhern at redhat.com>
---
blivet/devicelibs/btrfs.py | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/blivet/devicelibs/btrfs.py b/blivet/devicelibs/btrfs.py
index b4ae439..0e1171d 100644
--- a/blivet/devicelibs/btrfs.py
+++ b/blivet/devicelibs/btrfs.py
@@ -53,13 +53,15 @@ def btrfs(args, capture=False):
def create_volume(devices, label=None, data=None, metadata=None):
"""Create a btrfs filesystem on the list of devices specified by devices.
- Optional arguments label, data, metadata corresponds to flags
- accepted by mkfs.btrfs.
-
:param data: a raid level for data
- :type data: :class:`~.devicelibs.raid.RAIDLevel`
+ :type data: :class:`~.devicelibs.raid.RAIDLevel` or str
:param metadata: a raid level for metadata
- :type metadata: :class:`~.devicelibs.raid.RAIDLevel`
+ :type metadata: :class:`~.devicelibs.raid.RAIDLevel` or str
+
+ Note that if a level is specified as a string, rather than by means
+ of a RAIDLevel object, it is not checked for validity. It is the
+ responsibility of the invoking method to verify that mkfs.btrfs
+ recognizes the string.
"""
if not devices:
raise ValueError("no devices specified")
--
1.9.3
More information about the anaconda-patches
mailing list