Skip to content

Class: CapabilitySet ​

Defined in: netconf/src/messages/capabilities.ts:51

The capabilities a peer advertised. Always a set, even when the peer sent a single capability (fork defect d).

Lookups accept a full URI, or a short name starting with ::

  • ':candidate' matches any version of urn:ietf:params:netconf:capability:candidate:*
  • ':confirmed-commit:1.1' matches that version only
  • ':base:1.1' matches urn:ietf:params:netconf:base:1.1

Implements ​

Constructors ​

Constructor ​

ts
new CapabilitySet(uris): CapabilitySet;

Defined in: netconf/src/messages/capabilities.ts:55

Parameters ​

uris ​

Iterable<string>

Returns ​

CapabilitySet

Accessors ​

baseVersions ​

Get Signature ​

ts
get baseVersions(): BaseVersion[];

Defined in: netconf/src/messages/capabilities.ts:121

NETCONF base versions in this set, oldest first.

Returns ​

BaseVersion[]


helloModules ​

Get Signature ​

ts
get helloModules(): ModuleCapability[];

Defined in: netconf/src/messages/capabilities.ts:116

The YANG modules advertised in the hello. See helloModule.

Returns ​

ModuleCapability[]


size ​

Get Signature ​

ts
get size(): number;

Defined in: netconf/src/messages/capabilities.ts:76

How many capabilities the set holds.

Returns ​

number

Methods ​

[iterator]() ​

ts
[iterator](): Iterator<Capability>;

Defined in: netconf/src/messages/capabilities.ts:134

Iterate over the capabilities, in the order they were advertised.

Returns ​

Iterator<Capability>

Implementation of ​

Iterable.[iterator]


get() ​

ts
get(name): Capability | undefined;

Defined in: netconf/src/messages/capabilities.ts:89

The capability for a full URI (its query is ignored) or a : short name, with its parameters, or undefined if the set doesn't have it.

Parameters ​

name ​

string

Returns ​

Capability | undefined


has() ​

ts
has(name): boolean;

Defined in: netconf/src/messages/capabilities.ts:81

True if the set has the capability: a full URI (its query is ignored) or a : short name.

Parameters ​

name ​

string

Returns ​

boolean


hasHelloModule() ​

ts
hasHelloModule(name): boolean;

Defined in: netconf/src/messages/capabilities.ts:111

True if the hello advertised this YANG module. See helloModule.

Parameters ​

name ​

string

Returns ​

boolean


helloModule() ​

ts
helloModule(name): ModuleCapability | undefined;

Defined in: netconf/src/messages/capabilities.ts:106

A YANG module advertised in the hello. Only YANG 1.0 modules are advertised there; YANG 1.1 modules appear only in the YANG library (RFC 7950 §5.6.4, RFC 8525). For the complete list, use client.content.modules().

Parameters ​

name ​

string

Returns ​

ModuleCapability | undefined


toArray() ​

ts
toArray(): string[];

Defined in: netconf/src/messages/capabilities.ts:129

The advertised URIs, unchanged.

Returns ​

string[]


toJSON() ​

ts
toJSON(): string[];

Defined in: netconf/src/messages/capabilities.ts:139

Serialises as the advertised URIs, the same as toArray.

Returns ​

string[]

Released under the MIT Licence.