UNPKG

@canonical/jujulib

Version:
87 lines (86 loc) 2.44 kB
/** Juju Client version 7. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Models NOTE: This file was generated using the Juju schema from Juju 3.3 at the git SHA 65fa4c1ee5. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** Client serves client-specific API methods. */ class ClientV7 { constructor(transport, info) { this.NAME = "Client"; this.VERSION = 7; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** FindTools returns a List containing all tools matching the given parameters. TODO(juju 3.1) - remove, used by 2.9 client only */ findTools(params) { return new Promise((resolve, reject) => { const req = { type: "Client", request: "FindTools", version: 7, params: params, }; this._transport.write(req, resolve, reject); }); } /** FullStatus gives the information needed for juju status over the api */ fullStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Client", request: "FullStatus", version: 7, params: params, }; this._transport.write(req, resolve, reject); }); } /** StatusHistory returns a slice of past statuses for several entities. */ statusHistory(params) { return new Promise((resolve, reject) => { const req = { type: "Client", request: "StatusHistory", version: 7, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchAll initiates a watcher for entities in the connected model. */ watchAll(params) { return new Promise((resolve, reject) => { const req = { type: "Client", request: "WatchAll", version: 7, params: params, }; this._transport.write(req, resolve, reject); }); } } ClientV7.NAME = "Client"; ClientV7.VERSION = 7; export default ClientV7; //# sourceMappingURL=ClientV7.js.map