UNPKG

@canonical/jujulib

Version:
121 lines (120 loc) 3.69 kB
/** Juju SSHClient version 4. 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"; /** Facade implements the API required by the sshclient worker. */ class SSHClientV4 { constructor(transport, info) { this.NAME = "SSHClient"; this.VERSION = 4; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** AllAddresses reports all addresses that might have SSH listening for each entity in args. The result is sorted with public addresses first. Machines and units are supported as entity types. */ allAddresses(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "AllAddresses", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } /** ModelCredentialForSSH returns a cloud spec for ssh purpose. This facade call is only used for k8s model. */ modelCredentialForSSH(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "ModelCredentialForSSH", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } /** PrivateAddress reports the preferred private network address for one or more entities. Machines and units are supported. */ privateAddress(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "PrivateAddress", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } /** Proxy returns whether SSH connections should be proxied through the controller hosts for the model associated with the API connection. */ proxy(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "Proxy", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } /** PublicAddress reports the preferred public network address for one or more entities. Machines and units are supported. */ publicAddress(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "PublicAddress", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } /** PublicKeys returns the public SSH hosts for one or more entities. Machines and units are supported. */ publicKeys(params) { return new Promise((resolve, reject) => { const req = { type: "SSHClient", request: "PublicKeys", version: 4, params: params, }; this._transport.write(req, resolve, reject); }); } } SSHClientV4.NAME = "SSHClient"; SSHClientV4.VERSION = 4; export default SSHClientV4; //# sourceMappingURL=SSHClientV4.js.map