This makes sure that we always map the pool name of an AddressPool to the DefaultPoolName if necessary, to avoid referring to implicit pools as "" some places, and by DefaultPoolName in others. The specific way this manifested was IP allocation requests for the default pool name (i.e. by using c.ipaddress_allocate!(:mytag, 'DEFAULT') would fail if ipAddress.defaultPoolName=DEFAULT, despite there being a pool with that name.
I ran into this deploying a collins instance into a topology that had only a single L2 network. I attempted to use the default pool, but found I was unable to allocate IPs from it until I renamed it.
NOTE: i have some unit tests to confirm this behavior, but I am unable to figure out how to override play configuration with WithApplication(FakeApplication(Map(additionalConfigHere))) in specs. Ill keep poking at it, but the change here has been manually verified and confirmed to fix #416.
Fixes #416
This makes sure that we always map the pool name of an
AddressPool
to theDefaultPoolName
if necessary, to avoid referring to implicit pools as""
some places, and byDefaultPoolName
in others. The specific way this manifested was IP allocation requests for the default pool name (i.e. by usingc.ipaddress_allocate!(:mytag, 'DEFAULT')
would fail ifipAddress.defaultPoolName=DEFAULT
, despite there being a pool with that name.I ran into this deploying a collins instance into a topology that had only a single L2 network. I attempted to use the default pool, but found I was unable to allocate IPs from it until I renamed it.
NOTE: i have some unit tests to confirm this behavior, but I am unable to figure out how to override play configuration with
WithApplication(FakeApplication(Map(additionalConfigHere)))
in specs. Ill keep poking at it, but the change here has been manually verified and confirmed to fix #416.@qx-xp @roymarantz @defect @michaeljs1990