<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 22.08.2016 19:05, Martin Basti
      wrote:<br>
    </div>
    <blockquote
      cite="mid:125c391a-36c1-5867-a395-08859093c7b5@redhat.com"
      type="cite">
      <meta content="text/html; charset=windows-1252"
        http-equiv="Content-Type">
      <p><br>
      </p>
      <br>
      <div class="moz-cite-prefix">On 22.08.2016 17:48, Martin Basti
        wrote:<br>
      </div>
      <blockquote
        cite="mid:6b7ecf18-952c-1c2e-5a35-744dc3fe434b@redhat.com"
        type="cite">
        <meta content="text/html; charset=windows-1252"
          http-equiv="Content-Type">
        <p><br>
        </p>
        <br>
        <div class="moz-cite-prefix">On 22.08.2016 10:22, Tomas Krizek
          wrote:<br>
        </div>
        <blockquote
          cite="mid:e2bcdb98-4adf-abcd-b2a0-b9b1aadfe3d8@redhat.com"
          type="cite">
          <meta content="text/html; charset=windows-1252"
            http-equiv="Content-Type">
          <p><tt>Seems like a good idea, I'm attaching the updated
              patch. Autofill does work when the param is required.<br>
            </tt></p>
          <tt><br>
          </tt>
          <div class="moz-cite-prefix"><tt>On 08/19/2016 04:19 PM,
              Martin Basti wrote:</tt><tt><br>
            </tt></div>
          <blockquote
            cite="mid:ba5f5348-0106-f45e-2c2b-5a048e4e1634@redhat.com"
            type="cite">
            <meta content="text/html; charset=windows-1252"
              http-equiv="Content-Type">
            <p><tt><br>
              </tt> </p>
            <tt><br>
            </tt>
            <div class="moz-cite-prefix"><tt>On 16.08.2016 17:35, Tomas
                Krizek wrote:</tt><tt><br>
              </tt> </div>
            <blockquote
              cite="mid:e7efe1ef-fbfa-7c26-b02e-c2e9e62ed2a4@redhat.com"
              type="cite"><tt>Hi, </tt><tt><br>
              </tt> <tt><br>
              </tt><tt> the attached patch fixes an error message when
                user provides an empty key while adding otp token. </tt><tt><br>
              </tt> <tt><br>
              </tt> <tt><a moz-do-not-send="true"
                  class="moz-txt-link-freetext"
                  href="https://fedorahosted.org/freeipa/ticket/6200">https://fedorahosted.org/freeipa/ticket/6200</a></tt><tt>
              </tt><tt><br>
              </tt> <tt><br>
              </tt> <tt><br>
              </tt>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <tt><br>
              </tt> </blockquote>
            <tt><br>
            </tt><tt> I'm curious why we don't fix it here:</tt><tt><br>
            </tt> <tt><br>
            </tt><tt>         OTPTokenKey('ipatokenotpkey?',</tt><tt><br>
            </tt><tt>             cli_name='key',</tt><tt><br>
            </tt><tt>             label=_('Key'),</tt><tt><br>
            </tt><tt>             doc=_('Token secret (Base32; default:
              random)'),</tt><tt><br>
            </tt><tt>             default_from=lambda:
              os.urandom(KEY_LENGTH),</tt><tt><br>
            </tt><tt>             autofill=True,</tt><tt><br>
            </tt><tt>             flags=('no_display', 'no_update',
              'no_search'),</tt><tt><br>
            </tt><tt>         ),</tt><tt><br>
            </tt> <tt><br>
            </tt> <tt><br>
            </tt><tt> If OTPTokenKey is mandratory, it should be
              required param (autofill should work in this case too)</tt><tt><br>
            </tt> <tt><br>
            </tt><tt> Martin^2</tt><tt><br>
            </tt> </blockquote>
          <tt><br>
          </tt>
          <pre class="moz-signature" cols="72">-- 
Tomas Krizek</pre>
        </blockquote>
        <br>
        You changed API, you must regenerate API.txt (./makeapi) and
        increment minor version in VERSION file<br>
        <br>
        Option 'ipatokenotpkey?' in command 'otptoken_add/1' in API file
        not found<br>
        Options count in otptoken_add of 22 doesn't match expected: 23<br>
        Option ipatokenotpkey of command otptoken_add in ipalib, not in
        API file:<br>
        OTPTokenKey('ipatokenotpkey', autofill=True, cli_name='key')<br>
        <br>
        Martin^2<br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
      </blockquote>
      <br>
      [root@vm-058-107 ~]# ipa otptoken-add --key='ORSXG5DFON2AU==='<br>
      Usage: ipa [global-options] otptoken-add [ID] [options]<br>
      <br>
      ipa: error: --key option does not take a value<br>
      <br>
      <br>
      Well patch doesnt work for me, Honza may know if this is expected
      behavior of framework or just params bug<br>
      <br>
      Martin62<br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    My, bad this is expected.<br>
    <br>
    Martin^2<br>
  </body>
</html>