fixed indentaion problem in utils.py :359

Conflicts:
	tools/marvin/marvin/integration/lib/utils.py
This commit is contained in:
SrikanteswaraRao Talluri 2013-11-08 18:00:55 +05:30
parent d05891afa1
commit 011b87eadc

View File

@ -329,11 +329,10 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid):
(config.mgtSvr[0].mgtSvrIp, e)) (config.mgtSvr[0].mgtSvrIp, e))
return 'snapshot exists' in result return 'snapshot exists' in result
def validateList(inp): def validateList(inp):
''' """
@name: validateList @name: validateList
@Description: 1. A utility function to validate @Description: 1. A utility function to validate
whether the input passed is a list whether the input passed is a list
2. The list is empty or not 2. The list is empty or not
3. If it is list and not empty, return PASS and first element 3. If it is list and not empty, return PASS and first element
@ -350,18 +349,18 @@ def validateList(inp):
default to None. default to None.
INVALID_INPUT INVALID_INPUT
EMPTY_LIST EMPTY_LIST
''' """
ret = [FAIL, None, None] ret = [FAIL, None, None]
if inp is None: if inp is None:
ret[2] = INVALID_INPUT ret[2] = INVALID_INPUT
return ret return ret
if not isinstance(inp, list): if not isinstance(inp, list):
ret[2] = INVALID_INPUT ret[2] = INVALID_INPUT
return ret return ret
if len(inp) == 0: if len(inp) == 0:
ret[2] = EMPTY_LIST ret[2] = EMPTY_LIST
return ret return ret
return [PASS, inp[0], None] return [PASS, inp[0], None]
def verifyElementInList(inp, toverify, responsevar=None, pos=0): def verifyElementInList(inp, toverify, responsevar=None, pos=0):
''' '''