fog-openstack
fog-openstack copied to clipboard
inconsistent model-collection methods to get by id
In Fog, the model collections classes (typically the pluralised names in lib/fog/provider/models/service) have a get(id) method to fetch a model object by its ID. In the case where the ID cannot be found, the get(id) method typically swallows the NotFound exception and returns nil.
In the OpenStack provider case, some classes use get(id) as described above, some use get(id) but do not swallow the NotFound exception, some classes use find_by_id(id) and not not swallow the exception, and in one case both methods are supported with find_by_id being marked as deprecated.
In other words, there is a great deal of inconsistency in how to get a model object by its ID in the Fog OpenStack provider.
Original issue opened by @hague at fog/fog#3726
cc/ @dhague @Ladas @geemus