[openstack-dev] Duplicate code for processing REST APIs

Kevin L. Mitchell kevin.mitchell at rackspace.com
Thu Mar 13 21:12:06 UTC 2014


On Thu, 2014-03-13 at 16:03 -0500, Steven Kaufer wrote:
> While investigating some REST API updates I've discovered that there
> is a lot of duplicated code across the various OpenStack components.
> 
> For example, the paginate_query function exists in all these locations
> and there are a few slight differences between most of them:
> 
> https://github.com/openstack/ceilometer/blob/master/ceilometer/openstack/common/db/sqlalchemy/utils.py#L61
> https://github.com/openstack/cinder/blob/master/cinder/openstack/common/db/sqlalchemy/utils.py#L37
> https://github.com/openstack/glance/blob/master/glance/openstack/common/db/sqlalchemy/utils.py#L64
> https://github.com/openstack/heat/blob/master/heat/openstack/common/db/sqlalchemy/utils.py#L62
> https://github.com/openstack/keystone/blob/master/keystone/openstack/common/db/sqlalchemy/utils.py#L64
> https://github.com/openstack/neutron/blob/master/neutron/openstack/common/db/sqlalchemy/utils.py#L61
> https://github.com/openstack/nova/blob/master/nova/openstack/common/db/sqlalchemy/utils.py#L64
> 
> Does anyone know if there is any work going on to move stuff like this
> into oslo and then deprecate these functions?  

Um, all of the referenced files are already in oslo; that's what the
openstack/common subtree contains.
-- 
Kevin L. Mitchell <kevin.mitchell at rackspace.com>
Rackspace




More information about the OpenStack-dev mailing list