code: func (l VirtualDeviceList) NewKey() int32 {
  	var key int32 = -200
  
  	for _, device := range l {
  		d := device.GetVirtualDevice()
  		if d.Key < key {
  			key = d.Key
  		}
  	}
  
  	return key - 1
  }
docs: // NewKey returns the key to use for adding a new device to the device list.
  // The device list we're working with here may not be complete (e.g. when
  // we're only adding new devices), so any positive keys could conflict with device keys
  // that are already in use. To avoid this type of conflict, we can use negative keys
  // here, which will be resolved to positive keys by vSphere as the reconfiguration is done.