/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to mandos-ctl

  • Committer: Björn Påhlsson
  • Date: 2010-10-02 17:53:34 UTC
  • mto: (24.1.170 mandos) (237.4.29 release)
  • mto: This revision was merged to the branch mainline in revision 453.
  • Revision ID: belorn@fukt.bsnet.se-20101002175334-45vmfxvdexfvnc8t
Tags: version-1.2.1-2
* debian/changelog (1.2.1-2): New entry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
# -*- mode: python; coding: utf-8 -*-
 
3
 
4
# Mandos Monitor - Control and monitor the Mandos server
 
5
 
6
# Copyright © 2008-2010 Teddy Hogeborn
 
7
# Copyright © 2008-2010 Björn Påhlsson
 
8
 
9
# This program is free software: you can redistribute it and/or modify
 
10
# it under the terms of the GNU General Public License as published by
 
11
# the Free Software Foundation, either version 3 of the License, or
 
12
# (at your option) any later version.
 
13
#
 
14
#     This program is distributed in the hope that it will be useful,
 
15
#     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
#     GNU General Public License for more details.
 
18
 
19
# You should have received a copy of the GNU General Public License
 
20
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
22
# Contact the authors at <mandos@fukt.bsnet.se>.
 
23
3
24
 
4
25
from __future__ import division
5
26
import sys
17
38
    'Enabled': u'Enabled',
18
39
    'Timeout': u'Timeout',
19
40
    'LastCheckedOK': u'Last Successful Check',
 
41
    'LastApprovalRequest': u'Last Approval Request',
20
42
    'Created': u'Created',
21
43
    'Interval': u'Interval',
22
44
    'Host': u'Host',
35
57
server_path = '/'
36
58
server_interface = domain + '.Mandos'
37
59
client_interface = domain + '.Mandos.Client'
38
 
version = "1.0.14"
 
60
version = "1.2.1"
39
61
 
40
62
def timedelta_to_milliseconds(td):
41
63
    "Convert a datetime.timedelta object to milliseconds"
239
261
                            'LastCheckedOK', 'Created', 'Interval',
240
262
                            'Host', 'Fingerprint', 'CheckerRunning',
241
263
                            'LastEnabled', 'ApprovalPending',
242
 
                            'ApprovedByDefault', 'ApprovalDelay',
 
264
                            'ApprovedByDefault',
 
265
                            'LastApprovalRequest', 'ApprovalDelay',
243
266
                            'ApprovalDuration', 'Checker')
244
267
            else:
245
268
                keywords = defaultkeywords
246
 
                
 
269
            
247
270
            print_clients(clients.values(), keywords)
248
271
        else:
249
272
            # Process each client in the list by all selected options