← Back to team overview

openstack team mailing list archive

OpenStack core components library

 

Hey all,

So, I've noticed that there are a lot of similar code in the Nova and
Swift (and I presume Glance as well...) that is redundant in its
purpose.

Examples of redundant code include:

Configuration file and options processing
=================================

In Nova, gflags is used for CLI option processing and there is the
--flags-file ability to read configuration options
In Swift, the getopt, optparse and ConfigParser are used throughout the codebase

WSGI
=====

In Nova, eventlet.wsgi is used, but wrapped with some convenience
functions in /nova/wsgi.py
In Swift, same thing, wrappers are in /swift/common/wsgi.py

Logging
======

Both Nova and Swift use the standard logging module with some utility
wrappers linked with the
way configuration options are processed.

Common utility functions
====================

Nova contains a file /nova/utils.py containing common utility functions.
Swift contains a file /swift/common/utils.py also containing utility
functions, many serving similar purposes of those in Nova and vice
versa

My proposal is to create another project on Launchpad called
openstack-common that will contain a Python library that standardizes
and consolidates all the above-mentioned overlap and makes an
easy-to-use, well-documented library of common utilities and modules
for the OpenStack family of projects to use.  We could definitely be
more efficient in re-using code from Nova and Swfit that are
redundant, and it would be good to have a common way of, for instance,
accessing program configuration options and such.

Thoughts?

-jay



Follow ups