@canonical/jujulib
Version:
Juju API client
155 lines (154 loc) • 4.76 kB
JavaScript
/**
Juju CAASFirewallerSidecar version 1.
This facade is available on:
Controller-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";
/**
FacadeSidecar provides access to the CAASFirewaller API facade for sidecar applications.
*/
class CAASFirewallerSidecarV1 {
constructor(transport, info) {
this.NAME = "CAASFirewallerSidecar";
this.VERSION = 1;
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: "CAASFirewallerSidecar",
request: "ApplicationCharmInfo",
version: 1,
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: "CAASFirewallerSidecar",
request: "ApplicationsConfig",
version: 1,
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: "CAASFirewallerSidecar",
request: "CharmInfo",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
GetOpenedPorts returns all the opened ports for each given application tag.
*/
getOpenedPorts(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASFirewallerSidecar",
request: "GetOpenedPorts",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
IsExposed returns whether the specified applications are exposed.
*/
isExposed(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASFirewallerSidecar",
request: "IsExposed",
version: 1,
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: "CAASFirewallerSidecar",
request: "Life",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
Watch starts an NotifyWatcher for each given entity.
*/
watch(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASFirewallerSidecar",
request: "Watch",
version: 1,
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: "CAASFirewallerSidecar",
request: "WatchApplications",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
WatchOpenedPorts returns a new StringsWatcher for each given
model tag.
*/
watchOpenedPorts(params) {
return new Promise((resolve, reject) => {
const req = {
type: "CAASFirewallerSidecar",
request: "WatchOpenedPorts",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
CAASFirewallerSidecarV1.NAME = "CAASFirewallerSidecar";
CAASFirewallerSidecarV1.VERSION = 1;
export default CAASFirewallerSidecarV1;
//# sourceMappingURL=CAASFirewallerSidecarV1.js.map