Fixed errors, added new parameters

This commit is contained in:
root
2015-03-23 12:12:23 +00:00
parent 85d606cec4
commit e50da1462f
4 changed files with 27 additions and 17 deletions

4
install.sh Normal file → Executable file
View File

@@ -1,4 +1,4 @@
mkdir -p /opt/rally/plugins/
mkdir -p /opt/rally/plugins
cp rally-scenarios/* /opt/rally/plugins/
cp rally-contexts/* /opt/rally/plugins/
export PYTHONPATH=PYTHONPATH;/opt/rally/plugins/
export PYTHONPATH=/opt/rally/plugins/

View File

@@ -22,6 +22,14 @@ class CloudNodesContext(base.Context):
"power_control_node": {
"type": "object",
"default": {}
},
"shaker_image": {
"type": "string",
"default": "TestVM"
},
"default_flavor": {
"type": "string",
"default": "m1.micro"
}
}
}

View File

@@ -16,9 +16,11 @@ class BaseDisasterScenario(base.Scenario):
**kwargs)
return vm
def run_command(self, node, command, recover_command=None):
def run_command(self, node, command, recover_command=None,
recover_timeout=0):
if recover_cmd is not None:
action = {"node": node, "command": command}
action = {"node": node, "command": command,
"timeout": recover_timeout}
self.context["recover_commands"].append(action)
r = requests.post("http://{0}/run_command".format(node),

View File

@@ -12,29 +12,29 @@
"cloud_nodes": {
"controllers": [
{
"shaker_agent_id": "1",
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-1",
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-1 poweroff",
"power_off_timeout": 20,
"power_on_timeout": 30
},
{
"shaker_agent_id": "2",
"shaker_agent_id": "172.16.0.4:1000",
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-2",
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-2 poweroff",
"power_off_timeout": 20,
"power_on_timeout": 30
},
{
"shaker_agent_id": "3",
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-3",
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-3 poweroff",
"shaker_agent_id": "172.16.0.5:1000",
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-5",
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-5 poweroff",
"power_off_timeout": 20,
"power_on_timeout": 30
},
{
"shaker_agent_id": "172.16.0.6:1000",
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-4",
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-4 poweroff",
"power_off_timeout": 20,
"power_on_timeout": 30
}
],
"power_control_node": {
"shaker_agent_id": "localhost"
"shaker_agent_id": "localhost:1000"
}
}
}