Fixing opticalUtils.py

- Added ectest.py used by test scenario
  originally from https://github.com/akoshibe/ecord-topos/blob/master/ectest.py
- Fixed issues found in opticalUtils.py

Change-Id: I100f5d6bab467fe60af24cf88817dba0911a9916
diff --git a/tools/test/topos/opticalUtils.py b/tools/test/topos/opticalUtils.py
index a4b0696..6730b80 100644
--- a/tools/test/topos/opticalUtils.py
+++ b/tools/test/topos/opticalUtils.py
@@ -263,7 +263,7 @@
     ### sys.config path ###
     sysConfig = "/home/{}/linc-oe/rel/linc/releases/1.0/sys.config".format(user)
     ### dict of containing dpids as key and corresponding LINC switchId as values ###
-    dpidsToLINCSwitchId = dpids_to_ids.__func__(sysConfig)
+    dpidsToLINCSwitchId = dpids_to_ids(sysConfig)
     
     ### ONOS Directory ###
     try:
@@ -286,11 +286,11 @@
         os.environ[ 'ONOS_WEB_USER' ] = restUser
         os.environ[ 'ONOS_WEB_PASS' ] = restPass
     ### LINC-directory
-    lincDir = findDir.__func__('linc-oe', user)
+    lincDir = findDir('linc-oe', user)
     if not lincDir:
         error("***ERROR: Could not find linc-oe in user's home directory\n")
     ### LINC config generator directory###
-    configGen = findDir.__func__('LINC-config-generator', user)
+    configGen = findDir('LINC-config-generator', user)
     if not configGen:
         error("***ERROR: Could not find LINC-config-generator in user's home directory\n")
     # list of all the controllers
@@ -490,7 +490,7 @@
 
         topoConfigJson = {}
 
-        topoConfigJson["switchConfig"] = LINCSwitch.getSwitchConfig(net.switches)
+        topoConfigJson["switchConfig"] = getSwitchConfig(net.switches)
         topoConfigJson["linkConfig"] = getLinkConfig(net.links)
 
         #Writing to TopoConfig.json