Rally source code changes
Hi,
I'm using Rally to benchmark openstack cloud.
Nova scenarios configure instances with randomly generated name, which i need to avoid.
In order to achieve this, i have modified the source code to include custom name. I'm including an example here to explain the changes.
Scenario name: boot-and-
This scenario boots a server and rebuilds it with different image. It calls the sub-routine _boot_server in utils.py.
I have made changes to servers.py where the plugin implementation is present and to the utils.py where the core sub-routine is present.
servers.py changes: (line 799 onwards)
def boot_and_
"""Rebuild a server.
This scenario launches a VM, then rebuilds that VM with a
different image.
:param from_image: image to be used to boot an instance
:param to_image: image to be used to rebuild the instance
:param flavor: flavor to be used to boot an instance
:param kwargs: Optional additional arguments for server creation
"""
#edited by Rajeev - 1/27/2017
server = self._boot_
utils.py changes:
@atomic.
def _boot_server(self, image_id, flavor_id,
"""Boot a server.
Returns when the server is actually booted and in "ACTIVE" state.
If multiple networks created by Network context are present, the first
network found that isn't associated with a floating IP pool is used.
:param image_id: int, image ID for server creation
:param flavor_id: int, flavor ID for server creation
:param auto_assign_nic: bool, whether or not to auto assign NICs
:param kwargs: other optional parameters to initialize the server
:returns: nova Server instance
"""
#edited by Rajeev - 1/27/2017
if "custom_
else:
secgroup = self.context.
if secgroup:
if "security_groups" not in kwargs:
elif secgroup["name"] not in kwargs[
if auto_assign_nic and not kwargs.get("nics", False):
nic = self._pick_
if nic:
server = self.clients(
server = utils.wait_for(
server,
)
return server
-------------
However, when i execute the benchmark scenario, it is creating an instance with the randomly generated name (which is commented in the code).
How can i make sure that rally picks up the changes which i have made in few of the files?
Do i have to overwrite/update some ENV variables to accept the changes?
Please let me know if i need to provide additional information.
Thanks,
Rajeev
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Rally Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Andriy Kurilin
- Solved:
- Last query:
- Last reply: