UNPKG

@canonical/jujulib

Version:
60 lines (59 loc) 1.71 kB
/** Juju ModelUpgrader version 1. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Controllers 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"; /** ModelUpgraderAPI implements the model upgrader interface and is the concrete implementation of the api end point. */ class ModelUpgraderV1 { constructor(transport, info) { this.NAME = "ModelUpgrader"; this.VERSION = 1; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** AbortModelUpgrade aborts and archives the model upgrade synchronisation record, if any. */ abortModelUpgrade(params) { return new Promise((resolve, reject) => { const req = { type: "ModelUpgrader", request: "AbortModelUpgrade", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpgradeModel upgrades a model. */ upgradeModel(params) { return new Promise((resolve, reject) => { const req = { type: "ModelUpgrader", request: "UpgradeModel", version: 1, params: params, }; this._transport.write(req, resolve, reject); }); } } ModelUpgraderV1.NAME = "ModelUpgrader"; ModelUpgraderV1.VERSION = 1; export default ModelUpgraderV1; //# sourceMappingURL=ModelUpgraderV1.js.map