@canonical/jujulib
Version:
Juju API client
60 lines (59 loc) • 1.68 kB
JavaScript
/**
Juju MigrationFlag 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";
/**
Facade lets clients watch and get models' migration phases.
*/
class MigrationFlagV1 {
constructor(transport, info) {
this.NAME = "MigrationFlag";
this.VERSION = 1;
this._transport = transport;
this._info = info;
// Automatically bind all methods to instances.
autoBind(this);
}
/**
Phase returns the current migration phase or an error for every
supplied entity.
*/
phase(params) {
return new Promise((resolve, reject) => {
const req = {
type: "MigrationFlag",
request: "Phase",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
/**
Watch returns an id for use with the NotifyWatcher facade, or an
error, for every supplied entity.
*/
watch(params) {
return new Promise((resolve, reject) => {
const req = {
type: "MigrationFlag",
request: "Watch",
version: 1,
params: params,
};
this._transport.write(req, resolve, reject);
});
}
}
MigrationFlagV1.NAME = "MigrationFlag";
MigrationFlagV1.VERSION = 1;
export default MigrationFlagV1;
//# sourceMappingURL=MigrationFlagV1.js.map