more cwctl api update and fixes stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 25 Aug 2010 13:45:41 +0200
branchstable
changeset 6145 528be1e059aa
parent 6144 40af8e328e64
child 6148 59c446a813b5
more cwctl api update and fixes
cwctl.py
goa/goactl.py
--- a/cwctl.py	Wed Aug 25 11:23:22 2010 +0200
+++ b/cwctl.py	Wed Aug 25 13:45:41 2010 +0200
@@ -573,7 +573,7 @@
                 print '*'*72
                 if not ASK.confirm('%s instance %r ?' % (self.name, appid)):
                     continue
-            StopInstanceCommand().stop_instance(appid)
+            StopInstanceCommand(self.logger).stop_instance(appid)
         forkcmd = [w for w in sys.argv if not w in args]
         forkcmd[1] = 'start'
         forkcmd = ' '.join(forkcmd)
@@ -583,7 +583,7 @@
                 sys.exit(status)
 
     def restart_instance(self, appid):
-        StopInstanceCommand().stop_instance(appid)
+        StopInstanceCommand(self.logger).stop_instance(appid)
         self.start_instance(appid)
 
 
@@ -742,7 +742,7 @@
             print '-> migration needed from %s to %s for %s' % (fromversion, toversion, cube)
         # only stop once we're sure we have something to do
         if not (CWDEV or self.config.nostartstop):
-            StopInstanceCommand().stop_instance(appid)
+            StopInstanceCommand(self.logger).stop_instance(appid)
         # run cubicweb/componants migration scripts
         mih.migrate(vcconf, reversed(toupgrade), self.config)
         # rewrite main configuration file
--- a/goa/goactl.py	Wed Aug 25 11:23:22 2010 +0200
+++ b/goa/goactl.py	Wed Aug 25 13:45:41 2010 +0200
@@ -15,15 +15,14 @@
 #
 # You should have received a copy of the GNU Lesser General Public License along
 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
-"""cubicweb on appengine plugins for cubicweb-ctl
+"""cubicweb on appengine plugins for cubicweb-ctl"""
 
-"""
 __docformat__ = "restructuredtext en"
 
 from os.path import exists, join, split, basename, normpath, abspath
-from logilab.common.clcommands import register_commands
 
 from cubicweb import CW_SOFTWARE_ROOT, BadCommandUsage
+from cubicweb.cwctl import CWCTL
 from cubicweb.toolsutils import (Command, copy_skeleton, create_symlink,
                                  create_dir)
 from cubicweb.cwconfig import CubicWebConfiguration
@@ -250,5 +249,4 @@
             config.save()
 
 
-register_commands((NewGoogleAppCommand,
-                   ))
+CWCTL.register(NewGoogleAppCommand)