[ONOS-7039] [ONOS-7044] Fix PEP8 Warnings in TestON

Change-Id: Ied79ff9caff5487a6df50466307f757468d7ca3a
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
index b1f44e1..17d4df8 100644
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Nbdata.py
@@ -1,5 +1,5 @@
 """
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +8,7 @@
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +18,6 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
 "**** Scripted by Antony Silvester ****** "
 import json
 from urllib import addbase
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py
old mode 100755
new mode 100644
index d747a5a..37adcf8
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Deletion_Node.py
@@ -1,5 +1,6 @@
+# !/usr/bin/python           # This is server.py file
 """
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +9,7 @@
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +19,6 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
-#!/usr/bin/python           # This is server.py file
 from scapy.all import *
 import socket               # Import socket module
 import time                 # Import Time module
@@ -27,47 +26,46 @@
 import os
 
 path = os.getcwd()
-sys.path.append('OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies')   #Setting the path for BgpLS
+sys.path.append( 'OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies' )  # Setting the path for BgpLS
 from Nbdata import BgpLs
 
 obj = BgpLs()
 returnlist = obj.Constants()
-peerIp = returnlist[0][0]
+peerIp = returnlist[ 0 ][ 0 ]
 
-load_contrib('bgp')
+load_contrib( 'bgp' )
 s = socket.socket()         # Create a socket object
-host = peerIp # Get local machine name
+host = peerIp  # Get local machine name
 port = 179                # Reserve a port for your service.
-s.bind((host, port))        # Bind to the port
-pkts = rdpcap(path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls.pcap")
-time.sleep(15)
-pkts[759][BGPOpen].bgp_id = peerIp
+s.bind( ( host, port ) )        # Bind to the port
+pkts = rdpcap( path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls.pcap" )
+time.sleep( 15 )
+pkts[ 759 ][ BGPOpen ].bgp_id = peerIp
 
-s.listen(5)                   # Now wait for client connection.
+s.listen( 5 )                   # Now wait for client connection.
 
-print("starting Connecting to ONOS peer")
+print( "starting Connecting to ONOS peer" )
 c, addr = s.accept()     # Establish connection with client.
 print 'Got connection from ONOS :', addr
-c.send(str(pkts[759][BGPHeader])) # OPEN MESSAGE
-c.recv(4096)
-c.send(str(pkts[765][BGPHeader]))# KEEPALIVE MESSAGE
-c.recv(4096)
-c.send(str(pkts[768][BGPHeader]))   # UPDATE MESSAGES
-c.send(str(pkts[771][BGPHeader]))
-c.send(str(pkts[773][BGPHeader]))
-c.send(str(pkts[775][BGPHeader]))
-c.send(str(pkts[778][BGPHeader]))
-c.send(str(pkts[765][BGPHeader]))
+c.send( str( pkts[ 759 ][ BGPHeader ] ) )  # OPEN MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 765 ][ BGPHeader ] ) )  # KEEPALIVE MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 768 ][ BGPHeader ] ) )   # UPDATE MESSAGES
+c.send( str( pkts[ 771 ][ BGPHeader ] ) )
+c.send( str( pkts[ 773 ][ BGPHeader ] ) )
+c.send( str( pkts[ 775 ][ BGPHeader ] ) )
+c.send( str( pkts[ 778 ][ BGPHeader ] ) )
+c.send( str( pkts[ 765 ][ BGPHeader ] ) )
 
-time.sleep(15)
-c.send(str(pkts[1168][BGPHeader]))
-c.send(str(pkts[1250][BGPHeader]))
-c.send(str(pkts[1354][BGPHeader]))
-print ("Node Delete msg sent")
+time.sleep( 15 )
+c.send( str( pkts[ 1168 ][ BGPHeader ] ) )
+c.send( str( pkts[ 1250 ][ BGPHeader ] ) )
+c.send( str( pkts[ 1354 ][ BGPHeader ] ) )
+print ( "Node Delete msg sent" )
 
 
 while True:
-    c.recv(4096)
-    c.send(str(pkts[765][BGPHeader]))
-
-  # c.close()                # Close the connection
+    c.recv( 4096 )
+    c.send( str( pkts[ 765 ][ BGPHeader ] ) )
+    # c.close()   # Close the connection
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Link_Update_Node.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Link_Update_Node.py
old mode 100755
new mode 100644
index 15c5757..4bf1187
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Link_Update_Node.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Link_Update_Node.py
@@ -1,5 +1,6 @@
+# !/usr/bin/python           # This is server.py file
 """
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +9,7 @@
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +19,6 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
-#!/usr/bin/python           # This is server.py file
 from scapy.all import *
 import socket               # Import socket module
 import time                 # Import Time module
@@ -27,40 +26,39 @@
 import os
 
 path = os.getcwd()
-sys.path.append('OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies')   #Setting the path for BgpLS
+sys.path.append( 'OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies' )  # Setting the path for BgpLS
 from Nbdata import BgpLs
 
 obj = BgpLs()
 returnlist = obj.Constants()
-peerIp = returnlist[0][0]
+peerIp = returnlist[ 0 ][ 0 ]
 
-load_contrib('bgp')
+load_contrib( 'bgp' )
 s = socket.socket()         # Create a socket object
-host = peerIp # Get local machine name
+host = peerIp  # Get local machine name
 port = 179                # Reserve a port for your service.
-s.bind((host, port))        # Bind to the port
-pkts = rdpcap(path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls.pcap")
-time.sleep(15)
-pkts[759][BGPOpen].bgp_id = peerIp
+s.bind( ( host, port ) )        # Bind to the port
+pkts = rdpcap( path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls.pcap" )
+time.sleep( 15 )
+pkts[ 759 ][ BGPOpen ].bgp_id = peerIp
 
-s.listen(5)                   # Now wait for client connection.
+s.listen( 5 )                   # Now wait for client connection.
 
-print("starting Connecting to ONOS peer")
+print( "starting Connecting to ONOS peer" )
 c, addr = s.accept()     # Establish connection with client.
 print 'Got connection from ONOS :', addr
-c.send(str(pkts[759][BGPHeader])) # OPEN MESSAGE
-c.recv(4096)
-c.send(str(pkts[765][BGPHeader]))# KEEPALIVE MESSAGE
-c.recv(4096)
-c.send(str(pkts[768][BGPHeader]))   # UPDATE MESSAGES
-c.send(str(pkts[771][BGPHeader]))
-c.send(str(pkts[773][BGPHeader]))
-c.send(str(pkts[775][BGPHeader]))
-c.send(str(pkts[778][BGPHeader]))
-c.send(str(pkts[765][BGPHeader]))
+c.send( str( pkts[ 759 ][ BGPHeader ] ) )  # OPEN MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 765 ][ BGPHeader ] ) )  # KEEPALIVE MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 768 ][ BGPHeader ] ) )   # UPDATE MESSAGES
+c.send( str( pkts[ 771 ][ BGPHeader ] ) )
+c.send( str( pkts[ 773 ][ BGPHeader ] ) )
+c.send( str( pkts[ 775 ][ BGPHeader ] ) )
+c.send( str( pkts[ 778 ][ BGPHeader ] ) )
+c.send( str( pkts[ 765 ][ BGPHeader ] ) )
 
 while True:
-    c.recv(4096)
-    c.send(str(pkts[765][BGPHeader]))
-
-  # c.close()                # Close the connection
+    c.recv( 4096 )
+    c.send( str( pkts[ 765 ][ BGPHeader ] ) )
+    # c.close()                # Close the connection
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Topo_discovery.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Topo_discovery.py
old mode 100755
new mode 100644
index 332a0ef..183388f
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Topo_discovery.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Topo_discovery.py
@@ -1,5 +1,6 @@
+#!/usr/bin/python           # This is server.py file
 """
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +9,7 @@
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +19,6 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
-#!/usr/bin/python           # This is server.py file
 from scapy.all import *
 import socket               # Import socket module
 import time                 # Import Time module
@@ -27,36 +26,35 @@
 import os
 
 path = os.getcwd()
-sys.path.append('OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies')   #Setting the path for BgpLS
+sys.path.append( 'OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies' )  # Setting the path for BgpLS
 from Nbdata import BgpLs
 
 obj = BgpLs()
 returnlist = obj.Constants()
-peerIp = returnlist[0][0]
+peerIp = returnlist[ 0 ][ 0 ]
 
-load_contrib('bgp')
+load_contrib( 'bgp' )
 s = socket.socket()         # Create a socket object
-host = peerIp # Get local machine name
+host = peerIp  # Get local machine name
 port = 179                # Reserve a port for your service.
-s.bind((host, port))        # Bind to the port
-pkts = rdpcap(path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls_all.pcap")
-pkts[69][BGPOpen].bgp_id = peerIp
+s.bind( ( host, port ) )        # Bind to the port
+pkts = rdpcap( path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls_all.pcap" )
+pkts[ 69 ][ BGPOpen ].bgp_id = peerIp
 
-s.listen(5)                 # Now wait for client connection.
+s.listen( 5 )                 # Now wait for client connection.
 
-print("starting Connecting to ONOS peer")
+print( "starting Connecting to ONOS peer" )
 c, addr = s.accept()     # Establish connection with client.
 print 'Got connection from ONOS :', addr
-c.send(str(pkts[69][BGPHeader])) # OPEN MESSAGE
-c.recv(4096)
-c.send(str(pkts[71][BGPHeader]))# KEEPALIVE MESSAGE
-c.recv(4096)
-c.send(str(pkts[72][BGPHeader]))   # UPDATE MESSAGES
-c.send(str(pkts[74][BGPHeader]))
-c.send(str(pkts[71][BGPHeader]))
+c.send( str( pkts[ 69 ][ BGPHeader ] ) )  # OPEN MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 71 ][ BGPHeader ] ) )  # KEEPALIVE MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 72 ][ BGPHeader ] ) )   # UPDATE MESSAGES
+c.send( str( pkts[ 74 ][ BGPHeader ] ) )
+c.send( str( pkts[ 71 ][ BGPHeader ] ) )
 
 while True:
-    c.recv(4096)
-    c.send(str(pkts[71][BGPHeader]))
-
-  # c.close()                # Close the connection
+    c.recv( 4096 )
+    c.send( str( pkts[ 71 ][ BGPHeader ] ) )
+    # c.close()                # Close the connection
diff --git a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Update_Node.py b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Update_Node.py
old mode 100755
new mode 100644
index 7feed1b..919898d
--- a/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Update_Node.py
+++ b/TestON/tests/FUNC/FUNCbgpls/dependencies/Scapyfiles/Update_Node.py
@@ -1,5 +1,6 @@
+#!/usr/bin/python           # This is server.py file
 """
-Copyright 2016 Open Networking Foundation (ONF)
+Copyright 2016 Open Networking Foundation ( ONF )
 
 Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
 the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
@@ -8,7 +9,7 @@
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
     the Free Software Foundation, either version 2 of the License, or
-    (at your option) any later version.
+    ( at your option ) any later version.
 
     TestON is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,8 +19,6 @@
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
-
-#!/usr/bin/python           # This is server.py file
 from scapy.all import *
 import socket               # Import socket module
 import time                 # Import Time module
@@ -27,43 +26,42 @@
 import os
 
 path = os.getcwd()
-sys.path.append('OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies')   #Setting the path for BgpLS
+sys.path.append( 'OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies' )  # Setting the path for BgpLS
 from Nbdata import BgpLs
 
 obj = BgpLs()
 returnlist = obj.Constants()
-peerIp = returnlist[0][0]
+peerIp = returnlist[ 0 ][ 0 ]
 
-load_contrib('bgp')
+load_contrib( 'bgp' )
 s = socket.socket()         # Create a socket object
-host = peerIp # Get local machine name
+host = peerIp  # Get local machine name
 port = 179                # Reserve a port for your service.
-s.bind((host, port))        # Bind to the port
-pkts = rdpcap(path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls_all.pcap")
-pkts[69][BGPOpen].bgp_id = peerIp
+s.bind( ( host, port ) )        # Bind to the port
+pkts = rdpcap( path + "/OnosSystemTest/TestON/tests/FUNC/FUNCbgpls/dependencies/Bgpls_packets/bgpls_all.pcap" )
+pkts[ 69 ][ BGPOpen ].bgp_id = peerIp
 
-s.listen(5)                 # Now wait for client connection.
+s.listen( 5 )                 # Now wait for client connection.
 
-print("starting Connecting to ONOS peer")
+print( "starting Connecting to ONOS peer" )
 c, addr = s.accept()     # Establish connection with client.
 print 'Got connection from ONOS :', addr
-c.send(str(pkts[69][BGPHeader])) # OPEN MESSAGE
-c.recv(4096)
-c.send(str(pkts[71][BGPHeader]))# KEEPALIVE MESSAGE
-c.recv(4096)
-c.send(str(pkts[72][BGPHeader]))   # UPDATE MESSAGES
-c.send(str(pkts[74][BGPHeader]))
-c.send(str(pkts[71][BGPHeader]))
+c.send( str( pkts[ 69 ][ BGPHeader ] ) )  # OPEN MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 71 ][ BGPHeader ] ) )  # KEEPALIVE MESSAGE
+c.recv( 4096 )
+c.send( str( pkts[ 72 ][ BGPHeader ] ) )   # UPDATE MESSAGES
+c.send( str( pkts[ 74 ][ BGPHeader ] ) )
+c.send( str( pkts[ 71 ][ BGPHeader ] ) )
 
-time.sleep(10)               # Waiting for 120 seconds for update message.
+time.sleep( 10 )               # Waiting for 120 seconds for update message.
 
-c.send(str(pkts[298][BGPHeader]))
-c.send(str(pkts[860][BGPHeader]))   # UPDATE MESSAGES with new node
-c.send(str(pkts[865][BGPHeader]))
-print ("New Node update msg sent")
+c.send( str( pkts[ 298 ][ BGPHeader ] ) )
+c.send( str( pkts[ 860 ][ BGPHeader ] ) )   # UPDATE MESSAGES with new node
+c.send( str( pkts[ 865 ][ BGPHeader ] ) )
+print ( "New Node update msg sent" )
 
 while True:
-    c.recv(4096)
-    c.send(str(pkts[71][BGPHeader]))
-
-  # c.close()                # Close the connection
+    c.recv( 4096 )
+    c.send( str( pkts[ 71 ][ BGPHeader ] ) )
+    # c.close()                # Close the connection