LGTM, thanks

On Thu, Mar 20, 2014 at 3:48 PM, Jose A. Lopes <[email protected]> wrote:

> Moving instances requires creating a new instance, but
> 'tools/move-instance' was passing an empty string for OS scripts when
> the source instance did not have OS scripts defined.
>
> Signed-off-by: Jose A. Lopes <[email protected]>
> ---
>  tools/move-instance | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/tools/move-instance b/tools/move-instance
> index 4c33418..4d9abf4 100755
> --- a/tools/move-instance
> +++ b/tools/move-instance
> @@ -628,6 +628,11 @@ class MoveDestExecutor(object):
>        for idx, (nic, override) in enumerate(zip(nics, override_nics)):
>          nics[idx] = objects.FillDict(nic, override)
>
> +    if instance["os"]:
> +      os_type = instance["os"]
> +    else:
> +      os_type = None
> +
>      # TODO: Should this be the actual up/down status? (run_state)
>      start = (instance["config_state"] == "up")
>
> @@ -648,7 +653,7 @@ class MoveDestExecutor(object):
>
>      return cl.CreateInstance(constants.INSTANCE_REMOTE_IMPORT,
>                               name, disk_template, disks, nics,
> -                             os=instance["os"],
> +                             os=os_type,
>                               pnode=pnode,
>                               snode=snode,
>                               start=start,
> --
> 1.9.0.279.gdc9e3eb
>
>

Reply via email to