Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sebastian Schrader
Kea
Commits
ced9ddec
Commit
ced9ddec
authored
Jul 27, 2011
by
Jelte Jansen
Browse files
[trac926] review comments
parent
be388eb6
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bin/bindctl/bindcmd.py
View file @
ced9ddec
...
...
@@ -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
d
nf
e
:
print
(
"Error: "
+
str
(
d
nf
e
))
except
isc
.
cc
.
data
.
DataAlreadyPresentError
as
d
ap
e
:
print
(
"Error: "
+
str
(
d
ap
e
))
except
KeyError
as
ke
:
print
(
"Error: missing "
+
str
(
ke
))
else
:
...
...
src/lib/config/module_spec.cc
View file @
ced9ddec
...
...
@@ -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
);
...
...
src/lib/python/isc/config/config_data.py
View file @
ced9ddec
...
...
@@ -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'
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment