changed core to allow use of OC variables in topo files
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index 7199280..9c2ebba 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -32,6 +32,7 @@
import new
import xmldict
import importlib
+import os
module = new.module("test")
import openspeak
global path, drivers_path, core_path, tests_path,logs_path
@@ -164,11 +165,15 @@
driverClass = getattr(driverModule, driverName)
driverObject = driverClass()
+ if "OC" in self.componentDictionary[component]['host']:
+ self.componentDictionary[component]['host'] = os.environ[str( self.componentDictionary[component]['host'])]
+
connect_result = driverObject.connect(user_name = self.componentDictionary[component]['user'] if ('user' in self.componentDictionary[component].keys()) else getpass.getuser(),
ip_address= self.componentDictionary[component]['host'] if ('host' in self.componentDictionary[component].keys()) else 'localhost',
pwd = self.componentDictionary[component]['password'] if ('password' in self.componentDictionary[component].keys()) else 'changeme',
port = self.componentDictionary[component]['port'] if ('port' in self.componentDictionary[component].keys()) else None,
options = driver_options)
+
if not connect_result:
self.log.error("Exiting form the test execution because the connecting to the "+component+" component failed.")
self.exit()
diff --git a/TestON/tests/FuncIntent/FuncIntent.topo b/TestON/tests/FuncIntent/FuncIntent.topo
index d92bb7a..1d14c22 100755
--- a/TestON/tests/FuncIntent/FuncIntent.topo
+++ b/TestON/tests/FuncIntent/FuncIntent.topo
@@ -2,18 +2,18 @@
<COMPONENT>
<ONOSbench>
- <host>10.128.10.20</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosDriver</type>
<connect_order>1</connect_order>
<COMPONENTS>
- <home>~/ONOS</home>
+ <home>~/onos</home>
</COMPONENTS>
</ONOSbench>
<ONOScli1>
- <host>10.128.10.20</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -22,7 +22,7 @@
</ONOScli1>
<ONOScli2>
- <host>10.128.10.20</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>
@@ -31,7 +31,7 @@
</ONOScli2>
<ONOScli3>
- <host>10.128.10.20</host>
+ <host>OCN</host>
<user>admin</user>
<password>onos_test</password>
<type>OnosCliDriver</type>