From bcdf16d77bc9f654166bdc8f47884f6b16509d82 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Mon, 5 Oct 2009 10:36:01 +0100 Subject: [PATCH] Match instance and node names case insensitively Since DNS cannot contain two names with different cases anyway, this should be ok. Signed-off-by: Guido Trotter <ultrotter@google.com> Reviewed-by: Michael Hanselmann <hansmi@google.com> --- lib/config.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/config.py b/lib/config.py index 54f80702a..1905aa8be 100644 --- a/lib/config.py +++ b/lib/config.py @@ -854,7 +854,8 @@ class ConfigWriter: """ return utils.MatchNameComponent(short_name, - self._config_data.instances.keys()) + self._config_data.instances.keys(), + case_sensitive=False) def _UnlockedGetInstanceInfo(self, instance_name): """Returns information about an instance. @@ -934,7 +935,8 @@ class ConfigWriter: """ return utils.MatchNameComponent(short_name, - self._config_data.nodes.keys()) + self._config_data.nodes.keys(), + case_sensitive=False) def _UnlockedGetNodeInfo(self, node_name): """Get the configuration of a node, as stored in the config. -- GitLab