lxc.client

LXC http client see https://github.com/lxc/lxd/blob/master/doc/rest-api.md

Using p12 file format cert that can be created from lxc key and crt files:

  openssl pkcs12 -export -out certificate.p12 -inkey client.key -in client.crt -certfile servercerts/127.0.0.1.crt

action

(action op)

async-status

(async-status node {:keys [operation], :as m})
Poll for async container operations return final status

change-state

(change-state node name op)
Change container state

context

(context {:keys [path p12 password crt]})

create

(create node container)
Create container using http api

delete

(delete node {:keys [name]})
Get container information

get

(get node {:keys [name]})
Get container information

image

(image node fingerprint)
Get image information

into-body

(into-body m)

into-names

(into-names {:keys [metadata]})

into-status

(into-status s)

ip

(ip node container)

list

(list node)
List containers in lxd instance

max-async-attempts

parse

(parse response)

run

(run verb endpoint node)(run verb endpoint {:keys [host port], :as node} opts)

ssl-opts

(ssl-opts node)

start

(start node {:keys [name]})
start container

state

(state node {:keys [name]})
Get container current state

status

(status node container)

stop

(stop node {:keys [name]})
stop container

wait-for-ip

(wait-for-ip node container timeout)