Mercurial > libervia-pubsub
annotate idavoll/tap.py @ 65:d617f8d19263
Add get_node_type() to BackendService.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Sat, 06 Nov 2004 22:15:26 +0000 |
parents | 7d088c61e131 |
children | 66fac7cd9edc |
rev | line source |
---|---|
1 | 1 from twisted.application import internet, service |
2 from twisted.internet import interfaces | |
3 from twisted.python import usage | |
4 import idavoll | |
5 | |
6 class Options(usage.Options): | |
7 optParameters = [ | |
8 ('jid', None, 'pubsub'), | |
9 ('secret', None, None), | |
10 ('rhost', None, '127.0.0.1'), | |
42
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
11 ('rport', None, '6000'), |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
12 ('backend', None, 'memory'), |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
13 ('dbuser', None, ''), |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
14 ('dbname', None, 'pubsub'), |
1 | 15 ] |
42
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
16 |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
17 def postOptions(self): |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
18 if self['backend'] not in ['pgsql', 'memory']: |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
19 raise usage.UsageError, "Unknown backend!" |
1 | 20 |
21 def makeService(config): | |
22 return idavoll.makeService(config) |