~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/server_mgmt/server.py

  • Committer: Mark Atwood
  • Date: 2011-10-08 04:50:51 UTC
  • mfrom: (2430.1.1 rf)
  • Revision ID: me@mark.atwood.name-20111008045051-6ha1qiy7k2a9c3jv
Tags: 2011.10.27
mergeĀ lp:~olafvdspek/drizzle/refactor2

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    def __init__(self
41
41
                , name
42
42
                , server_manager
43
 
                , code_tree
44
43
                , default_storage_engine
45
44
                , server_options
46
45
                , requester
64
63
        self.server_manager.log_server(self, requester)
65
64
 
66
65
        self.system_manager = self.server_manager.system_manager
67
 
        self.code_tree = code_tree
68
66
        self.valgrind = self.system_manager.valgrind
69
67
        self.gdb = self.system_manager.gdb
70
68
        if self.valgrind:
113
111
    def restore_snapshot(self):
114
112
        """ Restore from a stored snapshot """
115
113
        
116
 
        self.logging.verbose("Restoring from db snapshot")
 
114
        if self.verbose:
 
115
            self.logging.verbose("Restoring from db snapshot")
117
116
        if not os.path.exists(self.snapshot_path):
118
117
            self.logging.error("Could not find snapshot: %s" %(self.snapshot_path))
119
118
        self.system_manager.remove_dir(self.datadir)
122
121
    def is_started(self):
123
122
        """ Is the server running?  Particulars are server-dependent """
124
123
 
125
 
        return "You need to implement is_started"
 
124
        return
126
125
 
127
126
    def get_start_cmd(self):
128
127
        """ Return the command the server_manager can use to start me """
129
128
 
130
 
        return "You need to implement get_start_cmd"
 
129
        return "Allakazam!"
131
130
 
132
131
    def get_stop_cmd(self):
133
132
        """ Return the command the server_manager can use to stop me """
134
133
 
135
 
        return "You need to implement get_stop_cmd"
 
134
        return "Whoa, Nelly!"
136
135
 
137
136
    def get_ping_cmd(self):
138
137
        """ Return the command that can be used to 'ping' me 
144
143
 
145
144
        """
146
145
   
147
 
        return "You need to implement get_ping_cmd"
 
146
        return "Hello?"
148
147
 
149
148
    def cleanup(self):
150
149
        """ Cleanup - just free ports for now..."""