Skip to content

Commit

Permalink
add empty node spec when addnode with nil option
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed May 23, 2023
1 parent 80f091e commit c26da0f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resource/cobalt/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func (m Manager) AddNode(ctx context.Context, nodename string, opts resourcetype
func(ctx context.Context) error {
resps, err := call(ctx, m.plugins, func(plugin plugins.Plugin) (*plugintypes.AddNodeResponse, error) {
r := opts[plugin.Name()]
if r == nil {
return &plugintypes.AddNodeResponse{}, nil
}
logger.WithField("plugin", plugin.Name()).WithField("node", nodename).Infof(ctx, "%v", litter.Sdump(r))
resp, err := plugin.AddNode(ctx, nodename, r, nodeInfo)
if err != nil {
Expand Down

0 comments on commit c26da0f

Please sign in to comment.