UNPKG

@canonical/jujulib

Version:
154 lines (152 loc) 4.94 kB
/** Juju InstanceMutater version 2. 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.0-beta1 at the git SHA 61c87ab7e1. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** */ class InstanceMutaterV2 { constructor(transport, info) { this.NAME = "InstanceMutater"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** CharmProfilingInfo returns info to update lxd profiles on the machine. If the machine is not provisioned, no profile change info will be returned, nor will an error. */ charmProfilingInfo(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "CharmProfilingInfo", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ContainerType returns the container type of a machine. */ containerType(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "ContainerType", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** Life returns the life status of every supplied entity, where available. */ life(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "Life", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetCharmProfiles records the given slice of charm profile names. */ setCharmProfiles(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "SetCharmProfiles", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetModificationStatus updates the instance whilst changes are occurring. This is different from SetStatus and SetInstanceStatus, by the fact this holds information about the ongoing changes that are happening to instances. Consider LXD Profile updates that can modify a instance, but may not cause the instance to be placed into a error state. This modification status serves the purpose of highlighting that to the operator. Only machine tags are accepted. */ setModificationStatus(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "SetModificationStatus", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchContainers starts a watcher to track Containers on a given machine. */ watchContainers(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "WatchContainers", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchLXDProfileVerificationNeeded starts a watcher to track Applications with LXD Profiles. */ watchLXDProfileVerificationNeeded(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "WatchLXDProfileVerificationNeeded", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchMachines starts a watcher to track machines. WatchMachines does not consume the initial event of the watch response, as that returns the initial set of machines that are currently available. */ watchMachines(params) { return new Promise((resolve, reject) => { const req = { type: "InstanceMutater", request: "WatchMachines", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } InstanceMutaterV2.NAME = "InstanceMutater"; InstanceMutaterV2.VERSION = 2; export default InstanceMutaterV2; //# sourceMappingURL=InstanceMutaterV2.js.map