pmcf 6.50.2 → 6.51.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "6.50.2",
3
+ "version": "6.51.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -20,7 +20,8 @@ import {
20
20
  Subnet,
21
21
  CoreService,
22
22
  Endpoint,
23
- sortDescendingByPriority
23
+ sortDescendingByPriority,
24
+ bind_key
24
25
  } from "pmcf";
25
26
  import { FAMILY_UNIX, PROTOCOL_TCP } from "../constants.mjs";
26
27
  import { writeLines } from "../utils.mjs";
@@ -53,6 +54,12 @@ export class kea extends CoreService {
53
54
  name: "peers",
54
55
  deferredExpression: true
55
56
  },
57
+ keys: {
58
+ ...default_collection_attribute_writable,
59
+ name: "keys",
60
+ type: bind_key,
61
+ deferredExpression: true
62
+ },
56
63
  dnsServerEndpoints: {
57
64
  ...default_collection_attribute_writable,
58
65
  type: Endpoint,
@@ -347,7 +354,15 @@ export class kea extends CoreService {
347
354
  "ip-address": ddnsEndpoint.address,
348
355
  port: ddnsEndpoint.port,
349
356
  "control-socket": toSocket(this.endpoint("kea-control-ddns")),
350
- "tsig-keys": [],
357
+ "tsig-keys": [
358
+ asArray(this.keys).map(key => {
359
+ return {
360
+ name: key.name,
361
+ algorithm: key.algorithm,
362
+ secret: key.secret
363
+ };
364
+ })
365
+ ],
351
366
  "forward-ddns": {
352
367
  "ddns-domains": dnsServersSlot([...this.domains])
353
368
  },
package/src/subnet.mjs CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  decodeIP,
5
5
  matchPrefixIP,
6
6
  } from "ip-utilties";
7
- import { string_attribute, name_attribute, integer_attribute } from "pacc";
8
- import { networks_attribute } from "./common-attributes.mjs";
7
+ import { name_attribute, integer_attribute } from "pacc";
8
+ import { networks_attribute, family_attribute } from "./common-attributes.mjs";
9
9
  import { addType, network, core } from "pmcf";
10
10
 
11
11
  export class Subnet extends core {
@@ -18,7 +18,7 @@ export class Subnet extends core {
18
18
  address: { ...name_attribute, name: "address", private: true },
19
19
  networks: networks_attribute,
20
20
  prefixLength: { ...integer_attribute, name: "prefixLength" },
21
- family: { ...string_attribute, name: "family" }
21
+ family: family_attribute
22
22
  };
23
23
 
24
24
  static {