BIND 10 trac926, updated. ced9ddecf6b8f7777125b8d4d2ef1b24ccad34cd [trac926] review comments
BIND 10 source code commits
bind10-changes at lists.isc.org
Wed Jul 27 11:38:04 UTC 2011
The branch, trac926 has been updated
via ced9ddecf6b8f7777125b8d4d2ef1b24ccad34cd (commit)
from be388eb699a8517595ea921082b5ded2d1450dcc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit ced9ddecf6b8f7777125b8d4d2ef1b24ccad34cd
Author: Jelte Jansen <jelte at isc.org>
Date: Wed Jul 27 12:44:33 2011 +0200
[trac926] review comments
-----------------------------------------------------------------------
Summary of changes:
src/bin/bindctl/bindcmd.py | 4 ++--
src/lib/config/module_spec.cc | 3 ++-
src/lib/python/isc/config/config_data.py | 7 ++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/bin/bindctl/bindcmd.py b/src/bin/bindctl/bindcmd.py
index b6b7238..3ddc9ad 100644
--- a/src/bin/bindctl/bindcmd.py
+++ b/src/bin/bindctl/bindcmd.py
@@ -398,8 +398,8 @@ class BindCmdInterpreter(Cmd):
print("Error: " + str(dte))
except isc.cc.data.DataNotFoundError as dnfe:
print("Error: " + str(dnfe))
- except isc.cc.data.DataAlreadyPresentError as dnfe:
- print("Error: " + str(dnfe))
+ except isc.cc.data.DataAlreadyPresentError as dape:
+ print("Error: " + str(dape))
except KeyError as ke:
print("Error: missing " + str(ke))
else:
diff --git a/src/lib/config/module_spec.cc b/src/lib/config/module_spec.cc
index 7594458..306c795 100644
--- a/src/lib/config/module_spec.cc
+++ b/src/lib/config/module_spec.cc
@@ -327,7 +327,8 @@ ModuleSpec::validateItem(ConstElementPtr spec, ConstElementPtr data,
}
}
if (data->getType() == Element::map) {
- // either a 'normal' map or a 'named' set
+ // either a normal 'map' or a 'named set' (determined by which
+ // subspecification it has)
if (spec->contains("map_item_spec")) {
if (!validateSpecList(spec->get("map_item_spec"), data, full, errors)) {
return (false);
diff --git a/src/lib/python/isc/config/config_data.py b/src/lib/python/isc/config/config_data.py
index f7f338e..fabd37d 100644
--- a/src/lib/python/isc/config/config_data.py
+++ b/src/lib/python/isc/config/config_data.py
@@ -196,7 +196,6 @@ def spec_name_list(spec, prefix="", recurse=False):
elif 'named_set_item_spec' in spec:
# we added a '/' above, but in this one case we don't want it
result.append(prefix[:-1])
- pass
else:
for name in spec:
result.append(prefix + name + "/")
@@ -420,6 +419,12 @@ class MultiConfigData:
id_prefix += "/" + id_part
part_spec = find_spec_part(self._specifications[module].get_config_spec(), id_prefix)
if part_spec['item_type'] == 'named_set':
+ # For named sets, the identifier is partly defined
+ # by which values are actually present, and not
+ # purely by the specification.
+ # So if there is a part of the identifier left,
+ # we need to look up the value, then see if that
+ # contains the next part of the identifier we got
if len(id_parts) == 0:
if 'item_default' in part_spec:
return part_spec['item_default']
More information about the bind10-changes
mailing list