UNPKG

@canonical/jujulib

Version:

Juju API client

275 lines (273 loc) 8.58 kB
/** Juju CAASUnitProvisioner 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.3 at the git SHA 65fa4c1ee5. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** */ class CAASUnitProvisionerV2 { constructor(transport, info) { this.NAME = "CAASUnitProvisioner"; this.VERSION = 2; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** ApplicationCharmInfo returns information about an application's charm. */ applicationCharmInfo(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ApplicationCharmInfo", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ApplicationsConfig returns the config for the specified applications. */ applicationsConfig(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ApplicationsConfig", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ApplicationsScale returns the scaling info for specified applications in this model. */ applicationsScale(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ApplicationsScale", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ApplicationsTrust returns the trust status for specified applications in this model. */ applicationsTrust(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ApplicationsTrust", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** CharmInfo returns information about the requested charm. */ charmInfo(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "CharmInfo", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ClearApplicationsResources clears the flags which indicate applications still have resources in the cluster. */ clearApplicationsResources(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ClearApplicationsResources", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** DeploymentMode returns the deployment mode of the given applications' charms. */ deploymentMode(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "DeploymentMode", 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: "CAASUnitProvisioner", request: "Life", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** ProvisioningInfo returns the provisioning info for specified applications in this model. */ provisioningInfo(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "ProvisioningInfo", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetOperatorStatus updates the operator status for each given application. */ setOperatorStatus(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "SetOperatorStatus", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpdateApplicationsService updates the Juju data model to reflect the given service details of the specified application. */ updateApplicationsService(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "UpdateApplicationsService", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpdateApplicationsUnits updates the Juju data model to reflect the given units of the specified application. */ updateApplicationsUnits(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "UpdateApplicationsUnits", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** Watch starts a NotifyWatcher for each entity given. */ watch(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "Watch", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchApplications starts a StringsWatcher to watch applications deployed to this model. */ watchApplications(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "WatchApplications", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchApplicationsScale starts a NotifyWatcher to watch changes to the applications' scale. */ watchApplicationsScale(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "WatchApplicationsScale", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchApplicationsTrustHash starts a StringsWatcher to watch changes to the applications' trust status. */ watchApplicationsTrustHash(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "WatchApplicationsTrustHash", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchPodSpec starts a NotifyWatcher to watch changes to the pod spec for specified units in this model. */ watchPodSpec(params) { return new Promise((resolve, reject) => { const req = { type: "CAASUnitProvisioner", request: "WatchPodSpec", version: 2, params: params, }; this._transport.write(req, resolve, reject); }); } } CAASUnitProvisionerV2.NAME = "CAASUnitProvisioner"; CAASUnitProvisionerV2.VERSION = 2; export default CAASUnitProvisionerV2; //# sourceMappingURL=CAASUnitProvisionerV2.js.map