Same scenario as described in bug 1441002. I've tried using "device claim-sticky-ip-address" for a device I've previously assigned several IPs using set-sticky-ip-address. If I don't specify a "requested_address=" (only mac_address= or without it), it appears to succeed, but the list of IPs for the device in the result output is unchanged (only 3 I've previously set with set-sticky-ip-address are visible, but in the web UI after reloading the Devices page I can see the IP Assignedment column shows Static IP, rather than External IP as before). If I specify an available IP from the static range for "requested_address=" I get the same 500 INTERNAL SERVER ERROR ('bool' object has no attribute 'uuid') as described in the bug above, but the operation seems to succeed, as the address shows in a subsequent "devices list". Here's a paste of the steps I did and the results: http://paste.ubuntu.com/10759226/
I think one of Raphael's commits fixed the UUID problem you describe.
Regarding calling the claim-sticky- ip-address API more than once, let me see if I understand the use case: you want to claim X number of IP addresses for a device. In that situation, rather than calling the API X times, would it be better to call the API once to say (basically) something like:
device claim-sticky- ip-address count=5
:param count: (positive integer) Optional count of addresses to allocate. If specified, attempts to ensure that the device claims at least 'count' addresses. If the 'count' specifies is less than or equal to the number of IP addresses the device (or device+mac) has already allocated, the operation will return success, but will not allocate any additional IP addresses.
Thoughts?