Voltha container mode support in cord-tester.
  Its disabled till voltha rest interface is updated from chameleon as chameleon is broken in container mode

Change-Id: I38044e02350e5026c767a0d6c329aa807590fa37
diff --git a/src/test/utils/CordTestConfig.py b/src/test/utils/CordTestConfig.py
index 0d14239..f82be0e 100644
--- a/src/test/utils/CordTestConfig.py
+++ b/src/test/utils/CordTestConfig.py
@@ -22,7 +22,7 @@
 from nose.plugins import Plugin
 from CordTestUtils import log_test as log
 from CordTestUtils import running_on_pod
-from VolthaCtrl import voltha_setup, voltha_teardown
+from VolthaCtrl import voltha_setup, voltha_teardown, VolthaService
 from SSHTestAgent import SSHTestAgent
 log.setLevel('INFO')
 
@@ -91,7 +91,8 @@
                 setattr(class_test, k, v)
 
     #check for voltha and configure as appropriate
-    voltha_attrs = dict(host='172.17.0.1',
+    voltha_attrs = dict(host = VolthaService.DOCKER_HOST_IP,
+                        ponsim_host = VolthaService.PONSIM_HOST,
                         rest_port = 8881,
                         config_fake = False,
                         olt_type = 'ponsim_olt',
@@ -105,6 +106,13 @@
     if hasattr(class_test, 'VOLTHA_AUTO_CONFIGURE'):
         voltha_configure = getattr(class_test, 'VOLTHA_AUTO_CONFIGURE')
 
+    if hasattr(class_test, 'VOLTHA_HOST'):
+        #update the voltha host ip based on chameleon IP for rest interface
+        rest_interface = VolthaService.get_ip('chameleon')
+        if rest_interface:
+            log.info('Updating VOLTHA_HOST IP to %s' %rest_interface)
+            setattr(class_test, 'VOLTHA_HOST', rest_interface)
+
     if voltha_enabled and voltha_configure:
         for k,v in voltha_attrs.iteritems():
             voltha_attr = 'VOLTHA_{}'.format(k.upper())