[WIP] ONOS-8091 Port python script and utilities to python3
Steps performed so far:
- Updated bash scripts and similar to explicitly invoke python3 (instead of python)
- Updated all python scripts using 2to3
Testing these changes will be a major headache because:
- different scripts are executed in different environments
(e.g., Jenkins, cell servers, tutorial VMs, etc.)
- we don’t have control on all environments
- some environments we used to control have been dismissed
(e.g., cell servers)
The approach for now is to focus on the essentials:
- Jenkins jobs for pre-merge and release
Test and fix everything else as the need arises.
Change-Id: I943e214760c9dea9a7ded0d47ef08adbc0ed0bec
diff --git a/tools/test/topos/opticalTest.py b/tools/test/topos/opticalTest.py
index 8e316fa..2f94747 100755
--- a/tools/test/topos/opticalTest.py
+++ b/tools/test/topos/opticalTest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from opticalUtils import MininetOE, LINCSwitch, LINCLink
from mininet.topo import Topo
@@ -86,8 +86,8 @@
if len( sys.argv ) >= 2:
controllers = sys.argv[1:]
else:
- print 'Usage:sudo -E python opticalTest.py (<Controller IP>)+'
- print 'Using localhost...\n'
+ print('Usage:sudo -E python3 opticalTest.py (<Controller IP>)+')
+ print('Using localhost...\n')
controllers = [ '127.0.0.1' ]
setLogLevel( 'info' )