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.0

This 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.

In pins 6 + flow
  • flow
    flow
  • Hostname required
    value

    The hostname or IP address of the LXD server you want to connect to.

  • Port required
    number

    The port number on which the LXD server is listening for API requests, typically "8443".

  • Client Key required
    file

    The private client .key file used for secure authentication with the LXD server.

  • Client Certificate required
    file

    The public client .crt file corresponding to the private key, used for mutual TLS authentication.

  • Certificate Authority required
    file

    The Certificate Authority (CA) .crt file used to verify the LXD server’s identity during TLS communication.

  • Reject Unauthorized
    condition

    A boolean option to enable or disable rejection of unauthorized server certificates. Set to "true" for strict validation.

Out pins 3 + flow
  • flow
    flow
  • Connection
    lxdconnection

    The LXD connection with the server

  • Success
    condition

    If successful, return true.

  • Error
    value

    Error 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.

Studio canvas example for the open connection block: typical wiring for open connection.

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