open connection
This block is part of the virtualisation group and was last modified in core v15.0.0.
open connection v13.0.9 Updated v15.0.0This block is used to open a connection to a LXD or Incus server. Incus is the fork of LXD and answers the same API, so one connection serves both.
- flow
flow - Hostname required
valueThe hostname or IP address of the LXD server you want to connect to.
- Port required
numberThe port number on which the LXD server is listening for API requests, typically "8443".
- Client Key required
fileThe private client .key file used for secure authentication with the LXD server.
- Client Certificate required
fileThe public client .crt file corresponding to the private key, used for mutual TLS authentication.
- Certificate Authority required
fileThe Certificate Authority (CA) .crt file used to verify the LXD server’s identity during TLS communication.
- Reject Unauthorized
conditionA boolean option to enable or disable rejection of unauthorized server certificates. Set to "true" for strict validation.
- flow
flow - Connection
lxdconnectionThe LXD connection with the server
- Success
conditionIf successful, return true.
- Error
valueError message if the connection could not be established.
Opens a mutual-TLS connection to an LXD or Incus REST API (default port 8443) and publishes it on the connection pin for the other lxdconnection_* blocks to consume. Takes three PEM files from the entity's file store: the client key, the client certificate, and the server's certificate (used as the CA). The client certificate must already be trusted by the server -- on Incus that is `incus config trust add` -- otherwise every later call answers as untrusted rather than failing here. reject_unauthorized off skips server certificate verification; on, the certificate_authority file must validate the server. The connection pin carries only file paths and a cache key, never key material.
A typical wiring for open connection: a function trigger starts the flow; value feeds the hostname pin; number feeds the port pin; get file from assets feeds the client_key pin; get file from assets feeds the client_certificate pin; get file from assets feeds the certificate_authority pin; the flow out pin feeds debug.

Version history
Introduced in v13.0.9.
Last modified in v15.0.0.
Back to
virtualisation Return to the main group to view all sub-groups Back to LXD Return to the group to view all blocks within this group
