BIND 10 trac547-summarized, updated. dcd582cc0a7d02d69c3c7c28916980f71034f9b2 Merge branch 'trac547-summarized' of ssh://bind10.isc.org/var/bind10/git/bind10 into trac547-summarized

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Apr 18 02:19:22 UTC 2011


The branch, trac547-summarized has been updated
       via  dcd582cc0a7d02d69c3c7c28916980f71034f9b2 (commit)
       via  c6947d22cd80d5934ad53c91b74c640c8a64e57c (commit)
      from  36b32903369f9a3afda93e2537d369d2402a3bfc (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 dcd582cc0a7d02d69c3c7c28916980f71034f9b2
Merge: c6947d22cd80d5934ad53c91b74c640c8a64e57c 36b32903369f9a3afda93e2537d369d2402a3bfc
Author: Naoki Kambe <kambe at jprs.co.jp>
Date:   Mon Apr 18 11:18:45 2011 +0900

    Merge branch 'trac547-summarized' of ssh://bind10.isc.org/var/bind10/git/bind10 into trac547-summarized
    
    Conflicts:
    	src/bin/stats/tests/isc/config/ccsession.py

commit c6947d22cd80d5934ad53c91b74c640c8a64e57c
Author: Naoki Kambe <kambe at jprs.co.jp>
Date:   Mon Apr 18 11:14:11 2011 +0900

    [trac547] updated docstring of the 'get_value' method and added a note there

-----------------------------------------------------------------------

Summary of changes:
 src/bin/stats/tests/isc/config/ccsession.py |   45 ++++++---------------------
 1 files changed, 10 insertions(+), 35 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/bin/stats/tests/isc/config/ccsession.py b/src/bin/stats/tests/isc/config/ccsession.py
index 046a35f..a4e9c37 100644
--- a/src/bin/stats/tests/isc/config/ccsession.py
+++ b/src/bin/stats/tests/isc/config/ccsession.py
@@ -95,45 +95,20 @@ class ConfigData:
 
     def get_value(self, identifier):
         """Returns a tuple where the first item is the value at the
-           given identifier, and the second item is a bool which is
-           False if the identifier has the default value in the spec
-           file. If the identifier has no default value the spec file,
-           it returns a tuple where first item is an empty value of
-           each type, and the second item is True. It raises an
+           given identifier, and the second item is absolutely False
+           even if the value is an unset default or not. Raises an
            DataNotFoundError if the identifier is not found in the
-           spec file.
+           specification file.
            *** NOTE ***
-           This method is strictly not same as the original method in
-           isc.config.config_data.ConfigData, so this method is
-           limited with only internal use to test the statistics
-           modules. This method never handles the local variables and
-           is different from the original method at this point.
-           However there is no issue in testing it. Because the
-           statistics modules never call the method after they call it
-           at first."""
-        def _get_value(config_map):
-                if 'item_default' in config_map:
-                    return config_map['item_default'], False
-                elif 'item_type' in config_map:
-                    if config_map['item_type'] == 'boolean':
-                        return bool(), True
-                    elif config_map['item_type'] == 'string':
-                        return str(), True
-                    elif config_map['item_type'] in set(['number', 'integer']):
-                        return int(), True
-                    elif config_map['item_type'] in set(['float', 'double', 'real']):
-                        return float(), True
-                    elif config_map['item_type'] in set(['list', 'array']):
-                        return [ _get_value(conf)
-                                 for conf in spec['list_item_spec'] ], True
-                    elif config_map['item_type'] in set(['map', 'object']):
-                        return dict(
-                            [ (conf['item_name'], _get_value(conf))
-                              for conf in config_map['map_item_spec'] ]), True
-                return None, True
+           There are some differences from the original method. This
+           method never handles local settings like the original
+           method. But these different behaviors aren't so big issues
+           for a mock-up method of stats_httpd because stats_httpd
+           calls this method at only first."""
         for config_map in self.get_module_spec().get_config_spec():
             if config_map['item_name'] == identifier:
-                return _get_value(config_map)
+                if 'item_default' in config_map:
+                    return config_map['item_default'], False
         raise DataNotFoundError("item_name %s is not found in the specfile" % identifier)
 
     def get_module_spec(self):




More information about the bind10-changes mailing list