<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Sending the patch with renamed function.<small><br>
    </small><br>
    Standa<br>
    <br>
    <div class="moz-cite-prefix">On 12/01/2015 09:57 AM, Jan Cholasta
      wrote:<br>
    </div>
    <blockquote cite="mid:565D6116.9070203@redhat.com" type="cite">On
      1.12.2015 09:37, Petr Spacek wrote:
      <br>
      <blockquote type="cite">On 30.11.2015 20:00, Martin Basti wrote:
        <br>
        <blockquote type="cite">
          <br>
          <br>
          On 27.11.2015 16:06, Stanislav Laznicka wrote:
          <br>
          <blockquote type="cite">Please, see the modified patch
            attached.
            <br>
            <br>
            Standa
            <br>
            <br>
            On 11/27/2015 03:48 PM, Martin Basti wrote:
            <br>
            <blockquote type="cite">
              <br>
              <br>
              On 27.11.2015 15:33, Petr Spacek wrote:
              <br>
              <blockquote type="cite">On 27.11.2015 15:32, Martin Basti
                wrote:
                <br>
                <blockquote type="cite">
                  <br>
                  On 25.11.2015 17:18, Stanislav Laznicka wrote:
                  <br>
                  <blockquote type="cite">There were two functions for
                    the same purpose. Removed one.
                    <br>
                    <br>
                    <br>
                  </blockquote>
                  Hello,
                  <br>
                  <br>
                  I would like to have "log" param of is_host_resolvable
                  as optional
                  <br>
                </blockquote>
                Is there an immediate need for the optional param? If
                not, I would not
                <br>
                clutter
                <br>
                the code.
                <br>
                <br>
              </blockquote>
              So at least I would like to move log param as the last
              param, in case of
              <br>
              need it can be modified to optional parameter.
              <br>
              <br>
              Or log can be default as root_logger, IMO we us only
              root_logger
              <br>
              everywhere, but this need investigation.
              <br>
              <br>
              Martin
              <br>
            </blockquote>
            <br>
          </blockquote>
          It works, but I would like to have Honza's opinion if
          ipalib/util.py is the
          <br>
          right place for the new method and if we really need to use
          exceptions.
          <br>
        </blockquote>
      </blockquote>
      <br>
      ipalib/util.py is fine for the function, since it is not used
      anywhere in ipapython.
      <br>
      <br>
      I would rename the function to verify_host_resolvable() though,
      since the is_ prefix suggests the function returns a boolean value
      rather than raises an exception or not.
      <br>
      <br>
      <blockquote type="cite">
        <blockquote type="cite">
          <br>
          IMO is_record_resolvable() should return only True/False and
          then it can be
          <br>
          located in ipapython module
          <br>
        </blockquote>
        <br>
        Hmm, I do not see a reason why it should not throw an exception.
        IMHO the
        <br>
        exception should contain the original error/result from
        resolver, so it is
        <br>
        possible to print meaningful error message like "DNS query timed
        out" instead
        <br>
        of "it does not work for some reason, trust us".
        <br>
        <br>
      </blockquote>
      <br>
      <br>
    </blockquote>
    <br>
  </body>
</html>