@canonical/jujulib
Version:
Juju API client
168 lines (166 loc) • 5.51 kB
JavaScript
/**
Juju InstanceMutater version 3.
This facade is available on:
Controller-machine-agent
Machine-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";
/**
*/
class InstanceMutaterV3 {
constructor(transport, info) {
this.NAME = "InstanceMutater";
this.VERSION = 3;
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: 3,
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: 3,
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: 3,
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: 3,
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: 3,
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: 3,
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: 3,
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: 3,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WatchModelMachines starts a watcher to track machines, but not containers.
WatchModelMachines does not consume the initial event of the watch response, as
that returns the initial set of machines that are currently available.
*/
watchModelMachines(params) {
return new Promise((resolve, reject) => {
const req = {
type: "InstanceMutater",
request: "WatchModelMachines",
version: 3,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
InstanceMutaterV3.NAME = "InstanceMutater";
InstanceMutaterV3.VERSION = 3;
export default InstanceMutaterV3;
//# sourceMappingURL=InstanceMutaterV3.js.map