[Neutron] [train] Horizon port security group management fails

Brendan Shephard bshephar at redhat.com
Fri Sep 16 00:56:48 UTC 2022


Hey Radomir

My replies keep getting blocked because they’re too big. I’ll summarise and then you will all get spammed if someone decides to approve my other replies. In our case, I had already tried that patch and it doesn’t resolve this particular issue. The problem I see is that we need to compare the fields in our params with what already exists on the port. Then not send fields that are unchanged. This diff resolved the issue we’re discussing here:

❯ diff horizon/openstack_dashboard/dashboards/project/networks/ports/workflows.py workflows.py
411c411
<         params = self._construct_parameters(data)
---
>         params = self._construct_parameters(request, data)
420c420
<     def _construct_parameters(self, data):
---
>     def _construct_parameters(self, request, data):
424a425,426
>         LOG.info("bshephar - Data variable = %s", data)
>         initial = api.neutron.port_get(request, self.context['port_id'])
431c433,434
<         if data['port_security_enabled'] is not None:
---
>         if (data['port_security_enabled'] is not None and data['port_security_enabled']
>             != initial['port_security_enabled']):


This probably isn’t a solution you guys would want to merge. But it demonstrates a working solution to the problem that we’re discussing.

Brendan Shephard
Senior Software Engineer
Brisbane, Australia



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.openstack.org/pipermail/openstack-discuss/attachments/20220916/a7e382f1/attachment.htm>


More information about the openstack-discuss mailing list