CrystaLXD::Client
Inherits Struct < Value < Object
Raise an Exception on an error.
CrystaLXD::Client.new(
tls: OpenSSL::SSL::Context::Client.from_hash({
"key" => "certs/lxd.key",
"cert" => "certs/lxd.crt",
"verify_mode" => "none",
})
)
Constructors
new(tls : OpenSSL::SSL::Context::Client, host : String = "::1", port : Int32 = 8443, path : String = "/")
Instance methods
api_path
container(name : String) : Container
Instantiates a new container wrapper.
containers(url : Bool = false) : Success(Array(String)) | Error
List of containers, or URLs of containers, this server publishes (https://github.com/lxc/lxd/blob/master/doc/rest-api.md#get-4).
delete(klass : U.class, path : String = "", body = nil) : Success(U) | Error forall U
get(klass : U.class, path : String = "", body = nil) : Success(U) | Error forall U
http_client
information
Server configuration and environment information (https://github.com/lxc/lxd/blob/master/doc/rest-api.md#get-1).
operation(operation_or_uuid : Success(BackgroundOperation) | Error | String) : Operation
Instantiates a new operation wrapper.
operations(url : Bool = false) : Success(Hash(Success::Code, Array(String))) | Error
List of operations, or URLs of operations, that are currently going on/queued https://github.com/lxc/lxd/blob/master/doc/rest-api.md#get-23
parse_response(klass : U.class, response) : Success(U) | Error forall U
patch(klass : U.class, path : String = "", body = nil) : Success(U) | Error forall U
post(klass : U.class, path : String = "", body = nil) : Success(U) | Error forall U
put(klass : U.class, path : String = "", body = nil) : Success(U) | Error forall U
websocket(path : String)