UNPKG

@canonical/jujulib

Version:
75 lines (74 loc) 2.1 kB
/** Juju Subnets version 5. 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 provides the subnets API facade for version 5. */ class SubnetsV5 { constructor(transport, info) { this.NAME = "Subnets"; this.VERSION = 5; this._transport = transport; this._info = info; // Automatically bind all methods to instances. autoBind(this); } /** 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: 5, 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: 5, 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: 5, params: params, }; this._transport.write(req, resolve, reject); }); } } SubnetsV5.NAME = "Subnets"; SubnetsV5.VERSION = 5; export default SubnetsV5; //# sourceMappingURL=SubnetsV5.js.map