VLAN filtering on VIF#7123
Conversation
32d343e to
013dff3
Compare
013dff3 to
3b3f2b5
Compare
54e858c to
f62adbe
Compare
f62adbe to
86df0ef
Compare
86df0ef to
ccb6e9d
Compare
Use a more generic message to permit to use it in other context than VLAN creation. Signed-off-by: Sebastien Marie <semarie@kapouay.eu.org>
ccb6e9d to
27a9666
Compare
| @@ -83,12 +91,7 @@ let create ~__context ~tagged_PIF ~tag ~network = | |||
| ~pif_topo ~tag ; | |||
| Xapi_network_helpers.assert_vlan_network_compatible_with_pif ~__context | |||
There was a problem hiding this comment.
it is not related directly with your code but shouldn't we add, now that you are introducing trunks VIF, Xapi_pif_helpers.assert_network_compatible_with_trunks_on_vif ~__context ~network.
There was a problem hiding this comment.
Adding the check is possible, but it should never trigger : currently, there is already a check when you a creating the new PIF (tagged_PIF) on Network with VIF using trunks, which is done before creating the VLAN object itself.
|
Have you tried using |
gthvn1
left a comment
There was a problem hiding this comment.
Some questions but otherwise, the PR (even though I'm a dummy when it comes to networking) looks really good, congrats!
- update idl/datamodel to add trunks property on VIF - add validation constraints (trunks filtering on access port isn't valid) - add support inside `vif-real` for initial configuration - add support inside xenopsd for dynamic changes - add test coverage to new attributes References: - Design document: https://github.com/xapi-project/xen-api/blob/788869e5a92e10332ba2428eb91e5a2caf4c7131/doc/content/design/vlan-filtering.md Signed-off-by: Sebastien Marie <semarie@kapouay.eu.org>
27a9666 to
0dbfb8b
Compare
It depends what you call a "wrong trunk ID". If it is an invalid VLAN tag (outside the valid range of VLAN), yes it is working as expected. # xe vif-param-set uuid=80e5f415-c385-ea18-28c7-4c8ababcc76a trunks=15,9999
The VLAN tag you gave was invalid -- it must be between 0 and 4094. The parameter echoes the VLAN tag you gave.
VLAN: 9999
# xe vif-param-set uuid=80e5f415-c385-ea18-28c7-4c8ababcc76a trunks=15,20
# If it is a valid VLAN tag but not used on the network, it doesn't trigger any error as XAPI have not way to know if the specified VLAN tag is used or not outside the managed network (the VLAN could exist outside XAPI). So as long the VLAN tag is valid, you could set it, and use it in the VM (to send and receive tagged Ethernet packets). |
Yes I wanted to say invalid 👍 |
vif-realfor initial configurationReferences:
Internal references: