# HG changeset patch # User Paul Tonelli # Date 1398699247 -7200 # Node ID 560747cd7774a1264f36b7fa004669a66b601b47 # Parent 36b75aefe2c225015d35f7c1024622da7a9b16ef [serverctl] Ask for parser type when adding a new source (closes #3484231) Remove 'quick_start' option to load all AppObjects, including feed parsers. diff -r 36b75aefe2c2 -r 560747cd7774 server/serverctl.py --- a/server/serverctl.py Wed Jun 11 10:57:28 2014 +0200 +++ b/server/serverctl.py Mon Apr 28 17:34:07 2014 +0200 @@ -482,7 +482,6 @@ def run(self, args): appid = args[0] config = ServerConfiguration.config_for(appid) - config.quick_start = True repo, cnx = repo_cnx(config) with cnx: used = set(n for n, in cnx.execute('Any SN WHERE S is CWSource, S name SN')) @@ -505,6 +504,12 @@ continue break while True: + parser = raw_input('parser type (%s): ' + % ', '.join(sorted(repo.vreg['parsers']))) + if parser in repo.vreg['parsers']: + break + print '-> unknown parser identifier, use one of the available types.' + while True: sourceuri = raw_input('source identifier (a unique name used to ' 'tell sources apart): ').strip() if not sourceuri: @@ -518,8 +523,8 @@ # XXX configurable inputlevel sconfig = ask_source_config(config, type, inputlevel=self.config.config_level) cfgstr = unicode(generate_source_config(sconfig), sys.stdin.encoding) - cnx.create_entity('CWSource', name=sourceuri, - type=unicode(type), config=cfgstr) + cnx.create_entity('CWSource', name=sourceuri, type=unicode(type), + config=cfgstr, parser=unicode(parser)) cnx.commit()