LGTM, thanks.

On Fri, Aug 23, 2013 at 10:35 PM, Jose A. Lopes <[email protected]>wrote:

> From: "Jose A. Lopes" <[email protected]>
>
> Constant 'SF_NODE' is a storage field and, therefore, should be in
> 'VALID_STORAGE_FIELDS'.  This patch fixes this and also reference to
> these constants, namely, in 'cmdlib' and 'qa'.
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  lib/cmdlib/node.py | 3 +--
>  lib/constants.py   | 1 +
>  qa/qa_node.py      | 3 +--
>  3 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/lib/cmdlib/node.py b/lib/cmdlib/node.py
> index c62e691..178235e 100644
> --- a/lib/cmdlib/node.py
> +++ b/lib/cmdlib/node.py
> @@ -1392,11 +1392,10 @@ class LUNodeQueryStorage(NoHooksLU):
>    """Logical unit for getting information on storage units on node(s).
>
>    """
> -  _FIELDS_STATIC = utils.FieldSet(constants.SF_NODE)
>    REQ_BGL = False
>
>    def CheckArguments(self):
> -    _CheckOutputFields(static=self._FIELDS_STATIC,
> +    _CheckOutputFields(static=utils.FieldSet(),
>
> dynamic=utils.FieldSet(*constants.VALID_STORAGE_FIELDS),
>                         selected=self.op.output_fields)
>
> diff --git a/lib/constants.py b/lib/constants.py
> index 758bc3e..3418395 100644
> --- a/lib/constants.py
> +++ b/lib/constants.py
> @@ -415,6 +415,7 @@ SO_FIX_CONSISTENCY = "fix-consistency"
>
>  # Available fields per storage type
>  VALID_STORAGE_FIELDS = compat.UniqueFrozenset([
> +  SF_NODE,
>    SF_NAME,
>    SF_TYPE,
>    SF_SIZE,
> diff --git a/qa/qa_node.py b/qa/qa_node.py
> index 128f75c..a2928d6 100644
> --- a/qa/qa_node.py
> +++ b/qa/qa_node.py
> @@ -129,8 +129,7 @@ def TestNodeStorage():
>
>      # Test all storage fields
>      cmd = ["gnt-node", "list-storage", "--storage-type", storage_type,
> -           "--output=%s" % ",".join(list(constants.VALID_STORAGE_FIELDS) +
> -                                    [constants.SF_NODE])]
> +           "--output=%s" % ",".join(list(constants.VALID_STORAGE_FIELDS))]
>      AssertCommand(cmd)
>
>      # Get list of valid storage devices
> --
> 1.8.3
>
>


-- 
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