From patchwork Tue May 24 01:20:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Stringer X-Patchwork-Id: 625456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rDHfh2pl2z9sdQ for ; Tue, 24 May 2016 11:21:00 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 222BB108F9; Mon, 23 May 2016 18:20:55 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 38805108DA for ; Mon, 23 May 2016 18:20:54 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id B88024204D8 for ; Mon, 23 May 2016 19:20:53 -0600 (MDT) X-ASG-Debug-ID: 1464052853-09eadd02f1582570001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar5.cudamail.com with ESMTP id EtraICoGVrBtJY2w (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 23 May 2016 19:20:53 -0600 (MDT) X-Barracuda-Envelope-From: joe@ovn.org X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO relay6-d.mail.gandi.net) (217.70.183.198) by mx3-pf1.cudamail.com with ESMTPS (DHE-RSA-AES256-SHA encrypted); 24 May 2016 01:20:53 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at ovn.org designates 217.70.183.198 as permitted sender) X-Barracuda-Apparent-Source-IP: 217.70.183.198 X-Barracuda-RBL-IP: 217.70.183.198 Received: from mfilter42-d.gandi.net (mfilter42-d.gandi.net [217.70.178.172]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id B92C6FB8A4 for ; Tue, 24 May 2016 03:20:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter42-d.gandi.net Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter42-d.gandi.net (mfilter42-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id MLFUICSIOWhu for ; Tue, 24 May 2016 03:20:50 +0200 (CEST) X-Originating-IP: 208.91.1.34 Received: from archer.eng.vmware.com (unknown [208.91.1.34]) (Authenticated sender: joe@ovn.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id B30A6FB883 for ; Tue, 24 May 2016 03:20:49 +0200 (CEST) X-CudaMail-Envelope-Sender: joe@ovn.org From: Joe Stringer To: dev@openvswitch.org X-CudaMail-Whitelist-To: dev@openvswitch.org X-CudaMail-MID: CM-V1-522048039 X-CudaMail-DTE: 052316 X-CudaMail-Originating-IP: 217.70.183.198 Date: Mon, 23 May 2016 18:20:26 -0700 X-ASG-Orig-Subj: [##CM-V1-522048039##][PATCH 1/6] xenserver: Sort vsctl port options. Message-Id: <1464052831-17278-2-git-send-email-joe@ovn.org> X-Mailer: git-send-email 2.8.2 In-Reply-To: <1464052831-17278-1-git-send-email-joe@ovn.org> References: <1464052831-17278-1-git-send-email-joe@ovn.org> X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1464052853 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-ASG-Whitelist: Header =?UTF-8?B?eFwtY3VkYW1haWxcLXdoaXRlbGlzdFwtdG8=?= X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 Subject: [ovs-dev] [PATCH 1/6] xenserver: Sort vsctl port options. X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dev-bounces@openvswitch.org Sender: "dev" In python3, dictionaries are less likely to be sorted consistently from one run to the next, so sort port options when outputting to provide reliable test results. Signed-off-by: Joe Stringer Acked-by: Ben Pfaff --- tests/interface-reconfigure.at | 4 ++-- xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/interface-reconfigure.at b/tests/interface-reconfigure.at index 668f63d2b9b4..bb3756be2f82 100644 --- a/tests/interface-reconfigure.at +++ b/tests/interface-reconfigure.at @@ -890,7 +890,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi1 configuration --may-exist add-br xapi1 --with-iface --if-exists del-port bond0 --fake-iface add-bond xapi1 bond0 eth0 eth1 - set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb + set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af" set Bridge xapi1 fail_mode=secure remove Bridge xapi1 other_config disable-in-band @@ -980,7 +980,7 @@ Applying changes to /etc/sysconfig/network-scripts/ifcfg-xapi2 configuration --may-exist add-br xapi1 --with-iface --if-exists del-port bond0 --fake-iface add-bond xapi1 bond0 eth0 eth1 - set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb + set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af" set Bridge xapi1 fail_mode=secure remove Bridge xapi1 other_config disable-in-band diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index 1379fb462119..30fc176694a9 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -206,7 +206,7 @@ def datapath_configure_bond(pif,slaves): argv += ['--', 'set', 'Port', interface] if pifrec['MAC'] != "": argv += ['MAC=%s' % vsctl_escape(pifrec['MAC'])] - for (name,val) in bond_options.items(): + for (name,val) in sorted(bond_options.items()): if name in ['updelay', 'downdelay']: # updelay and downdelay have dedicated schema columns. # The value must be a nonnegative integer.