web/webctl.py
branchstable
changeset 7140 ba51dac1115d
parent 7132 e9c92bb79787
child 7274 4653a2a5110b
--- a/web/webctl.py	Wed Mar 30 11:08:15 2011 +0200
+++ b/web/webctl.py	Wed Mar 30 11:17:21 2011 +0200
@@ -28,16 +28,18 @@
 class WebCreateHandler(CommandHandler):
     cmdname = 'create'
 
-    def bootstrap(self, cubes, inputlevel=0):
+    def bootstrap(self, cubes, automatic=False, inputlevel=0):
         """bootstrap this configuration"""
-        print '\n' + underline_title('Generic web configuration')
-        config = self.config
-        if config.repo_method == 'pyro' or config.pyro_enabled():
-            print '\n' + underline_title('Pyro configuration')
-            config.input_config('pyro', inputlevel)
-        if ASK.confirm('Allow anonymous access ?', False):
-            config.global_set_option('anonymous-user', 'anon')
-            config.global_set_option('anonymous-password', 'anon')
+        if not automatic:
+            print '\n' + underline_title('Generic web configuration')
+            config = self.config
+            if config.repo_method == 'pyro' or config.pyro_enabled():
+                print '\n' + underline_title('Pyro configuration')
+                config.input_config('pyro', inputlevel)
+            config.input_config('web', inputlevel)
+            if ASK.confirm('Allow anonymous access ?', False):
+                config.global_set_option('anonymous-user', 'anon')
+                config.global_set_option('anonymous-password', 'anon')
 
-    def postcreate(self):
+    def postcreate(self, *args, **kwargs):
         """hooks called once instance's initialization has been completed"""