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

Method CreateNodeWithArch

internal/server/db/node.go:617–621  ·  view source on GitHub ↗

CreateNodeWithArch is the same as NodeAdd, but lets setting the node architecture explicitly.

(name string, address string, arch int)

Source from the content-addressed store, hash-verified

615// CreateNodeWithArch is the same as NodeAdd, but lets setting the node
616// architecture explicitly.
617func (c *ClusterTx) CreateNodeWithArch(name string, address string, arch int) (int64, error) {
618 columns := []string{"name", "address", "schema", "api_extensions", "arch", "description"}
619 values := []any{name, address, cluster.SchemaVersion, version.APIExtensionsCount(), arch, ""}
620 return query.UpsertObject(c.tx, "nodes", columns, values)
621}
622
623// SetNodePendingFlag toggles the pending flag for the node. A node is pending when
624// it's been accepted in the cluster, but has not yet actually joined it.

Callers 4

CreateNodeMethod · 0.95
AcceptFunction · 0.80

Calls 2

APIExtensionsCountFunction · 0.92
UpsertObjectFunction · 0.92