aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/main.py
diff options
context:
space:
mode:
authorHans Feldt <hans.feldt@ericsson.com>2015-06-03 10:50:48 +0200
committerHans Feldt <hans.feldt@ericsson.com>2015-06-15 11:07:12 +0000
commit585a2483e9fb021d853b0946f185d066335adea4 (patch)
tree828834e6a3dc8617eaaf9422087a6f847b3fe804 /yardstick/main.py
parent7492216de2f198e42bcd5e1539c8b21886a78d8c (diff)
Add support for external HOT template
An external HOT template is a separate yaml file in native Heat format HOT. The external template is referenced in the task file and used as template for a "context". Parameters required at template instantiation are also configured in the task file. See new sample file ping-hot.yaml Change-Id: Ie2b7ea96ea90b75ca4e08a29e2223ceeb1474724 JIRA: YARDSTICK-24 Signed-off-by: Hans Feldt <hans.feldt@ericsson.com>
Diffstat (limited to 'yardstick/main.py')
-rwxr-xr-xyardstick/main.py50
1 files changed, 38 insertions, 12 deletions
diff --git a/yardstick/main.py b/yardstick/main.py
index 5669fde10..942b46be9 100755
--- a/yardstick/main.py
+++ b/yardstick/main.py
@@ -13,6 +13,30 @@
Example invocation:
$ yardstick samples/ping-task.yaml
+
+ Servers are the same as VMs (Nova call them servers in the API)
+
+ Many tests use a client/server architecture. A test client is configured
+ to use a specific test server e.g. using an IP address. This is true for
+ example iperf. In some cases the test server is included in the kernel
+ (ping, pktgen) and no additional software is needed on the server. In other
+ cases (iperf) a server process needs to be installed and started
+
+ One server is required to host the test client program (such as ping or
+ iperf). In the task file this server is called host.
+
+ A server can be the _target_ of a test client (think ping destination
+ argument). A target server is optional but needed in most test scenarios.
+ In the task file this server is called target. This is probably the same
+ as DUT in existing terminology.
+
+ Existing terminology:
+ https://www.ietf.org/rfc/rfc1242.txt (throughput/latency)
+ https://www.ietf.org/rfc/rfc2285.txt (DUT/SUT)
+
+ New terminology:
+ NFV TST
+
"""
import sys
@@ -77,23 +101,25 @@ def run_one_scenario(scenario_cfg, output_file):
host = Context.get_server(scenario_cfg["host"])
runner_cfg = scenario_cfg["runner"]
- runner_cfg['host'] = host.floating_ip["ipaddr"]
+ runner_cfg['host'] = host.public_ip
runner_cfg['user'] = host.context.user
runner_cfg['key_filename'] = key_filename
runner_cfg['output_filename'] = output_file
- # TODO target should be optional to support single VM scenarios
- target = Context.get_server(scenario_cfg["target"])
- if target.floating_ip:
- runner_cfg['target'] = target.floating_ip["ipaddr"]
+ if "target" in scenario_cfg:
+ target = Context.get_server(scenario_cfg["target"])
- # TODO scenario_cfg["ipaddr"] is bad, "dest_ip" is better
- if host.context != target.context:
- # target is in another context, get its public IP
- scenario_cfg["ipaddr"] = target.floating_ip["ipaddr"]
- else:
- # TODO hardcoded name below, a server can be attached to several nets
- scenario_cfg["ipaddr"] = target.ports["test"]["ipaddr"]
+ # get public IP for target server, some scenarios require it
+ if target.public_ip:
+ runner_cfg['target'] = target.public_ip
+
+ # TODO scenario_cfg["ipaddr"] is bad naming
+ if host.context != target.context:
+ # target is in another context, get its public IP
+ scenario_cfg["ipaddr"] = target.public_ip
+ else:
+ # target is in the same context, get its private IP
+ scenario_cfg["ipaddr"] = target.private_ip
runner = base_runner.Runner.get(runner_cfg)