-
Hi, i'm trying to add vlan support to the new network manager and i'd like to do it well enough so it can be ported to future releases. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 6 replies
-
Ciao Fabio, The current flux is the following:
Therefore, all the code responsible for writing additional configuration settings to the NetworkManager connection should be placed inside the From the user point of view: to pass these settings from the UI to the Configuration service (and therefore, by consequence, update the Kura snapshot), one has to update the metatype and the UI accordingly. I suggest you take a look at what @sfiorani and @marcellorinaldo did in the last PRs for the IPv6 configuration support.
Hope this helps. [1] Reference: [2] Reference: |
Beta Was this translation helpful? Give feedback.
-
Ciao Mattia, The "reuse" logic is currently working, is suitable for "simpler" use cases like needing to access and change the ip configuration of an existing vlan (which would still need to be created via nmcli command line) but does not allow for creation and management of vlans directly through the Kura Ui |
Beta Was this translation helpful? Give feedback.
-
Ciao Fabio,
This would be taken care of by the Configuration service I mentioned. The Configuration service is also responsible for writing the configuration onto the snapshot. You can simulate the flux without changing the UI by manually changing the snapshot and re-uploading it. Proceed as follows:
Given you have updated your code to leverage the
With regards to this I would actually avoid that and keep consistent to what the rest of the network settings expect, that is: expect that the UI will always provide all the necessary parameters (now that I think about it we should probably remove that part you were referring to since it's inconsistent with the rest and not really needed IIRC 🤔 ) In your case you should expect to always receive |
Beta Was this translation helpful? Give feedback.
-
I just assumed the "reuse" logic in this In my specific case, it becomes kinda like a chicken-and-egg problem, as the first retrieval of vlan parameters requires a preexisting active connection (and really don't want to start losing field devices to configuration mistakes :) ) so manually modifying a snapshot.xml for the first configuration so that properties can be retrieved by NMSettingsConverter seems like the only option. |
Beta Was this translation helpful? Give feedback.
-
🤔 I might have finally understood where's the problem. Let'see... The only limitation (not gonna lie, is not small) I see for implementing complete support to vlan in Kura is given by the fact that, in our current implementation, we only manage/configure interfaces that are already present on the system. From what I understand, when you create a Could this be your chicken-and-egg problem? Once you create this connection (and therefore the related device) you want to preserve the Did I get this right? So I suppose that you're currently:
|
Beta Was this translation helpful? Give feedback.
-
That's correct, sorry if I didn't manage to be clearer before :) |
Beta Was this translation helpful? Give feedback.
-
CC @pierantoniomerlino and @MMaiero
Thank you for the additional context. Meanwhile I talked about this with the rest of the Eclipse Kura team and agree that the feature you're proposing is really interesting and we'd really like to see it in the Kura codebase. However we agree that, to be a "complete" feature and be accepted into the codebase, Kura needs to be responsible for the creation of the connection and the Therefore, as we already discussed, the flow should be the following:
This should work because, from what I understand, upon creating the connection the virtual device gets created and therefore Kura is only responsible for creating the connection (which already does). The already existing paradigm should work and I think Kura is already capable of performing what is needed to create the What do you think? Does this looks feasible to you? Additionally, if you have any doubt or just want to speak about this in real-time, we're available for a call on Microsoft Teams. Furthermore we also have the bi-monthly Kura Dev Meeting on the 23rd. Here's the invite, feel free to drop by if you want to :) |
Beta Was this translation helpful? Give feedback.
-
Fair enough :) Right now, a vlan can be created via the configuration map created from a snapshot by NMSettingsConverter with a minimal set of properties like
everything else being optional but supported. The main issue about this is that the current network configuration relies on the assumption that every device is already existing when a connection needs to be created. A possible solution could be adding a new property in NetworkConfigurationService containing the names of all vlan to be managed ( |
Beta Was this translation helpful? Give feedback.
-
That's exactly what I was thinking.
Thing is (and here please, correct me if I'm wrong) when you ask NM to create a connection of the The problem (IMO) can be addressed by adding a check in the This is the intuition that I have but, not having worked on this as you did, might be wrong. |
Beta Was this translation helpful? Give feedback.
-
While there no need to create Device and Connection in separate steps, as the creation of a vlan connection creates the related device, almost every method call (from
Need to correct myself on this: the list of managed vlan can easily be retrieved from |
Beta Was this translation helpful? Give feedback.
-
@mattdibi Forgot to ask at what time the meetup starts, I'd gladly come say hi :) |
Beta Was this translation helpful? Give feedback.
-
Just a recap. We're currently considering the following solution:
@fdizazzo is this correct? @MMaiero @pierantoniomerlino sounds good to you guys? |
Beta Was this translation helpful? Give feedback.
-
Hello there @fdizazzo, first and foremost: thank you for your contribution. The feature discussed in this Discussion was merged. One final thing: while discussing the changes with our Project Lead @MMaiero we changed our mind on our initial plans. To consider the feature "complete" and ready to ship in the next release (which is due in the following weeks) we'd like to have a minimal working UI for creating the VLANs device. A barebone solution would be to add a "+" button in the device list which will show a pop-up where we can fill the VLAN details. That would be enough for us. Do you think you can contribute that too? If not, we'll take care of it. |
Beta Was this translation helpful? Give feedback.
-
Documentation addressed in #4919 |
Beta Was this translation helpful? Give feedback.
Hello there @fdizazzo,
first and foremost: thank you for your contribution. The feature discussed in this Discussion was merged.
One final thing: while discussing the changes with our Project Lead @MMaiero we changed our mind on our initial plans. To consider the feature "complete" and ready to ship in the next release (which is due in the following weeks) we'd like to have a minimal working UI for creating the VLANs device.
A barebone solution would be to add a "+" button in the device list which will show a pop-up where we can fill the VLAN details. That would be enough for us.
Do you think you can contribute that too? If not, we'll take care of it.