From 8115bc2ad5bc3751cd59958d0d48dd2d2065cfa7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Wed, 14 Dec 2016 14:40:35 +0100 Subject: [PATCH] Collections are now named flamenco_xxx instead of flamenco.xxx The dot notation disallowed Eve hooks, as the collection names weren't valid Python identifiers. --- pillar/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pillar/__init__.py b/pillar/__init__.py index 22a3a4b2..2f149659 100644 --- a/pillar/__init__.py +++ b/pillar/__init__.py @@ -225,12 +225,13 @@ class PillarServer(Eve): eve_settings = pillar_extension.eve_settings() if 'DOMAIN' in eve_settings: - pillar_ext_prefix = pillar_extension.name + '.' + pillar_ext_prefix = pillar_extension.name + '_' + pillar_url_prefix = pillar_extension.name + '/' for key, collection in eve_settings['DOMAIN'].items(): assert key.startswith(pillar_ext_prefix), \ 'Eve collection names of %s MUST start with %r' % \ (pillar_extension.name, pillar_ext_prefix) - url = key.replace('.', '/') + url = key.replace(pillar_ext_prefix, pillar_url_prefix) collection.setdefault('datasource', {}).setdefault('source', key) collection.setdefault('url', url)