From 94ebcdee5e3f749292446e1dfe3486b3e85b3851 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 19 Nov 2019 00:54:58 +0000 Subject: [PATCH] make-secnet-sites: sort the properties This makes the test suite less sensitive to python version. Now it works with 2.7.13, 3.5.3. Signed-off-by: Ian Jackson --- make-secnet-sites | 3 ++- mtest/e-basic.conf | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/make-secnet-sites b/make-secnet-sites index d7a8494..74b09bd 100755 --- a/make-secnet-sites +++ b/make-secnet-sites @@ -430,7 +430,8 @@ class level: w.write("%s {\n"%(self.kname())) self.output_props(w,ind+2) if self.depth==1: w.write("\n"); - for c in self.children.values(): + for k in sorted(self.children.keys()): + c=self.children[k] c.output_data(w,path+(c,)) self.indent(w,ind) w.write("};\n") diff --git a/mtest/e-basic.conf b/mtest/e-basic.conf index 8718b57..6469d20 100644 --- a/mtest/e-basic.conf +++ b/mtest/e-basic.conf @@ -1,6 +1,6 @@ # secnet sites file autogenerated by make-secnet-sites version 0.1.18 -# Sun Oct 20 13:55:05 2019 -# Command line: ./make-secnet-sites test-example/sites ./mtest/d-basic/out.conf +# Tue Nov 19 00:51:37 2019 +# Command line: ./make-secnet-sites --no-conf-key-prefix test-example/sites ./mtest/d-basic/out.conf vpn-data { test-example { @@ -12,17 +12,6 @@ vpn-data { # Contact email address: key-lifetime 72000000; - out { - outside { - name "test-example/out/outside"; - key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); - address "[::1]"; port 16900; - link netlink { - routes "172.18.232.0/29"; - ptp-address "172.18.232.1"; - }; - }; - }; in { inside { name "test-example/in/inside"; @@ -35,6 +24,17 @@ vpn-data { }; }; }; + out { + outside { + name "test-example/out/outside"; + key rsa-public("65537","129251483458784900555621175262818292872587807329014927540074484804119474262261383244074013537736576331652560727149001626325243856012659665194546933097292703586821422085819615124517093786704646988649444946154384037948502112302285511195679291084694375811092516151263088200304199780052361048758446082354317801941"); + address "[::1]"; port 16900; + link netlink { + routes "172.18.232.0/29"; + ptp-address "172.18.232.1"; + }; + }; + }; }; }; vpn { -- 2.30.2