neutron-lib/releasenotes/notes/mac-generator-f927df2fe57300c0.yaml
Antoni Segura Puimedon b8677baeb7 net_utils: Add a random mac generator
If you want to generate thousands of mac addresses for ports in the same
subnet, it is much more efficient to use the generator as it will
guarantee that you will not get repeated macs. It is also about 2x as
fast when not counting repetition.

The use case for this in Neutron is for making the bulk port creation
perform all the port creation at once, without having to go one by one
internally as it currently does.

Implements: blueprint speed-up-neutron-bulk-creation
Change-Id: I8551c88ffe3ddefe617fb052eb7ca6f0d7d85069
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
2018-07-18 15:08:52 +00:00

9 lines
397 B
YAML

---
features:
- |
Introduced ``neutron_lib.utils.net.random_mac_generator(basemac)``. It allows
you to get a mac address string Python generator from the same kind of
basemac that ``neutron_lib.utils.net.get_random_mac(basemac)`` expects. If
there are a lot of macs to get, this will speed the process up
significantly over generating single macs and testing for collisions.