draft implementation of BackendDB API
authorEd Bartosh <eduard.bartosh@intel.com>
Sat, 18 May 2013 21:07:50 +0000 (00:07 +0300)
committerGerrit Code Review <gerrit2@otctools.jf.intel.com>
Mon, 27 May 2013 02:50:17 +0000 (19:50 -0700)
commit89fab6ecfed69825a9f8e5beb6bce8b2bced7b40
tree9b3a7db53709db17703c5d844d7a47e4b84630a6
parentbac76926d113d81bc8f1b5acbab94e473478b285
draft implementation of BackendDB API

This is generic API, which allows to store repository data in Redis.
API utilizes Redis hashes:
    'repo:<name>' hash contains attributes of the repository and their values

It's also an attempt to build generic API to store any type of data in Redis.
The ideas is that any type of data can be stored in Redis as set of
<type>:<subtype1>:<subtype2>... records, which point to data in Redis
hash format.

For example:
  Git->OBS mappings can be stored as set of keys with this format:
  gitobs-map:<project>:<branch>
  and hashes of this format: {"OBS_project": "home:user:project",
                              "OBS_staging_project": "home:user:staging"}

Format of hashes is not strict, so it can be extended whenever
needed.

Format of keys is stricter, but also flexible in a sense that
it's easy to change it or even increase amount of levels(depth) of it.

Change-Id: I2eb5d92d0ff6f5536a230068783a6507dfd6134d
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
common/backenddb.py [new file with mode: 0644]
packaging/jenkins-scripts.spec
tests/test_backenddb.py [new file with mode: 0644]