Totally agree. On Mar 5, 2011, at 8:26 PM, Rick Harris <rick.har...@rackspace.com<mailto:rick.har...@rackspace.com>> wrote:
Reading through the XenAPI virt-layer code, I've noticed there is some inconsistency in how we name variables, in particular, how we distinguish between the three kinds of object references that XenAPI exposes: 1. Opaque references 2. UUIDs 3. Records In some of the code, 'vm' means that we're working with a VM record object; in others, it means we're working with an opaque reference. For our own sanity, I propose that we adopt the following convention (which currently is used by some--perhaps most-- of the code): 1. Opaque references should be suffixed with "_ref". e.g.: "vdi_ref" or "vm_ref" 2. UUIDs should be suffixed with "_uuid". e.g.: "vbd_uuid" or "sr_uuid" 3. Records should not have a suffix[1]. e.g.: "vm" or "vdi" If there is general agreement to this plan, we should create a bug in Launchpad to rename all of the currently mis-named variables to use the new naming scheme. Ordinarily I would have made this change without appealing to the list (since it doesn't seem controversial), but, in the interest of having this convention well-known/maintained, it's probably be better to get explicit buy in from everyone who works with the code. Thoughts? ---- [1] An alternative is to use "_rec" ("vm_rec"). That's very explicit, which is good, but, not necessary since refs and uuid cases are qualified. Confidentiality Notice: This e-mail message (including any attached or embedded documents) is intended for the exclusive and confidential use of the individual or entity to which this message is addressed, and unless otherwise expressly indicated, is confidential and privileged information of Rackspace. Any dissemination, distribution or copying of the enclosed material is prohibited. If you receive this transmission in error, please notify us immediately by e-mail at ab...@rackspace.com<mailto:ab...@rackspace.com>, and delete the original message. Your cooperation is appreciated. _______________________________________________ Mailing list: <https://launchpad.net/~openstack-xenapi> https://launchpad.net/~openstack-xenapi Post to : <mailto:openstack-xenapi@lists.launchpad.net> openstack-xenapi@lists.launchpad.net<mailto:openstack-xenapi@lists.launchpad.net> Unsubscribe : <https://launchpad.net/~openstack-xenapi> https://launchpad.net/~openstack-xenapi More help : <https://help.launchpad.net/ListHelp> https://help.launchpad.net/ListHelp
_______________________________________________ Mailing list: https://launchpad.net/~openstack-xenapi Post to : openstack-xenapi@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack-xenapi More help : https://help.launchpad.net/ListHelp