From 8e273c5f42e72158da0a11529dcdad11a7079d95 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 7 Oct 2010 10:40:05 +0300 Subject: Pretty printers for proxy settings in various test tool. --- test/get-services | 9 ++++++--- test/list-providers | 8 ++++++-- test/list-services | 5 ++++- test/monitor-services | 5 ++++- test/test-manager | 8 ++++++-- 5 files changed, 26 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/get-services b/test/get-services index d337e0ca..3fec3940 100755 --- a/test/get-services +++ b/test/get-services @@ -6,7 +6,10 @@ def extract_values(values): val = "{" for key in values.keys(): val += " " + key + "=" - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -33,8 +36,8 @@ for entry in services: for key in properties.keys(): if key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", - "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", "Domains", "Domains.Configuration"]: diff --git a/test/list-providers b/test/list-providers index 94375d55..84976859 100755 --- a/test/list-providers +++ b/test/list-providers @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -38,7 +41,8 @@ for path in properties["Providers"]: for key in properties.keys(): if key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", "Domains", "Domains.Configuration"]: diff --git a/test/list-services b/test/list-services index 88eea693..c4ae5d75 100755 --- a/test/list-services +++ b/test/list-services @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val diff --git a/test/monitor-services b/test/monitor-services index ceeba790..b7c95de8 100755 --- a/test/monitor-services +++ b/test/monitor-services @@ -9,7 +9,10 @@ def extract_values(values): val = "{" for key in values.keys(): val += " " + key + "=" - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val diff --git a/test/test-manager b/test/test-manager index b5a2530c..2a967f56 100755 --- a/test/test-manager +++ b/test/test-manager @@ -9,7 +9,10 @@ def extract_values(values): if key in ["PrefixLength"]: val += "%s" % (int(values[key])) else: - val += str(values[key]) + if key in ["Servers", "Excludes"]: + val += extract_list(values[key]) + else: + val += str(values[key]) val += " }" return val @@ -64,7 +67,8 @@ def print_properties(key, value): elif key in ["IPv4", "IPv4.Configuration", "IPv6", "IPv6.Configuration", - "Proxy", "Ethernet", "Provider"]: + "Proxy", "Proxy.Configuration", + "Ethernet", "Provider"]: val = extract_values(properties[key]) elif key in ["Nameservers", "Nameservers.Configuration", -- cgit v1.2.3