Copying openrc from controller node, adding to global config and external ip to config yaml added.
diff --git a/config.yaml b/config.yaml
index 1715dfa..5e226e0 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,7 +1,7 @@
 clouds:
      fuel:
-         id: 3
          url: http://172.16.52.112:8000
+         ext_ip: 172.16.53.3
          creds: admin:admin@admin
          ssh_creds: root:test37
          openstack_env: test
@@ -62,27 +62,12 @@
                  network_zone_name: novanetwork
                  flt_ip_pool: nova
                  creds: "ssh://ubuntu@{0}::disk_io_perf.pem"
-         internal_tests:
+         tests:
              - pgbench:
                   opts:
                       num_clients: [4, 8, 12]
                       transactions: [1, 2, 3]
 
-      with_test_nodes:
-         openstack:
-             vm_params:
-                 count: x1
-                 img_name: disk_io_perf
-                 flavor_name: disk_io_perf.256
-                 keypair_name: disk_io_perf
-                 network_zone_name: novanetwork
-                 flt_ip_pool: nova
-                 creds: "ssh://ubuntu@{0}::disk_io_perf.pem"
-         internal_tests:
-             - pgbench:
-                  opts:
-                      num_clients: [4, 8, 12]
-                      transactions: [1, 2, 3]
 #     - io: tests/io_task_test.cfg
 
 #             # - vm_count: 
@@ -96,9 +81,9 @@
 # #     - mos-linux-http://172.12.33.45
 # #     - bson, /tmp/myrun.bson
 
-# paths:
-#     basedir: "/home/gstepanov/rally-results-processor"
-#     TEST_PATH: "/home/gstepanov/rally-results-processor/test_results"
-#     CHARTS_IMG_PATH: "static/images"
-#     SQLALCHEMY_MIGRATE_REPO: "/home/gstepanov/rally-results-processor/db_repository"
-#     DATABASE_URI: 'sqlite:////home/gstepanov/rally-results-processor/app.db?check_same_thread=False'
+paths:
+     basedir: "/home/gstepanov/rally-results-processor"
+     TEST_PATH: "/home/gstepanov/rally-results-processor/test_results"
+     CHARTS_IMG_PATH: "static/images"
+     SQLALCHEMY_MIGRATE_REPO: "/home/gstepanov/rally-results-processor/db_repository"
+     DATABASE_URI: 'sqlite:////home/gstepanov/rally-results-processor/app.db?check_same_thread=False'
diff --git a/run_test.py b/run_test.py
index 3f078c2..1d58ede 100755
--- a/run_test.py
+++ b/run_test.py
@@ -104,7 +104,7 @@
     res_q = Queue.Queue()
 
     for test in config['tests']:
-        for test in config['tests'][test]['internal_tests']:
+        for test in config['tests'][test]['tests']:
             for name, params in test.items():
                 logger.info("Starting {0} tests".format(name))
 
diff --git a/scripts/connector.py b/scripts/connector.py
index 0bbf447..28a4a40 100644
--- a/scripts/connector.py
+++ b/scripts/connector.py
@@ -1,4 +1,7 @@
 import argparse
+import logging
+import re
+import string
 import sys
 import tempfile
 import os
@@ -6,24 +9,63 @@
 
 from urlparse import urlparse
 from nodes.node import Node
+from ssh_utils import ssh_connect, ssh_copy_file, connect
 from utils import parse_creds
-from keystone import KeystoneAuth
-
-
-from keystone import KeystoneAuth
+from fuel_rest_api import KeystoneAuth
 
 tmp_file = tempfile.NamedTemporaryFile().name
+openrc_path = tempfile.NamedTemporaryFile().name
+logger = logging.getLogger("io-perf-tool")
 
 
-def discover_fuel_nodes(fuel_url, creds, cluster_id):
+def get_cluster_id(cluster_name, conn):
+    clusters = conn.do("get", path="/api/clusters")
+    for cluster in clusters:
+        if cluster['name'] == cluster_name:
+            return cluster['id']
+
+
+def get_openrc_data(file_name):
+    openrc_dict = {}
+
+    with open(file_name) as f:
+        for line in f.readlines():
+            if len(line.split(" ")) > 1:
+                line = line.split(' ')[1]
+                key, value = line.split('=')
+
+                if key in ['OS_AUTH_URL', 'OS_PASSWORD',
+                              'OS_TENANT_NAME', 'OS_USERNAME']:
+                    openrc_dict[key] = value[1: len(value) - 2]
+
+    return openrc_dict
+
+
+def get_openrc(nodes):
+    controller = None
+
+    for node in nodes:
+        if 'controller' in node.roles:
+            controller = node
+            break
+
+    url = controller.conn_url[6:]
+    ssh = connect(url)
+    sftp = ssh.open_sftp()
+    sftp.get('/root/openrc', openrc_path)
+    sftp.close()
+
+    return get_openrc_data(openrc_path)
+
+
+def discover_fuel_nodes(fuel_url, creds, cluster_name):
     username, tenant_name, password = parse_creds(creds)
     creds = {"username": username,
              "tenant_name": tenant_name,
              "password": password}
 
-    admin_ip = urlparse(fuel_url).hostname
-    fuel = KeystoneAuth(fuel_url, creds, headers=None, echo=None,
-                        admin_node_ip=admin_ip)
+    fuel = KeystoneAuth(fuel_url, creds, headers=None, echo=None,)
+    cluster_id = get_cluster_id(cluster_name, fuel)
     nodes = fuel.do("get", path="/api/nodes?cluster_id=" + str(cluster_id))
     ips = [node["ip"] for node in nodes]
     roles = [node["roles"] for node in nodes]
@@ -33,7 +75,9 @@
     nodes, to_clean = run_agent(ips, roles, host, tmp_file)
     nodes = [Node(node[0], node[1]) for node in nodes]
 
-    return nodes, to_clean
+    openrc_dict = get_openrc(nodes)
+
+    return nodes, to_clean, openrc_dict
 
 
 def discover_fuel_nodes_clean(fuel_url, ssh_creds, nodes, base_port=12345):
@@ -102,9 +146,9 @@
                       + ":" + fuel_id_rsa_path, role))
 
     ssh.close()
-    print 'Files has been transfered successefully to Fuel node, ' \
-          'agent has been launched'
-    print nodes
+    logger.info('Files has been transferred successfully to Fuel node, ' \
+                'agent has been launched')
+    logger.info("Nodes : " + str(nodes))
 
     return nodes, nodes_to_clean
 
@@ -115,11 +159,11 @@
     parser.add_argument(
         "--fuel_url", required=True)
     parser.add_argument(
-        "--cluster_id", required=True)
+        "--cluster_name", required=True)
     parser.add_argument(
         "--iface", default="eth1")
     parser.add_argument(
-        "--creds", default="admin:admin:admin")
+        "--creds", default="admin:admin@admin")
 
     return parser.parse_args(argv)
 
@@ -128,7 +172,7 @@
     args = parse_command_line(argv)
 
     nodes, to_clean = discover_fuel_nodes(args.fuel_url,
-                                          args.creds, args.cluster_id)
+                                          args.creds, args.cluster_name)
     discover_fuel_nodes_clean(args.fuel_url, {"username": "root",
                                               "password": "test37",
                                               "port": 22}, to_clean)