235
235
self.context_reload()
238
def migrate_databases(self, url, password, databases):
239
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
241
raise Exception("This URL is not Error in the URL")
242
if m.group(1) == 'http://' or m.group(1) == 'https://':
243
sock = xmlrpclib.ServerProxy(url + '/xmlrpc/db')
244
return sock.migrate_databases(password, databases)
246
sock = tiny_socket.mysocket()
247
sock.sock.settimeout(None)
248
sock.connect(m.group(2), int(m.group(3)))
249
sock.mysend(('db', 'migrate_databases', password, databases))
250
res = sock.myreceive()
254
def get_migration_scripts(self, url, password, contract_id, contract_password):
255
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
257
raise Exception("This URL is not Error in the URL")
258
if m.group(1) == 'http://' or m.group(1) == 'https://':
259
sock = xmlrpclib.ServerProxy(url + '/xmlrpc/common')
260
sock.get_migration_scripts(password, contract_id, contract_password)
262
sock = tiny_socket.mysocket()
263
sock.connect(m.group(2), int(m.group(3)))
264
sock.mysend(('common', 'get_migration_scripts', password, contract_id, contract_password))
265
res = sock.myreceive()
268
def about(self, url):
269
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')
271
raise Exception("This URL is not Error in the URL")
272
if m.group(1) == 'http://' or m.group(1) == 'https://':
273
sock = xmlrpclib.ServerProxy(url + '/xmlrpc/common')
276
sock = tiny_socket.mysocket()
277
sock.connect(m.group(2), int(m.group(3)))
278
sock.mysend(('common', 'about'))
279
res = sock.myreceive()
238
283
def list_db(self, url):
239
284
m = re.match('^(http[s]?://|socket://)([\w.\-]+):(\d{1,5})$', url or '')