Skip to content

Commit c26da0f

Browse files
committed
add empty node spec when addnode with nil option
1 parent 80f091e commit c26da0f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

resource/cobalt/node.go

+3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ func (m Manager) AddNode(ctx context.Context, nodename string, opts resourcetype
3232
func(ctx context.Context) error {
3333
resps, err := call(ctx, m.plugins, func(plugin plugins.Plugin) (*plugintypes.AddNodeResponse, error) {
3434
r := opts[plugin.Name()]
35+
if r == nil {
36+
return &plugintypes.AddNodeResponse{}, nil
37+
}
3538
logger.WithField("plugin", plugin.Name()).WithField("node", nodename).Infof(ctx, "%v", litter.Sdump(r))
3639
resp, err := plugin.AddNode(ctx, nodename, r, nodeInfo)
3740
if err != nil {

0 commit comments

Comments
 (0)