add support for channel config being nested

this adds support for the channel config being nested, and provides
the basis for moving message catalog out of the code and into the
yaml in a new nested section.

Change-Id: I7353af4c3f141d4bd617d6fd388d7957e0586ba8
This commit is contained in:
Sean Dague 2014-07-24 09:07:38 -04:00
parent 45a459212d
commit f8106a21fe
2 changed files with 22 additions and 18 deletions

View File

@ -217,6 +217,11 @@ class RecheckWatch(threading.Thread):
class ChannelConfig(object):
def __init__(self, data):
self.data = data
# for compatibility reasons we support a pre channel hierarchy
# model of the world.
if 'channels' in data:
self.data = data['channels']
keys = data.keys()
for key in keys:
if key[0] != '#':

View File

@ -1,19 +1,18 @@
openstack-nova:
projects:
- nova
events:
- positive
openstack-glance:
projects:
- glance
events:
- positive
openstack-qa:
projects:
- all
events:
- positive
- negative
channels:
openstack-nova:
projects:
- nova
events:
- positive
openstack-glance:
projects:
- glance
events:
- positive
openstack-qa:
projects:
- all
events:
- positive
- negative