MCPcopy
hub / github.com/lxc/incus / UpdateNodeConfig

Method UpdateNodeConfig

internal/server/db/node.go:668–675  ·  view source on GitHub ↗

UpdateNodeConfig updates the replaces the node's config with the specified config.

(ctx context.Context, id int64, config map[string]string)

Source from the content-addressed store, hash-verified

666
667// UpdateNodeConfig updates the replaces the node's config with the specified config.
668func (c *ClusterTx) UpdateNodeConfig(ctx context.Context, id int64, config map[string]string) error {
669 err := cluster.UpdateConfig(ctx, c.Tx(), "nodes", "node", int(id), config)
670 if err != nil {
671 return fmt.Errorf("Unable to update node config: %w", err)
672 }
673
674 return nil
675}
676
677// UpdateNodeRoles changes the list of roles on a member.
678func (c *ClusterTx) UpdateNodeRoles(id int64, roles []ClusterRole) error {

Callers 1

updateClusterNodeFunction · 0.80

Calls 3

TxMethod · 0.95
UpdateConfigFunction · 0.92
ErrorfMethod · 0.80

Tested by

no test coverage detected