@canonical/jujulib
Version:
Juju API client
61 lines (60 loc) • 1.89 kB
JavaScript
/**
Juju UpgradeSteps version 2.
This facade is available on:
Controller-machine-agent
Machine-agent
Unit-agent
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";
/**
UpgradeStepsAPI implements version 2 of the Upgrade Steps API,
which adds WriteUniterState.
*/
class UpgradeStepsV2 {
constructor(transport, info) {
this.NAME = "UpgradeSteps";
this.VERSION = 2;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
ResetKVMMachineModificationStatusIdle sets the modification status
of a kvm machine to idle if it is in an error state before upgrade.
Related to lp:1829393.
*/
resetKVMMachineModificationStatusIdle(params) {
return new Promise((resolve, reject) => {
const req = {
type: "UpgradeSteps",
request: "ResetKVMMachineModificationStatusIdle",
version: 2,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WriteAgentState writes the agent state for the set of units provided. This
call presently deals with the state for the unit agent.
*/
writeAgentState(params) {
return new Promise((resolve, reject) => {
const req = {
type: "UpgradeSteps",
request: "WriteAgentState",
version: 2,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
UpgradeStepsV2.NAME = "UpgradeSteps";
UpgradeStepsV2.VERSION = 2;
export default UpgradeStepsV2;
//# sourceMappingURL=UpgradeStepsV2.js.map