- mail related tables in database schema
- gpg encryption for mails - domain creation and deletion completed - logging - use pwd and grp git-svn-id: file:///home/www/usr01/svn/gnuviechadmin/gnuviech.info/gnuviechadmin/trunk@230 a67ec6bc-e5d5-0310-a910-815c51eb3124
This commit is contained in:
parent
3f4457bdca
commit
fdea3217c8
28 changed files with 877 additions and 323 deletions
|
@ -19,7 +19,7 @@
|
|||
#
|
||||
# Version: $Id$
|
||||
|
||||
import getopt, sys
|
||||
import getopt, sys, logging
|
||||
from gnuviechadmin.exceptions import GnuviechadminError
|
||||
|
||||
class CliCommand:
|
||||
|
@ -198,6 +198,8 @@ Common options:
|
|||
def __init__(self, args):
|
||||
"""This initializes the command with the given command line
|
||||
arguments and executes it."""
|
||||
self.logger = logging.getLogger("%s.%s" % (
|
||||
self.__class__.__module__, self.__class__.__name__))
|
||||
self._data = {}
|
||||
if len(args) > 0:
|
||||
if args[0] in self._subcommands():
|
||||
|
|
|
@ -59,6 +59,8 @@ class ClientCli(CliCommand.CliCommand):
|
|||
"the client id", True)])}
|
||||
|
||||
def _execute(self, subcommand):
|
||||
self.logger.debug("execute %s with data %s", subcommand,
|
||||
str(self._data))
|
||||
from gnuviechadmin.backend import client
|
||||
from gnuviechadmin import exceptions
|
||||
if subcommand == "create":
|
||||
|
|
|
@ -43,6 +43,8 @@ class DomainCli(CliCommand.CliCommand):
|
|||
"the domain id", True)])}
|
||||
|
||||
def _execute(self, subcommand):
|
||||
self.logger.debug("execute %s with data %s", subcommand,
|
||||
str(self._data))
|
||||
from gnuviechadmin.backend.domain import DomainHandler
|
||||
from gnuviechadmin import exceptions
|
||||
if subcommand == "create":
|
||||
|
|
|
@ -37,16 +37,19 @@ class RecordCli(CliCommand.CliCommand):
|
|||
(["-p", "--prio"], "prio",
|
||||
"MX record priority", False),
|
||||
(["--ttl"], "ttl",
|
||||
"Time to live", False),
|
||||
"time to live", False),
|
||||
(["-d", "--domainid"], "domainid",
|
||||
"Domain id", True)]),
|
||||
"domain id", True)]),
|
||||
'list' : ("lists existing records",
|
||||
[]),
|
||||
[(["-d", "--domainid"], "domainid",
|
||||
"domain id", False)]),
|
||||
'delete' : ("delete a record",
|
||||
[(["-r", "--recordid"], "recordid",
|
||||
"the record id", True)])}
|
||||
|
||||
def _execute(self, subcommand):
|
||||
self.logger.debug("execute %s with data %s", subcommand,
|
||||
str(self._data))
|
||||
from gnuviechadmin.backend.record import RecordHandler
|
||||
from gnuviechadmin import exceptions
|
||||
if subcommand == "create":
|
||||
|
@ -60,7 +63,7 @@ class RecordCli(CliCommand.CliCommand):
|
|||
print cfe
|
||||
sys.exit(2)
|
||||
elif subcommand == "list":
|
||||
records = RecordHandler(self._verbose).fetchall()
|
||||
records = RecordHandler(self._verbose).fetchall(**self._data)
|
||||
for record in records:
|
||||
print record
|
||||
elif subcommand == "delete":
|
||||
|
|
|
@ -47,6 +47,8 @@ class SysuserCli(CliCommand.CliCommand):
|
|||
"the system user id", True)])}
|
||||
|
||||
def _execute(self, subcommand):
|
||||
self.logger.debug("execute %s with data %s", subcommand,
|
||||
str(self._data))
|
||||
from gnuviechadmin.backend import sysuser
|
||||
from gnuviechadmin import exceptions
|
||||
if subcommand == "create":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue