LGTM, thanks

On Wed, May 1, 2013 at 12:52 PM, Guido Trotter <[email protected]> wrote:

> We had parameter validation when the runtime is generated, but in the
> middle of the function. Move up, before any parameter is accessed.
>
> Signed-off-by: Guido Trotter <[email protected]>
> ---
>  lib/hypervisor/hv_kvm.py |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/lib/hypervisor/hv_kvm.py b/lib/hypervisor/hv_kvm.py
> index cc64d8b..cffdb62 100644
> --- a/lib/hypervisor/hv_kvm.py
> +++ b/lib/hypervisor/hv_kvm.py
> @@ -1019,6 +1019,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
>      """
>      # pylint: disable=R0912,R0914,R0915
>      hvp = instance.hvparams
> +    self.ValidateParameters(hvp)
>
>      pidfile = self._InstancePidFile(instance.name)
>      kvm = hvp[constants.HV_KVM_PATH]
> @@ -1060,8 +1061,6 @@ class KVMHypervisor(hv_base.BaseHypervisor):
>        boot_floppy = hvp[constants.HV_BOOT_ORDER] == constants.HT_BO_FLOPPY
>        boot_network = hvp[constants.HV_BOOT_ORDER] ==
> constants.HT_BO_NETWORK
>
> -    self.ValidateParameters(hvp)
> -
>      if startup_paused:
>        kvm_cmd.extend([_KVM_START_PAUSED_FLAG])
>
> --
> 1.7.10.4
>
>


-- 
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, Katherine Stephens

Reply via email to