allocation sync: use physnet, not hostgroup name #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The allocation sync currently syncs the host allocations table by using the name of a hostgroup. This value is almost always the same as the physical network of the hostgroup, but not always. As new features will rely on multiple hostgroups belonging to the same physnet we need to fix this.
While doing so we also make sure that if we have multiple hostgroups for the same physnet, we merge the vlan ranges we find in the different hostgroups (that's what the new sorting and grouping is for).
In the config parser, we also now make sure the pyhsical_network config attribute is always set. For Converged Cloud, this is taken care of by the helm charts, but one can never be too sure (and this is not marked as a required attribute).