custom nova instance name

asked 2017-01-23 05:19:33 -0500

rajeev.somayaji gravatar image

Hi,

I'm using Rally to qualify/benchmark openstack cloud.

The test scenarios under nova configures the instances by appending some randomly generated name, which I need to avoid.

in order to achieve this, i have modifed _boot_server sub-routine in utils.py file to include a custom name to the nova instances. The changes are: From: server_name = self.generate_random_name()

 To:       server_name = "nova_instance_7"

(I'm aware that hard-coding the name will affect the cleanup process, but i really want to configure an instance with user defined name rather than the ones provided by rally)

However when i execute a nova - "create and delete" or "create and attach volume" scenario, instances are being created with old name itself.

How can i make sure that the changes which i make to the rally opensource files gets reflected in the tests which i execute ?

I even tried to configure the name by providing input from the json file for the test scenario, but with no luck.

Can some one please help me understand how i can configure nova instances with custom name.

Thanks, Rajeev

edit retag flag offensive close merge delete

Comments

def _boot_server(self, image_id, flavor_id,auto_assign_nic=False, **kwargs): #server_name = self.generate_random_name() Even if i comment the generate_random_name() line in the above code snippet, the instances are being created successfully!!. (I deleted the utils.pyc file)

rajeev.somayaji gravatar imagerajeev.somayaji ( 2017-01-26 22:37:22 -0500 )edit