packetfence icon indicating copy to clipboard operation
packetfence copied to clipboard

Switch without Switch Group?

Open JeGoi opened this issue 3 years ago • 6 comments

Describe the bug When you create a switch you need to choose a switch group After that point, you can remove that switch group but the switch looks still linked to this group. In the config the "group=" is not here.

To Reproduce Steps to reproduce the behavior:

  1. Create the switch
  2. Renove the group
  3. Show in switch group or in the tab switch, the switch is still linked to the group

Expected behavior Goup empty or Remove the option to have a switch without group

JeGoi avatar Aug 20 '21 14:08 JeGoi

It looks that "no group" = "default"

JeGoi avatar Aug 20 '21 14:08 JeGoi

AFAIK we've never enforced a group for a switch. Should a validator be added to prevent the group from being cleared/empty?

satkunas avatar Aug 20 '21 14:08 satkunas

No we shouldn't, an empty group uses the default section

If we want to enforce this we need to also add a default group value in the switches.conf.defaults, not just adjust the frontend

Lets leave this aside for now IMO so that we don't introduce a regression

julsemaan avatar Aug 20 '21 15:08 julsemaan

I am not seeing that exact behavior.

After clearing the group I see the group is gone in the config (which is what is expected).

I don't see how this is a bug.

jrouzierinverse avatar Aug 20 '21 18:08 jrouzierinverse

Yes, you are right. It is removed from the config file but in the GUI and as mentioned by @julsemaan, the switch is using the default section. So, at the end, the switch is still in a group (default) and a member of it. It is not without a group.

JeGoi avatar Aug 20 '21 19:08 JeGoi

@JeGoi can we close this issue?

satkunas avatar Aug 05 '22 15:08 satkunas