Merge "Deprecate 'command' argument of VMTasks.dd_load_test"
This commit is contained in:
commit
f602779e75
|
@ -776,8 +776,6 @@
|
||||||
name: {{image_name}}
|
name: {{image_name}}
|
||||||
floating_network: "public"
|
floating_network: "public"
|
||||||
force_delete: false
|
force_delete: false
|
||||||
command:
|
|
||||||
interpreter: "/bin/sh"
|
|
||||||
username: "cirros"
|
username: "cirros"
|
||||||
runner:
|
runner:
|
||||||
type: "constant"
|
type: "constant"
|
||||||
|
|
|
@ -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 use_floating_ip: bool, floating or fixed IP for SSH connection
|
||||||
:param force_delete: whether to use force_delete for servers
|
:param force_delete: whether to use force_delete for servers
|
||||||
:param wait_for_ping: whether to check connectivity on server creation
|
: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
|
:param max_log_length: The number of tail nova console-log lines user
|
||||||
would like to retrieve
|
would like to retrieve
|
||||||
:returns: dictionary with keys `data' and `errors':
|
:param kwargs: extra arguments for booting the server
|
||||||
data: dict, JSON output from the script
|
|
||||||
errors: str, raw data from the script's stderr stream
|
|
||||||
"""
|
"""
|
||||||
if volume_args:
|
if volume_args:
|
||||||
volume = self.cinder.create_volume(volume_args["size"],
|
volume = self.cinder.create_volume(volume_args["size"],
|
||||||
|
@ -480,7 +477,6 @@ EOF
|
||||||
flavor={"type": "nova_flavor"})
|
flavor={"type": "nova_flavor"})
|
||||||
@validation.add("image_valid_on_flavor", flavor_param="flavor",
|
@validation.add("image_valid_on_flavor", flavor_param="flavor",
|
||||||
image_param="image")
|
image_param="image")
|
||||||
@validation.add("valid_command", param_name="command")
|
|
||||||
@validation.add("number", param_name="port", minval=1, maxval=65535,
|
@validation.add("number", param_name="port", minval=1, maxval=65535,
|
||||||
nullable=True, integer_only=True)
|
nullable=True, integer_only=True)
|
||||||
@validation.add("external_network_exists", param_name="floating_network")
|
@validation.add("external_network_exists", param_name="floating_network")
|
||||||
|
@ -493,12 +489,20 @@ EOF
|
||||||
name="VMTasks.dd_load_test",
|
name="VMTasks.dd_load_test",
|
||||||
platform="openstack")
|
platform="openstack")
|
||||||
class DDLoadTest(BootRuncommandDelete):
|
class DDLoadTest(BootRuncommandDelete):
|
||||||
|
@logging.log_deprecated_args(
|
||||||
def run(self, command, **kwargs):
|
"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.
|
"""Boot a server from a custom image, run a command that outputs JSON.
|
||||||
|
|
||||||
Example Script in rally-jobs/extra/install_benchmark.sh
|
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
|
cmd = {"interpreter": interpreter,
|
||||||
return super(DDLoadTest, self).run(command=command, **kwargs)
|
"script_inline": BASH_DD_LOAD_TEST}
|
||||||
|
if command and "interpreter" in command:
|
||||||
|
cmd["interpreter"] = command["interpreter"]
|
||||||
|
return super(DDLoadTest, self).run(command=cmd, **kwargs)
|
||||||
|
|
|
@ -11,9 +11,7 @@
|
||||||
},
|
},
|
||||||
"floating_network": "public",
|
"floating_network": "public",
|
||||||
"force_delete": false,
|
"force_delete": false,
|
||||||
"command": {
|
"interpreter": "/bin/sh",
|
||||||
"interpreter": "/bin/sh"
|
|
||||||
},
|
|
||||||
"username": "cirros"
|
"username": "cirros"
|
||||||
},
|
},
|
||||||
"runner": {
|
"runner": {
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
name: "^cirros.*-disk$"
|
name: "^cirros.*-disk$"
|
||||||
floating_network: "public"
|
floating_network: "public"
|
||||||
force_delete: false
|
force_delete: false
|
||||||
command:
|
|
||||||
interpreter: "/bin/sh"
|
interpreter: "/bin/sh"
|
||||||
username: "cirros"
|
username: "cirros"
|
||||||
runner:
|
runner:
|
||||||
|
|
Loading…
Reference in New Issue