-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #112 from huwshimi/support-pattern-properties
Add support for pattern properties
- Loading branch information
Showing
137 changed files
with
2,637 additions
and
892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/** | ||
Juju AgentLifeFlag 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.2.1 at the git SHA 06eb3f6c7c. | ||
Do not manually edit this file. | ||
*/ | ||
|
||
import type { JujuRequest } from "../../../generator/interfaces.js"; | ||
import { ConnectionInfo, Transport } from "../../client.js"; | ||
import { Facade } from "../../types.js"; | ||
import { autoBind } from "../../utils.js"; | ||
|
||
export interface Entities { | ||
entities: Entity[]; | ||
} | ||
|
||
export interface Entity { | ||
tag: string; | ||
} | ||
|
||
export interface Error { | ||
code: string; | ||
info?: AdditionalProperties; | ||
message: string; | ||
} | ||
|
||
export interface LifeResult { | ||
error?: Error; | ||
life: string; | ||
} | ||
|
||
export interface LifeResults { | ||
results: LifeResult[]; | ||
} | ||
|
||
export interface NotifyWatchResult { | ||
NotifyWatcherId: string; | ||
error?: Error; | ||
} | ||
|
||
export interface NotifyWatchResults { | ||
results: NotifyWatchResult[]; | ||
} | ||
|
||
export interface AdditionalProperties { | ||
[key: string]: any; | ||
} | ||
|
||
/** | ||
*/ | ||
class AgentLifeFlagV1 implements Facade { | ||
static NAME = "AgentLifeFlag"; | ||
static VERSION = 1; | ||
|
||
NAME = "AgentLifeFlag"; | ||
VERSION = 1; | ||
|
||
_transport: Transport; | ||
_info: ConnectionInfo; | ||
|
||
constructor(transport: Transport, info: ConnectionInfo) { | ||
this._transport = transport; | ||
this._info = info; | ||
|
||
// Automatically bind all methods to instances. | ||
autoBind(this); | ||
} | ||
/** | ||
Life returns the life status of every supplied entity, where available. | ||
*/ | ||
life(params: Entities): Promise<LifeResults> { | ||
return new Promise((resolve, reject) => { | ||
const req: JujuRequest = { | ||
type: "AgentLifeFlag", | ||
request: "Life", | ||
version: 1, | ||
params: params, | ||
}; | ||
|
||
this._transport.write(req, resolve, reject); | ||
}); | ||
} | ||
|
||
/** | ||
Watch starts an NotifyWatcher for each given entity. | ||
*/ | ||
watch(params: Entities): Promise<NotifyWatchResults> { | ||
return new Promise((resolve, reject) => { | ||
const req: JujuRequest = { | ||
type: "AgentLifeFlag", | ||
request: "Watch", | ||
version: 1, | ||
params: params, | ||
}; | ||
|
||
this._transport.write(req, resolve, reject); | ||
}); | ||
} | ||
} | ||
|
||
export default AgentLifeFlagV1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { GenericFacade } from "../../types"; | ||
import AgentLifeFlagV1 from "./AgentLifeFlagV1.js"; | ||
|
||
export * as AgentLifeFlagV1 from "./AgentLifeFlagV1.js"; | ||
|
||
const AgentLifeFlag: GenericFacade = { | ||
name: "AgentLifeFlag", | ||
versions: [AgentLifeFlagV1], | ||
}; | ||
|
||
export default AgentLifeFlag; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.