Merge "Introduced timeout to post method of HttpClient"
[yardstick.git] / yardstick / network_services / vnf_generic / vnf / prox_helpers.py
index 30524a1..d247101 100644 (file)
@@ -782,7 +782,8 @@ class ProxDpdkVnfSetupEnvHelper(DpdkVnfSetupEnvHelper):
             prox_files = [prox_files]
         for key_prox_file in prox_files:
             base_prox_file = os.path.basename(key_prox_file)
-            remote_prox_file = self.copy_to_target(key_prox_file, base_prox_file)
+            key_prox_path = find_relative_file(key_prox_file, task_path)
+            remote_prox_file = self.copy_to_target(key_prox_path, base_prox_file)
             self.additional_files[base_prox_file] = remote_prox_file
 
         self._prox_config_data = self.generate_prox_config_file(config_path)
@@ -906,10 +907,18 @@ class ProxResourceHelper(ClientResourceHelper):
             LOG.debug("tg_prox done")
             self._terminated.value = 1
 
-    # use ResourceHelper method to collect KPIs directly.
-    def collect_kpi(self):
+    # For VNF use ResourceHelper method to collect KPIs directly.
+    # for TG leave the superclass ClientResourceHelper collect_kpi_method intact
+    def collect_collectd_kpi(self):
         return self._collect_resource_kpi()
 
+    def collect_kpi(self):
+        result = super(ProxResourceHelper, self).collect_kpi()
+        # add in collectd kpis manually
+        if result:
+            result['collect_stats'] = self._collect_resource_kpi()
+        return result
+
     def terminate(self):
         # should not be called, use VNF terminate
         raise NotImplementedError()