lxd/db/node.go
func (c *ClusterTx) NodePending(id int64, pending bool) error {
	value := 0
	if pending {
		value = 1
	}
	result, err := c.tx.Exec("UPDATE nodes SET pending=? WHERE id=?", value, id)
	if err != nil {
		return err
	}
	n, err := result.RowsAffected()
	if err != nil {
		return err
	}
	if n != 1 {
		return fmt.Errorf("query updated %d rows instead of 1", n)
	}
	return nil
}
func (c *ClusterTx) NodePending(id int64, pending bool) error {
	value := 0
	if pending {
		value = 1
	}
	result, err := c.tx.Exec("UPDATE nodes SET pending=? WHERE id=?", value, id)
	if err != nil {
		return err
	}
	n, err := result.RowsAffected()
	if err != nil {
		return err
	}
	if n != 1 {
		return fmt.Errorf("query updated %d rows instead of 1", n)
	}
	return nil
}
func ( c * ClusterTx ) NodePending ( id int64 , pending bool ) error { value := 0 if pending { value = 1 } result , err := c . tx . Exec ( " " , value , id ) if err != nil { return err } n , err := result . RowsAffected ( ) if err != nil { return err } if n != 1 { return fmt . Errorf ( " " , n ) } return nil }
// NodePending toggles the pending flag for the node. A node is pending when
// it's been accepted in the cluster, but has not yet actually joined it.
NodePending toggles the pending flag for the node . A node is pending when it s been accepted in the cluster but has not yet actually joined it .