diff --git a/rally-jobs/rally-neutron.yaml b/rally-jobs/rally-neutron.yaml index 79c68384..3252d1e2 100644 --- a/rally-jobs/rally-neutron.yaml +++ b/rally-jobs/rally-neutron.yaml @@ -776,8 +776,6 @@ name: {{image_name}} floating_network: "public" force_delete: false - command: - interpreter: "/bin/sh" username: "cirros" runner: type: "constant" diff --git a/rally/plugins/openstack/scenarios/vm/vmtasks.py b/rally/plugins/openstack/scenarios/vm/vmtasks.py index ddd18e1d..f99e05b8 100644 --- a/rally/plugins/openstack/scenarios/vm/vmtasks.py +++ b/rally/plugins/openstack/scenarios/vm/vmtasks.py @@ -222,12 +222,9 @@ class BootRuncommandDelete(vm_utils.VMScenario, cinder_utils.CinderBasic): :param use_floating_ip: bool, floating or fixed IP for SSH connection :param force_delete: whether to use force_delete for servers :param wait_for_ping: whether to check connectivity on server creation - :param **kwargs: extra arguments for booting the server :param max_log_length: The number of tail nova console-log lines user would like to retrieve - :returns: dictionary with keys `data' and `errors': - data: dict, JSON output from the script - errors: str, raw data from the script's stderr stream + :param kwargs: extra arguments for booting the server """ if volume_args: volume = self.cinder.create_volume(volume_args["size"], @@ -480,7 +477,6 @@ EOF flavor={"type": "nova_flavor"}) @validation.add("image_valid_on_flavor", flavor_param="flavor", image_param="image") -@validation.add("valid_command", param_name="command") @validation.add("number", param_name="port", minval=1, maxval=65535, nullable=True, integer_only=True) @validation.add("external_network_exists", param_name="floating_network") @@ -493,12 +489,20 @@ EOF name="VMTasks.dd_load_test", platform="openstack") class DDLoadTest(BootRuncommandDelete): - - def run(self, command, **kwargs): + @logging.log_deprecated_args( + "Use 'interpreter' to specify the interpreter to execute script from.", + "0.10.0", ["command"], once=True) + def run(self, interpreter="/bin/sh", command=None, **kwargs): """Boot a server from a custom image, run a command that outputs JSON. Example Script in rally-jobs/extra/install_benchmark.sh - :param command: default parameter from scenario + + :param interpreter: the interpreter to execute script with dd load test + (defaults to /bin/sh) + :param command: deprecated """ - command["script_inline"] = BASH_DD_LOAD_TEST - return super(DDLoadTest, self).run(command=command, **kwargs) + cmd = {"interpreter": interpreter, + "script_inline": BASH_DD_LOAD_TEST} + if command and "interpreter" in command: + cmd["interpreter"] = command["interpreter"] + return super(DDLoadTest, self).run(command=cmd, **kwargs) diff --git a/samples/tasks/scenarios/vm/dd-load-test.json b/samples/tasks/scenarios/vm/dd-load-test.json index 4574b888..4e2dee73 100644 --- a/samples/tasks/scenarios/vm/dd-load-test.json +++ b/samples/tasks/scenarios/vm/dd-load-test.json @@ -11,9 +11,7 @@ }, "floating_network": "public", "force_delete": false, - "command": { - "interpreter": "/bin/sh" - }, + "interpreter": "/bin/sh", "username": "cirros" }, "runner": { diff --git a/samples/tasks/scenarios/vm/dd-load-test.yaml b/samples/tasks/scenarios/vm/dd-load-test.yaml index 7025611b..43d18572 100644 --- a/samples/tasks/scenarios/vm/dd-load-test.yaml +++ b/samples/tasks/scenarios/vm/dd-load-test.yaml @@ -9,8 +9,7 @@ name: "^cirros.*-disk$" floating_network: "public" force_delete: false - command: - interpreter: "/bin/sh" + interpreter: "/bin/sh" username: "cirros" runner: type: "constant"