On 06/23/2014 09:29 AM, Alexander Bokovoy wrote:
On Fri, 20 Jun 2014, Nathaniel McCallum wrote:

3. This code currently emits a warning from the call to otptoken-add:
WARNING: API Version number was not sent, forward compatibility not
guaranteed. Assuming server's API version, 2.89

How do I fix this?
Do not filter 'version' field in options in execute().

Please hardcode the API version instead of reusing it.
This will be important when otptoken_add_yubikey is put in a separate package.

i.e.:
+        answer = self.api.Command.otptoken_add(*args,
+            type=u'hotp',
+            ipatokenotpalgorithm=u'sha1',
+            ipatokenhotpcounter=0,
+            version='2.89',
+            **options)

This way even if otptoken_add changes in the future, the fixed version string will trigger behavior compatible with what otptoken_add_yubikey expects now.


--
PetrĀ³

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to