summaryrefslogtreecommitdiffstats
path: root/nova/block_device.py
diff options
context:
space:
mode:
authorSean Dague <sdague@linux.vnet.ibm.com>2013-01-08 17:00:49 -0500
committerSean Dague <sdague@linux.vnet.ibm.com>2013-01-09 15:47:22 -0500
commit296288222240338bae5c2edf533cf4e3b52b5da6 (patch)
treed8ff1ca20114e77f339aa47f9045688e500a6861 /nova/block_device.py
parentda1c8bdd5cde21f12d608b618ed9342baf760d65 (diff)
downloadnova-296288222240338bae5c2edf533cf4e3b52b5da6.tar.gz
nova-296288222240338bae5c2edf533cf4e3b52b5da6.tar.xz
nova-296288222240338bae5c2edf533cf4e3b52b5da6.zip
fix N402 for rest of nova
fix N402 (single line docstrings should end in a period) for rest of nova files Change-Id: I57d0d9ab01345dd83e544e476d79d2c2ca68ee51
Diffstat (limited to 'nova/block_device.py')
-rw-r--r--nova/block_device.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/block_device.py b/nova/block_device.py
index 7e1e5374a..c95961911 100644
--- a/nova/block_device.py
+++ b/nova/block_device.py
@@ -62,7 +62,7 @@ def is_swap_or_ephemeral(device_name):
def mappings_prepend_dev(mappings):
- """Prepend '/dev/' to 'device' entry of swap/ephemeral virtual type"""
+ """Prepend '/dev/' to 'device' entry of swap/ephemeral virtual type."""
for m in mappings:
virtual = m['virtual']
if (is_swap_or_ephemeral(virtual) and
@@ -75,7 +75,7 @@ _dev = re.compile('^/dev/')
def strip_dev(device_name):
- """remove leading '/dev/'"""
+ """remove leading '/dev/'."""
return _dev.sub('', device_name) if device_name else device_name
@@ -83,7 +83,7 @@ _pref = re.compile('^((x?v|s)d)')
def strip_prefix(device_name):
- """remove both leading /dev/ and xvd or sd or vd """
+ """remove both leading /dev/ and xvd or sd or vd."""
device_name = strip_dev(device_name)
return _pref.sub('', device_name)
@@ -139,7 +139,7 @@ def instance_block_mapping(instance, bdms):
def match_device(device):
- """Matches device name and returns prefix, suffix"""
+ """Matches device name and returns prefix, suffix."""
match = re.match("(^/dev/x{0,1}[a-z]{0,1}d{0,1})([a-z]+)[0-9]*$", device)
if not match:
return None