Skip to content

Conversation

gthvn1
Copy link
Contributor

@gthvn1 gthvn1 commented Apr 9, 2025

This plugin allows to add, delete and dump openflow rules for a given bridge.

@gthvn1 gthvn1 self-assigned this Apr 9, 2025
@gthvn1 gthvn1 marked this pull request as draft April 9, 2025 09:16
@gthvn1
Copy link
Contributor Author

gthvn1 commented Apr 9, 2025

This is just the boiler plate for expected functions to show what is expected. We still need to:

  • call ovs-ofctl with correct parameters
    • add rule for a given bridge
    • delete rule for a given bridge
    • dump all flows for a given bridge
  • add tests

@gthvn1 gthvn1 force-pushed the gtn-open-vswitch branch 2 times, most recently from 97e4d95 to ace8d98 Compare April 10, 2025 09:31
@olivierlambert
Copy link
Member

Quick question: I suppose that at some point, for very useful plugins, we'd like to get them as "first class citizen" in XAPI, ie doing it directly in XAPI instead of relying on a plugin, right? (but plugins are convenient to start doing it to see if it's the right approach)

@gthvn1
Copy link
Contributor Author

gthvn1 commented Apr 10, 2025

Yes exactly. If we need to go further than applying openflow rules and validate the approach we will need to investigate more time and move the open vswitch things directly within xapi.

@stormi
Copy link
Member

stormi commented Apr 10, 2025

Additionnally, we'll likely want XAPI to re-enable the openvswitch configuration automatically when it starts, without relying on XO to detect that it has to be done and to call the plugin, after each reboot of a host.

So yes, there's an identified topic regarding the SDN controller and XAPI.

fbeauchamp added a commit to vatesfr/xen-orchestra that referenced this pull request Apr 14, 2025
@gthvn1 gthvn1 force-pushed the gtn-open-vswitch branch 5 times, most recently from 510989f to 29b5673 Compare April 15, 2025 13:49
@gthvn1 gthvn1 changed the title Add a new open vswitch plugin Add a new SDN controller plugin Apr 15, 2025
@gthvn1 gthvn1 force-pushed the gtn-open-vswitch branch 2 times, most recently from 11b3d4e to bdb837f Compare April 15, 2025 16:13
@error_wrapped
def add_rule(_session, args):
_LOGGER.info("Calling add rule with args {}".format(args))
_LOGGER.info("Calling del rule with args {}".format(args))
Copy link
Contributor Author

@gthvn1 gthvn1 May 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"add" was correct IIUC

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, there was some mistakes and I messed up when correcting them, thanks.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed.

@bleader bleader force-pushed the gtn-open-vswitch branch 3 times, most recently from 8727564 to 6c04f2a Compare May 16, 2025 15:51
@bleader bleader force-pushed the gtn-open-vswitch branch 2 times, most recently from 873f7ac to 3dfc52c Compare May 23, 2025 14:09
@bleader bleader assigned bleader and gthvn1 and unassigned gthvn1 May 23, 2025
@bleader bleader removed the request for review from Wescoeur May 23, 2025 14:22
@gthvn1 gthvn1 marked this pull request as ready for review May 23, 2025 15:12
Copy link

@last-genius last-genius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not the best person to review Python code, but I didn't notice anything bad jumping out at me.

@bleader bleader force-pushed the gtn-open-vswitch branch from 182667d to 16c23d6 Compare June 12, 2025 15:51
@bleader bleader force-pushed the gtn-open-vswitch branch from 89ac750 to 1ff6b14 Compare June 16, 2025 14:32
This plugin allows to add and delete rules. A rule will be converted
into one or more openflow rules. Once converted they are applied using
ovs-vsctl command. To be able to validate the application of openflow
rules the plugins allows to dump them.

Signed-off-by: Guillaume <guillaume.thouvenin@vates.tech>
Signed-off-by: David Morel <david.morel@vates.tech>
@bleader bleader force-pushed the gtn-open-vswitch branch from d04eee7 to 836bb4b Compare June 16, 2025 15:33
@bleader bleader merged commit 5368a7e into master Jun 16, 2025
4 checks passed
@bleader bleader deleted the gtn-open-vswitch branch June 16, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants