~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-11 22:37:47 UTC
  • mfrom: (2429.2.1 dbqp_revamp)
  • Revision ID: me@mark.atwood.name-20111011223747-vomebzgvnxxysqrm
mergeĀ lp:~patrick-crews/drizzle/dbqp_revamp

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