Validation of list args for valid_values()
Validation of list args for valid_values()

Added code to ensure that valid_values and invalid_values are lists.
If they are not, the user can get unexpected results.

Example:

var1 = 'enabled'
valid_value(var1, valid_values='enableddd')

In this case, valid_values is a string so when the function does this:

if var1 in valid_values:

The answer will be "yes" so will will get an incorrect validation.

The correct invocation should be this:

valid_value(var1, valid_values=['enableddd'])

Which correctly yields a failure:

var1:                                             enabled <str>

It must be one of the following values:

valid_values: <list>
  [0]:                                            enableddd <str>

Change-Id: I2d10a00a4cc372af4c2eacc0dc33afbaa0ccf3a7
Signed-off-by: Michael Walsh <10404802c7de463f402c4a18638106ca1b12ef61@us.ibm.com>

openbmc/openbmc-test-automation,openbmc/openbmc-test-automation