@canonical/jujulib
Version:
Juju API client
133 lines (132 loc) • 4.21 kB
JavaScript
/**
Juju CAASModelOperator version 1.
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";
/**
API represents the controller model operator facade.
*/
class CAASModelOperatorV1 {
constructor(transport, info) {
this.NAME = "CAASModelOperator";
this.VERSION = 1;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
APIAddresses returns the list of addresses used to connect to the API.
*/
aPIAddresses(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "APIAddresses",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
APIHostPorts returns the API server addresses.
*/
aPIHostPorts(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "APIHostPorts",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
ModelOperatorProvisioningInfo returns the information needed for provisioning
a new model operator into a caas cluster.
*/
modelOperatorProvisioningInfo(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "ModelOperatorProvisioningInfo",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
ModelUUID returns the model UUID that this facade is used to operate.
It is implemented here directly as a result of removing it from
embedded APIAddresser *without* bumping the facade version.
It should be blanked when this facade version is next incremented.
*/
modelUUID(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "ModelUUID",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
SetPasswords sets the given password for each supplied entity, if possible.
*/
setPasswords(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "SetPasswords",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WatchAPIHostPorts watches the API server addresses.
*/
watchAPIHostPorts(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "WatchAPIHostPorts",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WatchModelOperatorProvisioningInfo provides a watcher for changes that affect the
information returned by ModelOperatorProvisioningInfo.
*/
watchModelOperatorProvisioningInfo(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASModelOperator",
request: "WatchModelOperatorProvisioningInfo",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
CAASModelOperatorV1.NAME = "CAASModelOperator";
CAASModelOperatorV1.VERSION = 1;
export default CAASModelOperatorV1;
//# sourceMappingURL=CAASModelOperatorV1.js.map