reset all implemented

This commit is contained in:
root 2010-05-25 20:19:10 +02:00
parent 2fc7ce2149
commit de24b20c68
2 changed files with 14 additions and 7 deletions

View File

@ -47,13 +47,20 @@ class MyCmd(cmd.Cmd):
if len(parts) != 1:
raise LocalMyCmdException("illegal number of arguments")
x = parts[0]
if MyCmd.entries.has_key(x):
MyCmd.entries[x].address = '0.0.0.0'
MyCmd.entries[x].addressInDns = '0.0.0.0'
MyCmd.entries[x].lastEventTime = int(time.time())
self.stdout.write(str(MyCmd.entries[x]) + "\n")
if x == 'all':
for entry in MyCmd.entries.values():
entry.address = '0.0.0.0'
entry.addressInDns = '0.0.0.0'
entry.lastEventTime = int(time.time())
self.stdout.write(str(entry) + "\n")
else:
raise LocalMyCmdException("unknown dynid")
if MyCmd.entries.has_key(x):
MyCmd.entries[x].address = '0.0.0.0'
MyCmd.entries[x].addressInDns = '0.0.0.0'
MyCmd.entries[x].lastEventTime = int(time.time())
self.stdout.write(str(MyCmd.entries[x]) + "\n")
else:
raise LocalMyCmdException("unknown dynid")
except LocalMyCmdException, e:
self.stdout.write("Failure: %s\n" % str(e.msg))

View File

@ -50,7 +50,7 @@ CUSTOMERS_FILE = "/var/db/yadyn/customers"
ACTIONLOG_DIR = "/var/db/yadyn/actionlog"
ADMIN_PWD = 'test123'
DNS_DUMMY = False
DEBUG = False
DEBUG = True
BACKGROUND = True