LGTM, thanks.

On Mon, Sep 30, 2013 at 6:36 PM, Santi Raffa <[email protected]> wrote:

> On Mon, Sep 30, 2013 at 6:20 PM, Santi Raffa <[email protected]> wrote:
> >      for value in constants.DISK_VALID_ACCESS_PROTOCOLS:
>
> Whooops~
>
> Actual interdiff:
>
> diff --git a/test/py/cmdlib/cluster_unittest.py
> b/test/py/cmdlib/cluster_unittest.py
> index 8866a25..64a703d 100644
> --- a/test/py/cmdlib/cluster_unittest.py
> +++ b/test/py/cmdlib/cluster_unittest.py
> @@ -447,20 +447,21 @@ class TestLUClusterSetParams(CmdlibTestCase):
>      self.assertEqual(diskparams, self.cluster.diskparams)
>
>    def testValidDiskparamsAccess(self):
> -    attr_gen = lambda value: {constants.DT_RBD: {constants.LDP_ACCESS:
> value}}
> -    for value in constants.DISK_VALID_ACCESS_PROTOCOLS:
> +    for value in constants.DISK_VALID_ACCESS_MODES:
>        self.ResetMocks()
> -      op = opcodes.OpClusterSetParams(diskparams=attr_gen(value))
> +      op = opcodes.OpClusterSetParams(diskparams={
> +        constants.DT_RBD: {constants.LDP_ACCESS: value}
> +      })
>        self.ExecOpCode(op)
> -      have = attr_gen(value)[constants.DT_RBD][constants.LDP_ACCESS]
>        got =
> self.cluster.diskparams[constants.DT_RBD][constants.LDP_ACCESS]
> -      self.assertEqual(have, got)
> +      self.assertEqual(value, got)
>
>    def testInvalidDiskparamsAccess(self):
> -    attr_gen = lambda value: {constants.DT_RBD: {constants.LDP_ACCESS:
> value}}
>      for value in ["default", "pinky_bunny"]:
>        self.ResetMocks()
> -      op = opcodes.OpClusterSetParams(diskparams=attr_gen(value))
> +      op = opcodes.OpClusterSetParams(diskparams={
> +        constants.DT_RBD: {constants.LDP_ACCESS: value}
> +      })
>        self.ExecOpCodeExpectOpPrereqError(op, "Invalid value of
> 'rbd:access'")
>
>    def testUnsetDrbdHelperWithDrbdDisks(self):
>
>
>
>
> --
> Raffa Santi
> Google Germany GmbH
> Dienerstr. 12
> 80331 München
>
>
> Registergericht und -nummer: Hamburg, HRB 86891
> Sitz der Gesellschaft: Hamburg
> Geschäftsführer: Graham Law, Christine Elizabeth Flores
>



-- 
Thomas Thrainer | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to