@canonical/jujulib
Version:
Juju API client
89 lines (88 loc) • 2.49 kB
JavaScript
/**
Juju Subnets version 4.
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-beta4 at the git SHA a13ab81a.
Do not manually edit this file.
*/
import { autoBind } from "../../utils.js";
/**
API provides the subnets API facade for version 4.
*/
class SubnetsV4 {
constructor(transport, info) {
this.NAME = "Subnets";
this.VERSION = 4;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
AddSubnets adds existing subnets to Juju.
*/
addSubnets(params) {
return new Promise((resolve, reject) => {
const req = {
type: "Subnets",
request: "AddSubnets",
version: 4,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
AllZones returns all availability zones known to Juju. If a
zone is unusable, unavailable, or deprecated the Available
field will be false.
*/
allZones(params) {
return new Promise((resolve, reject) => {
const req = {
type: "Subnets",
request: "AllZones",
version: 4,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
ListSubnets returns the matching subnets after applying
optional filters.
*/
listSubnets(params) {
return new Promise((resolve, reject) => {
const req = {
type: "Subnets",
request: "ListSubnets",
version: 4,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
SubnetsByCIDR returns the collection of subnets matching each CIDR in the input.
*/
subnetsByCIDR(params) {
return new Promise((resolve, reject) => {
const req = {
type: "Subnets",
request: "SubnetsByCIDR",
version: 4,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
SubnetsV4.NAME = "Subnets";
SubnetsV4.VERSION = 4;
export default SubnetsV4;
//# sourceMappingURL=SubnetsV4.js.map