Skip to content

Commit

Permalink
microovn/api: Add MicroOVN extensions system for MicroCluster
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>

microovn/cmd/microovnd: Pass the MicroOVN extensions map to the MicroCluster initialization process.

Signed-off-by: Gabriel Mougard <gabriel.mougard@canonical.com>
  • Loading branch information
gabrielmougard committed Jun 10, 2024
1 parent 715009c commit fdfc65c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions microovn/api/extensions.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package api

var extensions = []string{
"custom_encapsulation_ip",
}

// Extensions returns the list of MicroOVN extensions.
func Extensions() []string {
return extensions
}
2 changes: 1 addition & 1 deletion microovn/cmd/microovnd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (c *cmdDaemon) Run(cmd *cobra.Command, args []string) error {
h.PostRemove = func(s *state.State, force bool) error { return ovn.Refresh(s) }
h.OnStart = ovn.Start

return m.Start(context.Background(), api.Endpoints, database.SchemaExtensions, []string{}, h)
return m.Start(context.Background(), api.Endpoints, database.SchemaExtensions, api.Extensions(), h)
}

func init() {
Expand Down

0 comments on commit fdfc65c

Please sign in to comment.