Typo in patch title.

On May 22 14:56, 'Helga Velroyen' via ganeti-devel wrote:
> One 'too many branches' error.
> 
> Signed-off-by: Helga Velroyen <[email protected]>
> ---
>  tools/confd-client | 50 ++++++++++++++++++++++++++++++--------------------
>  1 file changed, 30 insertions(+), 20 deletions(-)
> 
> diff --git a/tools/confd-client b/tools/confd-client
> index a070088..f2e6ae6 100755
> --- a/tools/confd-client
> +++ b/tools/confd-client
> @@ -133,21 +133,40 @@ class TestClient(object):
>  
>      self.opts = options
>  
> +  def _ProcessNotOk(self, reply, reqtype):
> +    Log("Query %s gave non-ok status %s: %s" % (reply.orig_request,
> +                                                reply.server_reply.status,
> +                                                reply.server_reply))
> +    if self.is_timing:
> +      Err("Aborting timing tests")
> +    if reqtype == constants.CONFD_REQ_CLUSTER_MASTER:
> +      Err("Cannot continue after master query failure")
> +    if reqtype == constants.CONFD_REQ_INSTANCES_IPS_LIST:
> +      Err("Cannot continue after instance IP list query failure")
> +
> +  def _ProcessIpList(self, answer):
> +    Log("Instance primary IP query: OK")
> +    if not answer:
> +      Log("no IPs received", indent=1)
> +    else:
> +      LogAtMost(answer, 5, indent=1)
> +    self.instance_ips = answer

If you still have patience, you could make also make these methods static.

LGTM.

Thanks,
Jose

> +
> +  @staticmethod
> +  def _ProcessMapping(answer):
> +    Log("Instance IP to node IP query: OK")
> +    if not answer:
> +      Log("no mapping received", indent=1)
> +    else:
> +      LogAtMost(answer, 5, indent=1)
> +
>    def ConfdCallback(self, reply):
>      """Callback for confd queries"""
>      if reply.type == confd_client.UPCALL_REPLY:
>        answer = reply.server_reply.answer
>        reqtype = reply.orig_request.type
>        if reply.server_reply.status != constants.CONFD_REPL_STATUS_OK:
> -        Log("Query %s gave non-ok status %s: %s" % (reply.orig_request,
> -                                                    
> reply.server_reply.status,
> -                                                    reply.server_reply))
> -        if self.is_timing:
> -          Err("Aborting timing tests")
> -        if reqtype == constants.CONFD_REQ_CLUSTER_MASTER:
> -          Err("Cannot continue after master query failure")
> -        if reqtype == constants.CONFD_REQ_INSTANCES_IPS_LIST:
> -          Err("Cannot continue after instance IP list query failure")
> +        self._ProcessNotOk(reply, reqtype)
>          return
>        if self.is_timing:
>          return
> @@ -170,18 +189,9 @@ class TestClient(object):
>          Log("Master candidates primary IP query: OK")
>          LogAtMost(answer, 5, indent=1)
>        elif reqtype == constants.CONFD_REQ_INSTANCES_IPS_LIST:
> -        Log("Instance primary IP query: OK")
> -        if not answer:
> -          Log("no IPs received", indent=1)
> -        else:
> -          LogAtMost(answer, 5, indent=1)
> -        self.instance_ips = answer
> +        self._ProcessIpList(answer)
>        elif reqtype == constants.CONFD_REQ_NODE_PIP_BY_INSTANCE_IP:
> -        Log("Instance IP to node IP query: OK")
> -        if not answer:
> -          Log("no mapping received", indent=1)
> -        else:
> -          LogAtMost(answer, 5, indent=1)
> +        self._ProcessMapping(answer)
>        else:
>          Log("Unhandled reply %s, please fix the client", reqtype)
>          print answer
> -- 
> 1.9.1.423.g4596e3a
> 

-- 
Jose Antonio Lopes
Ganeti Engineering
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
Steuernummer: 48/725/00206
Umsatzsteueridentifikationsnummer: DE813741370

Reply via email to