Commit ee2a86bd authored by Jelte Jansen's avatar Jelte Jansen

[master] fix bug in bindctl 'config add'

reviewed on jabber
parent 0b98878e
......@@ -425,7 +425,7 @@ class UIModuleCCSession(MultiConfigData):
raise ModuleCCSessionError("Bad config version")
self._set_current_config(config)
def _add_value_to_list(self, identifier, value):
def _add_value_to_list(self, identifier, value, module_spec):
cur_list, status = self.get_value(identifier)
if not cur_list:
cur_list = []
......@@ -491,7 +491,7 @@ class UIModuleCCSession(MultiConfigData):
if set_value_str is not None:
value_str += set_value_str
value = isc.cc.data.parse_value_str(value_str)
self._add_value_to_list(identifier, value)
self._add_value_to_list(identifier, value, module_spec)
elif 'named_set_item_spec' in module_spec:
item_name = None
item_value = None
......
......@@ -745,6 +745,8 @@ class TestUIModuleCCSession(unittest.TestCase):
uccs.remove_value, "Spec2/item5[123]", None)
uccs.remove_value("Spec2/item5[0]", None)
self.assertEqual({'Spec2': {'item5': []}}, uccs._local_changes)
uccs.add_value("Spec2/item5", None);
self.assertEqual({'Spec2': {'item5': ['']}}, uccs._local_changes)
def test_add_remove_value_named_set(self):
fake_conn = fakeUIConn()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment