VOL-1399: The value of the metadata field used by OFAgent & Arouter
          should not be hard-coded
- Added grpc-timeout and core-binding-key options to OFAgent run command
- Added core_binding_key option to rw_core run command

Change-Id: Icf5fe226d17a1a5fcd9459a85e41c434fc7ac8b9
diff --git a/python/ofagent/connection_mgr.py b/python/ofagent/connection_mgr.py
index b960b69..fea4910 100755
--- a/python/ofagent/connection_mgr.py
+++ b/python/ofagent/connection_mgr.py
@@ -39,7 +39,8 @@
 # _ = third_party
 
 class ConnectionManager(object):
-    def __init__(self, consul_endpoint, vcore_endpoint, vcore_grpc_timeout,
+    def __init__(self, consul_endpoint,
+                 vcore_endpoint, vcore_grpc_timeout, vcore_binding_key,
                  controller_endpoints, instance_id,
                  enable_tls=False, key_file=None, cert_file=None,
                  vcore_retry_interval=0.5, devices_refresh_interval=5,
@@ -51,6 +52,7 @@
         self.consul_endpoint = consul_endpoint
         self.vcore_endpoint = vcore_endpoint
         self.grpc_timeout = vcore_grpc_timeout
+        self.core_binding_key = vcore_binding_key
         self.instance_id = instance_id
         self.enable_tls = enable_tls
         self.key_file = key_file
@@ -161,7 +163,8 @@
                 # Send subscription request to register the current ofagent instance
                 container_name = self.instance_id
                 if self.grpc_client is None:
-                    self.grpc_client = GrpcClient(self, self.channel, self.grpc_timeout)
+                    self.grpc_client = GrpcClient(self, self.channel, self.grpc_timeout,
+                                                  self.core_binding_key)
                 subscription = yield self.grpc_client.subscribe(
                     OfAgentSubscriber(ofagent_id=container_name))