server/serverctl.py
changeset 5967 8deedfeb7846
parent 5814 51cc4b61f9ae
child 5990 6f3c77c79a88
equal deleted inserted replaced
5966:0677cfb28ad2 5967:8deedfeb7846
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """cubicweb-ctl commands and command handlers specific to the
    18 """cubicweb-ctl commands and command handlers specific to the repository"""
    19 server.serverconfig
       
    20 """
       
    21 
    19 
    22 __docformat__ = 'restructuredtext en'
    20 __docformat__ = 'restructuredtext en'
    23 
    21 
    24 # *ctl module should limit the number of import to be imported as quickly as
    22 # *ctl module should limit the number of import to be imported as quickly as
    25 # possible (for cubicweb-ctl reactivity, necessary for instance for usable bash
    23 # possible (for cubicweb-ctl reactivity, necessary for instance for usable bash
   153 class RepositoryCreateHandler(CommandHandler):
   151 class RepositoryCreateHandler(CommandHandler):
   154     cmdname = 'create'
   152     cmdname = 'create'
   155     cfgname = 'repository'
   153     cfgname = 'repository'
   156 
   154 
   157     def bootstrap(self, cubes, inputlevel=0):
   155     def bootstrap(self, cubes, inputlevel=0):
   158         """create an instance by copying files from the given cube and by
   156         """create an instance by copying files from the given cube and by asking
   159         asking information necessary to build required configuration files
   157         information necessary to build required configuration files
   160         """
   158         """
   161         from cubicweb.server.utils import ask_source_config
   159         from cubicweb.server.utils import ask_source_config
   162         config = self.config
   160         config = self.config
   163         print underline_title('Configuring the repository')
   161         print underline_title('Configuring the repository')
   164         config.input_config('email', inputlevel)
   162         config.input_config('email', inputlevel)