Class: NetconfClient<O, C>
Defined in: netconf/src/client.ts:419
A connected client. Each call sits on the object for the RFC 6241 layer it works at: transport (Secure Transport), session (Messages), ops (Operations) and content (Content).
Type Parameters
O
O extends object = object
C
C extends object = object
Implements
AsyncDisposable
Properties
connectOptions
readonly connectOptions: Readonly<ConnectOptions>;Defined in: netconf/src/client.ts:437
The options given to connect(), as given: a frozen copy of the top level (nested objects are yours, and not copied). Its profile is what was passed, such as an autoDetect([...]); client.profile is the profile it chose. Secrets such as a password stay inside transport, which is a function.
content
readonly content: ClientContent & Readonly<C>;Defined in: netconf/src/client.ts:427
Content: reading and configuring by YANG path, module resolution, and each extension's decoded readers under its id.
ops
readonly ops: ClientOps & Readonly<O>;Defined in: netconf/src/client.ts:425
Operations: base operations, list and run, the device profile's own (device), and each extension's under its id.
profile
readonly profile: DeviceProfile | undefined;Defined in: netconf/src/client.ts:429
The device profile in use, if any. It shapes every layer, so it belongs to none of them.
session
readonly session: Session;Defined in: netconf/src/client.ts:423
Messages: raw RPCs, capabilities, session-id, state and events.
transport
readonly transport: TransportInfo;Defined in: netconf/src/client.ts:421
Secure Transport: the peer the connection reached.
Accessors
logger
Get Signature
get logger(): Logger | undefined;Defined in: netconf/src/client.ts:532
The logger in use: the one passed to connect() or setLogger(), or undefined for none. (client.session.logger is the object the library logs through, which forwards to this one.)
Returns
Logger | undefined
logLevel
Get Signature
get logLevel(): "trace" | "debug" | "info" | "warn" | "error" | "silent";Defined in: netconf/src/client.ts:537
The least severe level passed to the logger.
Returns
"trace" | "debug" | "info" | "warn" | "error" | "silent"
Methods
[asyncDispose]()
[asyncDispose](): Promise<void>;Defined in: netconf/src/client.ts:566
Close the client at the end of an await using scope, as NetconfClient.close does.
Returns
Promise<void>
Implementation of
AsyncDisposable.[asyncDispose]
close()
close(): Promise<void>;Defined in: netconf/src/client.ts:561
Close the session and its connection. Idempotent, and never rejects.
Returns
Promise<void>
setLogger()
setLogger(logger): void;Defined in: netconf/src/client.ts:546
Log to logger from now on, or stop logging with undefined. Takes effect at once for the session, operations, extensions and the client. The loggers given to ssh(), tls() or a call-home server are separate.
Parameters
logger
Logger | undefined
Returns
void
setLogLevel()
setLogLevel(level): void;Defined in: netconf/src/client.ts:555
Pass only entries at level and above to the logger: 'trace', 'debug', 'info', 'warn', 'error', or 'silent' for none.
Parameters
level
"trace" | "debug" | "info" | "warn" | "error" | "silent"
Returns
void
Throws
TypeError for any other value.