summaryrefslogtreecommitdiffstats
path: root/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2017-06-20 16:25:54 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2017-06-21 14:25:14 -0400
commite86ae39489f1c17405d557f9204747594af29e6a (patch)
tree19896072691430242d237adbb7cf64bdeff5cbd1 /recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
parentb263370eebd1df8befb9533da53c5ff8439607cc (diff)
downloadmeta-virtualization-e86ae39489f1c17405d557f9204747594af29e6a.tar.gz
openvswitch: switch to depending on python3
As far as I can tell openvswitch has been updated to work with python3 as well as with python(2). Switch to depend on python3 and use python3 for associated scripts. For the most part openvswitch will bind at runtime to either py2 or py3 regardless of these changes, with these changes we just do a better job of setting up the dependencies to facilitate py3 bindings. The openvswitch autotests results are mostly identical before and after this switch (failures move from python3 to python(2) test cases as expected, with some exceptions see below). When running the autotests/ptest with python(2) vs python3 we see a slightly higher failure rate (334 failures vs. 284 failures). I do not believe this higher fail rate reflects actual errors in the runtime, rather the tests are not adapted to python3. At any rate like the rest of openvswitch it is fairly straightforward to hack the logic for autotests to be run using py2 as long as it is available in the image, so these changes don't prevent falling back to py2 for autotests. This should facilitate any debugging we need to do based on us switching to favor py3. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch')
-rw-r--r--recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch113
1 files changed, 113 insertions, 0 deletions
diff --git a/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch b/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
new file mode 100644
index 00000000..a02b2a40
--- /dev/null
+++ b/recipes-networking/openvswitch/files/python-switch-remaining-scripts-to-use-python3.patch
@@ -0,0 +1,113 @@
1From 176528ca3a8b76c9d0bb71b1e56eeebccc655c71 Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Wed, 3 May 2017 10:39:12 -0400
4Subject: [PATCH] python: switch remaining scripts to use python3
5
6Work to remove the main openvswitch package's dependency on python 2.
7
8Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
9---
10 ofproto/ipfix-gen-entities | 2 +-
11 tests/test-l7.py | 2 +-
12 utilities/checkpatch.py | 2 +-
13 utilities/ovs-dev.py | 2 +-
14 utilities/ovs-pipegen.py | 2 +-
15 vtep/ovs-vtep | 2 +-
16 xenserver/etc_xapi.d_plugins_openvswitch-cfg-update | 2 +-
17 xenserver/opt_xensource_libexec_interface-reconfigure | 2 +-
18 xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync | 2 +-
19 9 files changed, 9 insertions(+), 9 deletions(-)
20
21diff --git a/ofproto/ipfix-gen-entities b/ofproto/ipfix-gen-entities
22index 0be7199..d2cce42 100755
23--- a/ofproto/ipfix-gen-entities
24+++ b/ofproto/ipfix-gen-entities
25@@ -1,4 +1,4 @@
26-#! /usr/bin/env python
27+#! /usr/bin/env python3
28 #
29 # Copyright (C) 2012 Nicira, Inc.
30 #
31diff --git a/tests/test-l7.py b/tests/test-l7.py
32index d7854a1..f09defb 100755
33--- a/tests/test-l7.py
34+++ b/tests/test-l7.py
35@@ -1,4 +1,4 @@
36-#!/usr/bin/env python
37+#!/usr/bin/env python3
38 # Copyright (c) 2015, 2016 Nicira, Inc.
39 #
40 # Licensed under the Apache License, Version 2.0 (the "License");
41diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
42index 26eb5c3..2e1932b 100755
43--- a/utilities/checkpatch.py
44+++ b/utilities/checkpatch.py
45@@ -1,4 +1,4 @@
46-#!/usr/bin/env python
47+#!/usr/bin/env python3
48 # Copyright (c) 2016 Red Hat, Inc.
49 #
50 # Licensed under the Apache License, Version 2.0 (the "License");
51diff --git a/utilities/ovs-dev.py b/utilities/ovs-dev.py
52index 9ce0f04..839e13e 100755
53--- a/utilities/ovs-dev.py
54+++ b/utilities/ovs-dev.py
55@@ -1,4 +1,4 @@
56-#!/usr/bin/env python
57+#!/usr/bin/env python3
58 # Copyright (c) 2013, 2014, 2015, 2016 Nicira, Inc.
59 #
60 # Licensed under the Apache License, Version 2.0 (the "License");
61diff --git a/utilities/ovs-pipegen.py b/utilities/ovs-pipegen.py
62index 4bf240f..2a8f13e 100755
63--- a/utilities/ovs-pipegen.py
64+++ b/utilities/ovs-pipegen.py
65@@ -1,4 +1,4 @@
66-#! /usr/bin/env python
67+#! /usr/bin/env python3
68 # Copyright (c) 2013, 2014, 2015 Nicira, Inc.
69 #
70 # Licensed under the Apache License, Version 2.0 (the "License");
71diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
72index fd652d4..19d63f9 100755
73--- a/vtep/ovs-vtep
74+++ b/vtep/ovs-vtep
75@@ -1,4 +1,4 @@
76-#! /usr/bin/env python
77+#! /usr/bin/env python3
78 # Copyright (C) 2013 Nicira, Inc. All Rights Reserved.
79 #
80 # Licensed under the Apache License, Version 2.0 (the "License");
81diff --git a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
82index e7404e3..5edad76 100755
83--- a/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
84+++ b/xenserver/etc_xapi.d_plugins_openvswitch-cfg-update
85@@ -1,4 +1,4 @@
86-#!/usr/bin/env python
87+#!/usr/bin/env python3
88 #
89 # xapi plugin script to update the cache of configuration items in the
90 # ovs-vswitchd configuration that are managed in the xapi database when
91diff --git a/xenserver/opt_xensource_libexec_interface-reconfigure b/xenserver/opt_xensource_libexec_interface-reconfigure
92index ea4a742..c6745ee 100755
93--- a/xenserver/opt_xensource_libexec_interface-reconfigure
94+++ b/xenserver/opt_xensource_libexec_interface-reconfigure
95@@ -1,4 +1,4 @@
96-#!/usr/bin/env python
97+#!/usr/bin/env python3
98 #
99 # Copyright (c) 2008,2009 Citrix Systems, Inc.
100 #
101diff --git a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
102index a776c00..d5ff8af 100755
103--- a/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
104+++ b/xenserver/usr_share_openvswitch_scripts_ovs-xapi-sync
105@@ -1,4 +1,4 @@
106-#! /usr/bin/env python
107+#! /usr/bin/env python3
108 # Copyright (c) 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
109 #
110 # Licensed under the Apache License, Version 2.0 (the "License");
111--
1122.7.4
113