Support to run the vsg external connectivity test when on CiaB.
It uses the reserved one when on CiaB and unreserved one when on physical pod.
When on a physical pod, the xos subscriber needs to be created for s_tags in olt_config.json
(304 S-TAGS)
On pod variable includes currently both CiaB and real pod.

Change-Id: I604bdca32dfbfbe251f018c6b0391d4b5ac8ea86
diff --git a/src/test/utils/CordTestConfig.py b/src/test/utils/CordTestConfig.py
index 45527b6..7aca5cb 100644
--- a/src/test/utils/CordTestConfig.py
+++ b/src/test/utils/CordTestConfig.py
@@ -5,7 +5,8 @@
 from nose.tools import assert_not_equal
 from nose.plugins import Plugin
 from CordTestUtils import log_test as log
-
+from CordTestUtils import running_on_pod
+from SSHTestAgent import SSHTestAgent
 log.setLevel('INFO')
 
 class CordTestConfigRestore(Plugin):
@@ -67,3 +68,23 @@
             json_data = json.load(f)
             for k, v in json_data.iteritems():
                 setattr(class_test, k, v)
+
+def running_on_ciab():
+    if running_on_pod() is False:
+        return False
+    head_node = os.getenv('HEAD_NODE', 'prod')
+    HEAD_NODE = head_node + '.cord.lab' if len(head_node.split('.')) == 1 else head_node
+    agent = SSHTestAgent(host = HEAD_NODE, user = 'ubuntu', password = 'ubuntu')
+    #see if user ubuntu works
+    st, output = agent.run_cmd('sudo virsh list')
+    if st is False and output is not None:
+        #we are on real pod
+        return False
+
+    #try vagrant
+    agent = SSHTestAgent(host = HEAD_NODE, user = 'vagrant', password = 'vagrant')
+    st, output = agent.run_cmd('sudo virsh list')
+    if st is True and output is not None:
+        return True
+
+    return False
diff --git a/src/test/utils/CordTestUtils.py b/src/test/utils/CordTestUtils.py
index 35c6d0d..6d46c16 100644
--- a/src/test/utils/CordTestUtils.py
+++ b/src/test/utils/CordTestUtils.py
@@ -61,6 +61,6 @@
     controllers = get_controllers()
     return controllers[0]
 
-def running_on_podd():
+def running_on_pod():
     """If we are running on Ciab or inside a physical podd, key file would be set"""
     return True if os.environ.get('SSH_KEY_FILE', None) else False