LGTM, thanks.

On Wed, Mar 26, 2014 at 2:25 PM, Hrvoje Ribicic <[email protected]> wrote:

> This patch adds the test for RAPI symmetry at the cluster level. There
> are some fields that have not been exposed yet, and their absence was
> noted.
>
> Signed-off-by: Hrvoje Ribicic <[email protected]>
> ---
>  qa/qa_rapi.py | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)
>
> diff --git a/qa/qa_rapi.py b/qa/qa_rapi.py
> index 9708864..e49553d 100644
> --- a/qa/qa_rapi.py
> +++ b/qa/qa_rapi.py
> @@ -35,6 +35,7 @@ from ganeti import constants
>  from ganeti import errors
>  from ganeti import pathutils
>  from ganeti import objects
> +from ganeti import opcodes
>  from ganeti import query
>  from ganeti import qlang
>  from ganeti import rapi
> @@ -304,6 +305,21 @@ def TestEmptyCluster():
>      else:
>        raise qa_error.Error("Non-implemented method didn't fail")
>
> +  # Test GET/PUT symmetry
> +  LEGITIMATELY_MISSING = [
> +    "force",       # Standard option
> +    "add_uids",    # Modifies UID pool, is not a param itself
> +    "remove_uids", # Same as above
> +  ]
> +  NOT_EXPOSED_YET = ["hv_state", "disk_state", "modify_etc_hosts"]
> +  # The nicparams are returned under the default entry, yet accepted as
> they
> +  # are - this is a TODO to fix!
> +  DEFAULT_ISSUES = ["nicparams"]
> +
> +  _DoGetPutTests("/2/info", "/2/modify",
> opcodes.OpClusterSetParams.OP_PARAMS,
> +                 exceptions=(LEGITIMATELY_MISSING + NOT_EXPOSED_YET),
> +                 set_exceptions=DEFAULT_ISSUES)
> +
>
>  def TestRapiQuery():
>    """Testing resource queries via remote API.
> --
> 1.9.1.423.g4596e3a
>
>


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