In the osapi name from the request is always converted to display_name. There is no logic for appending a launch_index, although I also remember that something like that was done before.
Code for generating hostname is here: https://github.com/openstack/nova/blob/master/nova/compute/api.py#L653 The display name is sanitized here: https://github.com/openstack/nova/blob/master/nova/utils.py#L1076 There is no per tenant uniqueness check, although that might be useful, as well as the option to add .tenant_name onto the hostname. Vish On Aug 30, 2012, at 8:06 AM, "Day, Phil" <philip....@hp.com> wrote: > Hi Folks, > > I’m trying to understand the difference between “display_name” and “hostname” > in the instances table, and struggling a bit to track their use though the > code. It looks to me as if: > > display_name is always the name specified by the user > > hostname is a sanitized version of this (always converted to > lowercase, etc) > > > Is that correct, and if so: > > - Is there anything which makes sure that the sanitized hostname is > always unique for a particular customer (or are they meant to understand and > anticipate the consequences of this sanitization) > > - How is the hostname set when creating more than one instance at > the same time (I thought I’d remembered seeing something in the code sometime > back to add the an integer to the hostname, but I can’t seem to see anything > in the current code that does this) > > > Thanks > Phil > _______________________________________________ > Mailing list: https://launchpad.net/~openstack > Post to : openstack@lists.launchpad.net > Unsubscribe : https://launchpad.net/~openstack > More help : https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp