feat: Subport dynamic segment #804
Merged
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.
Ref PUC-787
closes #771
The old scheme used a Nautobot plugin to assign a VLAN number outside of
Openstack, and this is what was configured on the switch. This caused
issues because Neutron had no knowledge of these VLANs, which make it
difficult to have Neutron drive any layer 3 services or even trunk ports.
Now we have Neutron allocate "Dynamic" network segments instead, and
these are pushed to Nautobot, to keep Nautobot's VLANs in sync with
Neutron's Network Segments.
To facilitate we are using the "physical network" of each Ironic
baremetal port to identify the vlan group where that switch port lives.
For every vlan group we have created a Network Segment Range with the
same name. Dynamic network segments of type "VLAN" are assigned from
those ranges.
We implement some new API calls to replace the "prep switch interface"
and "detach port" Nautobot jobs which were previously making interface
updates in addition to assigning VLAN numbers. Specifically, we now
update the vlans on the switch port and we toggle it's "provisioning"
state.
Undersync is invoked with a VLAN Group parameter. We now identify the
VLAN Group by name instead of UUID. The name is directly discoverable
from Neutron whereas the UUID would have to be looked up in Nautobot.
(Undersync was already updated to accept either type of parameter.)
In Neutron we now exclusively use type "VXLAN" and so all support for
type "VLAN" Networks has been removed. This also includes the
"provisioning" network which has been recreated as type VXLAN in our
environment.
There is an opportunity to remove our special "vlan 4010" case handling
of the provisioning network and have this created by Neutron using the
same mechanisms as for as any other tenant network, but that has not
happened yet.
Trunk ports have first-class support in Neutron but they are handled by
a separate model, disjoint from "normal" ports, and using trunk ports
exercises totally different ml2 driver callbacks. Trunk port support
is included in a this PR.