Hs2Py constants: update 'SF_*' references
authorJose A. Lopes <jabolopes@google.com>
Wed, 18 Sep 2013 16:36:25 +0000 (18:36 +0200)
committerJose A. Lopes <jabolopes@google.com>
Fri, 20 Sep 2013 13:03:03 +0000 (15:03 +0200)
Update references to storage field Python constants to fetch their
values from 'lib/_constants.py'.

Signed-off-by: Jose A. Lopes <jabolopes@google.com>
Reviewed-by: Klaus Aehlig <aehlig@google.com>

lib/constants.py

index 14ad564..f5c40ae 100644 (file)
@@ -368,14 +368,14 @@ STS_REPORT = compat.UniqueFrozenset([ST_FILE, ST_LVM_PV, ST_LVM_VG])
 
 # Storage fields
 # first two are valid in LU context only, not passed to backend
-SF_NODE = "node"
-SF_TYPE = "type"
+SF_NODE = _constants.SF_NODE
+SF_TYPE = _constants.SF_TYPE
 # and the rest are valid in backend
-SF_NAME = "name"
-SF_SIZE = "size"
-SF_FREE = "free"
-SF_USED = "used"
-SF_ALLOCATABLE = "allocatable"
+SF_NAME = _constants.SF_NAME
+SF_SIZE = _constants.SF_SIZE
+SF_FREE = _constants.SF_FREE
+SF_USED = _constants.SF_USED
+SF_ALLOCATABLE = _constants.SF_ALLOCATABLE
 
 # Storage operations
 SO_FIX_CONSISTENCY = "fix-consistency"