+def yardstick_image_prepare():
+ if not os.path.exists(config.bottlenecks_config["yardstick_image_dir"]):
+ urllib.urlretrieve(config.bottlenecks_config["image_url"],
+ config.bottlenecks_config["yardstick_image_dir"])
+ env.prepare_image(config.bottlenecks_config["yardstick_image_name"],
+ config.bottlenecks_config["yardstick_image_dir"])
+
+
+def yardstick_command_parser(debug, cidr, outfile, parameter):
+ cmd = "yardstick"
+ if debug:
+ cmd += " -d"
+ cmd += " task start "
+ cmd += str(cidr)
+ cmd += " --output-file " + outfile
+ image_name = config.bottlenecks_config["yardstick_image_name"]
+ parameter["image_name"] = image_name
+ DEPLOY_SCENARIO = os.getenv("DEPLOY_SCENARIO")
+ if DEPLOY_SCENARIO:
+ if "ovs" in DEPLOY_SCENARIO:
+ parameter["dpdk_enabled"] = True
+ LOG.info(parameter)
+ if parameter is not None:
+ cmd += " --task-args " + '"' + str(parameter) + '"'
+ return cmd
+
+