2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-10-05 13:26:03 +00:00

bindctl config show improvements;

if the identified item is a map, show the entries
if it is a list, show the items with an index
(thinking about having a third one; if the list consists of map items, show the entries of those too, but we need list addressing (#405) to do that right)

also added a show_json command which simply prints the complete item and all its children in JSON format

temporarily added a few fake config_data items to Auth to play around with. we'll need to remove these before merge later


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac384@3443 e5f2f494-b856-4b98-b285-d166d9295462
This commit is contained in:
Jelte Jansen
2010-11-04 11:44:48 +00:00
parent 88effdc1b0
commit 359efa4b21
6 changed files with 124 additions and 6 deletions

View File

@@ -566,6 +566,12 @@ class BindCmdInterpreter(Cmd):
if value_map['modified']:
line += "(modified)"
print(line)
elif cmd.command == "show_json":
if identifier == "":
print("Need at least the module to show the configuration in JSON format")
else:
data, default = self.config_data.get_value(identifier)
print(json.dumps(data))
elif cmd.command == "add":
self.config_data.add_value(identifier, cmd.params['value'])
elif cmd.command == "remove":