UNPKG

@canonical/jujulib

Version:
1,409 lines (1,404 loc) 44.2 kB
/** Juju Uniter version 16. This facade is available on: Controller-machine-agent Machine-agent Unit-agent Models NOTE: This file was generated using the Juju schema from Juju 2.8.2 at the git SHA 516c1904ce. Do not manually edit this file. */ import { autoBind } from "../../utils.js"; /** UniterAPI implements the latest version (v16) of the Uniter API, which adds LXDProfileAPIv2. */ class UniterV16 { constructor(transport, info) { this.NAME = "Uniter"; this.VERSION = 16; 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: "Uniter", request: "APIAddresses", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** APIHostPorts returns the API server addresses. */ aPIHostPorts(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "APIHostPorts", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ActionStatus returns the status of Actions by Tags passed in. */ actionStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ActionStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Actions returns the Actions by Tags passed and ensures that the Unit asking for them is the same Unit that has the Actions. */ actions(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Actions", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** AddMetricBatches adds the metrics for the specified unit. */ addMetricBatches(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "AddMetricBatches", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** AddUnitStorage validates and creates additional storage instances for units. Failures on an individual storage instance do not block remaining instances from being processed. */ addUnitStorage(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "AddUnitStorage", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** AllMachinePorts returns all opened port ranges for each given machine (on all networks). */ allMachinePorts(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "AllMachinePorts", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ApplicationStatus returns the status of the Applications and its workloads if the given unit is the leader. */ applicationStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ApplicationStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** AssignedMachine returns the machine tag for each given unit tag, or an error satisfying params.IsCodeNotAssigned when a unit has no assigned machine. */ assignedMachine(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "AssignedMachine", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** AvailabilityZone returns the availability zone for each given unit, if applicable. */ availabilityZone(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "AvailabilityZone", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** BeginActions marks the actions represented by the passed in Tags as running. */ beginActions(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "BeginActions", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CanApplyLXDProfile is a shim to call the LXDProfileAPIv2 version of this method. */ canApplyLXDProfile(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CanApplyLXDProfile", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CharmArchiveSha256 returns the SHA256 digest of the charm archive (bundle) data for each charm url in the given parameters. */ charmArchiveSha256(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CharmArchiveSha256", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CharmModifiedVersion returns the most CharmModifiedVersion for all given units or applications. */ charmModifiedVersion(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CharmModifiedVersion", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CharmURL returns the charm URL for all given units or applications. */ charmURL(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CharmURL", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ClearResolved removes any resolved setting from each given unit. */ clearResolved(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ClearResolved", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ClosePorts sets the policy of the port range with protocol to be closed, for all given units. */ closePorts(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ClosePorts", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CloudAPIVersion returns the cloud API version, if available. */ cloudAPIVersion(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CloudAPIVersion", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CloudSpec returns the cloud spec used by the model in which the authenticated unit or application resides. A check is made beforehand to ensure that the request is made by an entity that has been granted the appropriate trust. */ cloudSpec(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CloudSpec", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CommitHookChanges batches together all required API calls for applying a set of changes after a hook successfully completes and executes them in a single transaction. */ commitHookChanges(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CommitHookChanges", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ConfigSettings returns the complete set of application charm config settings available to each given unit. */ configSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ConfigSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** CurrentModel returns the name and UUID for the current juju model. */ currentModel(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "CurrentModel", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Destroy advances all given Alive units' lifecycles as far as possible. See state/Unit.Destroy(). */ destroy(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Destroy", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** DestroyAllSubordinates destroys all subordinates of each given unit. */ destroyAllSubordinates(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "DestroyAllSubordinates", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** DestroyUnitStorageAttachments marks each storage attachment of the specified units as Dying. */ destroyUnitStorageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "DestroyUnitStorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** EnsureDead calls EnsureDead on each given entity from state. It will fail if the entity is not present. If it's Alive, nothing will happen (see state/EnsureDead() for units or machines). */ ensureDead(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "EnsureDead", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** EnterScope ensures each unit has entered its scope in the relation, for all of the given relation/unit pairs. See also state.RelationUnit.EnterScope(). */ enterScope(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "EnterScope", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** FinishActions saves the result of a completed Action */ finishActions(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "FinishActions", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** */ getMeterStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "GetMeterStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** GetPodSpec gets the pod specs for a set of applications. */ getPodSpec(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "GetPodSpec", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** GetPrincipal returns the result of calling PrincipalName() and converting it to a tag, on each given unit. */ getPrincipal(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "GetPrincipal", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** GetRawK8sSpec gets the raw k8s specs for a set of applications. */ getRawK8sSpec(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "GetRawK8sSpec", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** GoalStates returns information of charm units and relations. */ goalStates(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "GoalStates", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** HasSubordinates returns the whether each given unit has any subordinates. */ hasSubordinates(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "HasSubordinates", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** LXDProfileName is a shim to call the LXDProfileAPIv2 version of this method. */ lXDProfileName(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "LXDProfileName", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** LXDProfileRequired is a shim to call the LXDProfileAPIv2 version of this method. */ lXDProfileRequired(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "LXDProfileRequired", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** LeaveScope signals each unit has left its scope in the relation, for all of the given relation/unit pairs. See also state.RelationUnit.LeaveScope(). */ leaveScope(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "LeaveScope", version: 16, 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: "Uniter", request: "Life", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** LogActionsMessages records the log messages against the specified actions. */ logActionsMessages(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "LogActionsMessages", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Merge merges in the provided leadership settings. Only leaders for the given service may perform this operation. */ merge(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Merge", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ModelConfig returns the current model's configuration. */ modelConfig(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ModelConfig", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ModelUUID returns the model UUID to connect to the model that the current connection is for. */ modelUUID(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ModelUUID", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** NetworkInfo returns network interfaces/addresses for specified bindings. */ networkInfo(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "NetworkInfo", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** OpenPorts sets the policy of the port range with protocol to be opened, for all given units. */ openPorts(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "OpenPorts", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** PrivateAddress returns the private address for each given unit, if set. */ privateAddress(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "PrivateAddress", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ProviderType returns the provider type used by the current juju model. TODO(dimitern): Refactor the uniter to call this instead of calling ModelConfig() just to get the provider type. Once we have machine addresses, this might be completely unnecessary though. */ providerType(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ProviderType", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** PublicAddress returns the public address for each given unit, if set. */ publicAddress(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "PublicAddress", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Read reads leadership settings for the provided service ID. Any unit of the service may perform this operation. */ read(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Read", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ReadLocalApplicationSettings returns the local application settings for a particular relation when invoked by the leader unit. */ readLocalApplicationSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ReadLocalApplicationSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ReadRemoteSettings returns the remote settings of each given set of relation/local unit/remote unit. */ readRemoteSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ReadRemoteSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** ReadSettings returns the local settings of each given set of relation/unit. NOTE(achilleasa): Using this call to read application data is deprecated and will not work for k8s charms (see LP1876097). Instead, clients should use ReadLocalApplicationSettings. */ readSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "ReadSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Refresh retrieves the latest values for attributes on this unit. */ refresh(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Refresh", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Relation returns information about all given relation/unit pairs, including their id, key and the local endpoint. */ relation(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Relation", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** RelationById returns information about all given relations, specified by their ids, including their key and the local endpoint. */ relationById(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "RelationById", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** RelationsStatus returns for each unit the corresponding relation and status information. */ relationsStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "RelationsStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** RemoveStorageAttachments removes the specified storage attachments from state. */ removeStorageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "RemoveStorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** RequestReboot sets the reboot flag on the provided machines */ requestReboot(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "RequestReboot", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** Resolved returns the current resolved setting for each given unit. */ resolved(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "Resolved", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SLALevel returns the model's SLA level. */ sLALevel(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SLALevel", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetAgentStatus will set status for agents of Units passed in args, if one of the args is not an Unit it will fail. */ setAgentStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetAgentStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetApplicationStatus sets the status for all the Applications in args if the given Unit is the leader. */ setApplicationStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetApplicationStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetCharmURL sets the charm URL for each given unit. An error will be returned if a unit is dead, or the charm URL is not known. */ setCharmURL(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetCharmURL", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetRelationStatus updates the status of the specified relations. */ setRelationStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetRelationStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetState sets the state persisted by the charm running in this unit and the state internal to the uniter for this unit. */ setState(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetState", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetStatus will set status for a entities passed in args. If the entity is a Unit it will instead set status to its agent, to emulate backwards compatibility. */ setStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetUnitStatus sets status for all elements passed in args, the difference with SetStatus is that if an entity is a Unit it will set its status instead of its agent. */ setUnitStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetUnitStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetUpgradeSeriesUnitStatus sets the upgrade series status of the unit. If no upgrade is in progress an error is returned instead. */ setUpgradeSeriesUnitStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetUpgradeSeriesUnitStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** SetWorkloadVersion sets the workload version for each given unit. An error will be returned if a unit is dead. */ setWorkloadVersion(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "SetWorkloadVersion", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** State returns the state persisted by the charm running in this unit and the state internal to the uniter for this unit. */ state(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "State", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** StorageAttachmentLife returns the lifecycle state of the storage attachments with the specified tags. */ storageAttachmentLife(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "StorageAttachmentLife", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** StorageAttachments returns the storage attachments with the specified tags. */ storageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "StorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** UnitStatus returns the workload status information for the unit. */ unitStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "UnitStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** UnitStorageAttachments returns the IDs of storage attachments for a collection of units. */ unitStorageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "UnitStorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpdateNetworkInfo refreshes the network settings for a unit's bound endpoints. */ updateNetworkInfo(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "UpdateNetworkInfo", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpdateSettings persists all changes made to the local settings of all given pairs of relation and unit. Keys with empty values are considered a signal to delete these values. */ updateSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "UpdateSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** UpgradeSeriesUnitStatus returns the current preparation status of an upgrading unit. If no series upgrade is in progress an error is returned instead. */ upgradeSeriesUnitStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "UpgradeSeriesUnitStatus", version: 16, 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: "Uniter", request: "Watch", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchAPIHostPorts watches the API server addresses. */ watchAPIHostPorts(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchAPIHostPorts", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchActionNotifications returns a StringsWatcher for observing incoming action calls to a unit. See also state/watcher.go Unit.WatchActionNotifications(). This method is called from api/uniter/uniter.go WatchActionNotifications(). */ watchActionNotifications(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchActionNotifications", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchConfigSettingsHash returns a StringsWatcher that yields a hash of the config values every time the config changes. The uniter can save this hash and use it to decide whether the config-changed hook needs to be run (or whether this was just an agent restart with no substantive config change). */ watchConfigSettingsHash(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchConfigSettingsHash", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchForModelConfigChanges returns a NotifyWatcher that observes changes to the model configuration. Note that although the NotifyWatchResult contains an Error field, it's not used because we are only returning a single watcher, so we use the regular error return. */ watchForModelConfigChanges(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchForModelConfigChanges", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchInstanceData is a shim to call the LXDProfileAPIv2 version of this method. */ watchInstanceData(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchInstanceData", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchLeadershipSettings will block the caller until leadership settings for the given service ID change. */ watchLeadershipSettings(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchLeadershipSettings", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** */ watchMeterStatus(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchMeterStatus", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchRelationUnits returns a RelationUnitsWatcher for observing changes to every unit in the supplied relation that is visible to the supplied unit. See also state/watcher.go:RelationUnit.Watch(). */ watchRelationUnits(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchRelationUnits", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchStorageAttachments creates watchers for a collection of storage attachments, each of which can be used to watch changes to storage attachment info. */ watchStorageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchStorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchTrustConfigSettingsHash returns a StringsWatcher that yields a hash of the application config values whenever they change. The uniter can use the hash to determine whether the actual values have changed since it last saw the config. */ watchTrustConfigSettingsHash(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchTrustConfigSettingsHash", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchUnitAddressesHash returns a StringsWatcher that yields the hashes of the addresses for the unit whenever the addresses change. The uniter can use the hash to determine whether the actual address values have changed since it last saw the config. */ watchUnitAddressesHash(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchUnitAddressesHash", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchUnitRelations returns a StringsWatcher, for each given unit, that notifies of changes to the lifecycles of relations relevant to that unit. For principal units, this will be all of the relations for the application. For subordinate units, only relations with the principal unit's application will be monitored. */ watchUnitRelations(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchUnitRelations", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchUnitStorageAttachments creates watchers for a collection of units, each of which can be used to watch for lifecycle changes to the corresponding unit's storage attachments. */ watchUnitStorageAttachments(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchUnitStorageAttachments", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WatchUpgradeSeriesNotifications returns a NotifyWatcher for observing changes to upgrade series locks. */ watchUpgradeSeriesNotifications(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WatchUpgradeSeriesNotifications", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } /** WorkloadVersion returns the workload version for all given units or applications. */ workloadVersion(params) { return new Promise((resolve, reject) => { const req = { type: "Uniter", request: "WorkloadVersion", version: 16, params: params, }; this._transport.write(req, resolve, reject); }); } } UniterV16.NAME = "Uniter"; UniterV16.VERSION = 16; export default UniterV16; //# sourceMappingURL=UniterV16.js.map