Skip to content
Snippets Groups Projects

Resolve "Plugin is created and persisted in the database even if the creation of a network element failed"

1 file
+ 1
1
Compare changes
  • Side-by-side
  • Inline
@@ -31,7 +31,7 @@ func NewPlugin(id uuid.UUID, execPath string) (*Plugin, error) {
@@ -31,7 +31,7 @@ func NewPlugin(id uuid.UUID, execPath string) (*Plugin, error) {
client := hcplugin.NewClient(&hcplugin.ClientConfig{
client := hcplugin.NewClient(&hcplugin.ClientConfig{
HandshakeConfig: shared.Handshake,
HandshakeConfig: shared.Handshake,
Plugins: shared.PluginMap,
Plugins: shared.PluginMap,
Cmd: exec.Command("sh", "-c", filepath.Join(execPath, util.PluginExecutableName)),
Cmd: exec.Command(filepath.Join(execPath, util.PluginExecutableName)),
AllowedProtocols: []hcplugin.Protocol{hcplugin.ProtocolGRPC},
AllowedProtocols: []hcplugin.Protocol{hcplugin.ProtocolGRPC},
})
})
Loading