Mercurial > libervia-pubsub
annotate idavoll/tap.py @ 96:f289c3e1dd0a
Announce pubsub#delete-any feature.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 23 Nov 2004 16:36:58 +0000 |
parents | 66fac7cd9edc |
children | cf918d581da5 |
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 ] |
76
66fac7cd9edc
Added -v (--verbose) flag to print out all traffic.
Ralph Meijer <ralphm@ik.nu>
parents:
42
diff
changeset
|
16 |
66fac7cd9edc
Added -v (--verbose) flag to print out all traffic.
Ralph Meijer <ralphm@ik.nu>
parents:
42
diff
changeset
|
17 optFlags = [('verbose', 'v', 'Show traffic')] |
42
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
18 |
7d088c61e131
Make choice of backend an option to mktap. This includes the database
Ralph Meijer <ralphm@ik.nu>
parents:
1
diff
changeset
|
19 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
|
20 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
|
21 raise usage.UsageError, "Unknown backend!" |
1 | 22 |
23 def makeService(config): | |
24 return idavoll.makeService(config) |