Important -- subtle bug in ServerById() fixed

2 views
Skip to first unread message

Samuel Falvo II

unread,
Jun 30, 2014, 7:08:37 PM6/30/14
to gophercloud-dev
Many thanks to Ian Delahorne for reporting a subtle bug concerning the
ServerById() function in the 0.1.x API.

If you attempt to query for a non-existent server resource, it will panic.

WHY?

Somewhere amongst the commit history for the 0.1.x API, a line that reads:

OkCodes: []int{200},

either was removed in error, OR, I must have thought that []int{200}
would have been a sane default in Perigee, and someone removed that
default in Perigee. In either case, it affected ServerById() by
leaving a hole in its validation.

CHANGES

Re-introducing a valid set of OkCodes fixes this bug. The latest
release of Gophercloud now contains this fix. Please update your
Gophercloud package to receive this patch.

--
Samuel A. Falvo II
Reply all
Reply to author
Forward
0 new messages