server/serverctl.py
changeset 9759 846bc9227394
parent 9577 c52441e4a3d7
child 9797 4e640ab62f51
equal deleted inserted replaced
9758:91f3cb7db2aa 9759:846bc9227394
   457                 'the %s file. Resolve this first (error: %s).'
   457                 'the %s file. Resolve this first (error: %s).'
   458                 % (config.sources_file(), str(ex).strip()))
   458                 % (config.sources_file(), str(ex).strip()))
   459         init_repository(config, drop=self.config.drop)
   459         init_repository(config, drop=self.config.drop)
   460         if not self.config.automatic:
   460         if not self.config.automatic:
   461             while ASK.confirm('Enter another source ?', default_is_yes=False):
   461             while ASK.confirm('Enter another source ?', default_is_yes=False):
   462                 CWCTL.run(['add-source', '--config-level',
   462                 CWCTL.run(['source-add', '--config-level',
   463                            str(self.config.config_level), config.appid])
   463                            str(self.config.config_level), config.appid])
   464 
   464 
   465 
   465 
   466 class AddSourceCommand(Command):
   466 class AddSourceCommand(Command):
   467     """Add a data source to an instance.
   467     """Add a data source to an instance.
   468 
   468 
   469     <instance>
   469     <instance>
   470       the identifier of the instance to initialize.
   470       the identifier of the instance to initialize.
   471     """
   471     """
   472     name = 'add-source'
   472     name = 'source-add'
   473     arguments = '<instance>'
   473     arguments = '<instance>'
   474     min_args = max_args = 1
   474     min_args = max_args = 1
   475     options = (
   475     options = (
   476         ('config-level',
   476         ('config-level',
   477          {'short': 'l', 'type': 'int', 'default': 1,
   477          {'short': 'l', 'type': 'int', 'default': 1,