pmcf 6.8.0 → 6.8.1

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.8.0",
3
+ "version": "6.8.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -147,6 +147,14 @@ export class kea extends CoreService {
147
147
  const source = host.owner;
148
148
  const name = host.name;
149
149
 
150
+ const subnets = [
151
+ ...new Set(
152
+ [...this.subnets.values()].filter(
153
+ s => s !== SUBNET_LOCALHOST_IPV4 && s !== SUBNET_LOCALHOST_IPV6
154
+ )
155
+ )
156
+ ]; // TODO should be normal
157
+
150
158
  //console.log(source.fullName, [...source.hosts.keys()]);
151
159
 
152
160
  const dnsServerEndpoints = serviceEndpoints(source, {
@@ -315,12 +323,6 @@ export class kea extends CoreService {
315
323
 
316
324
  const ddnsEndpoint = this.endpoint("kea-ddns");
317
325
 
318
- const subnetPrefixes = new Set(
319
- [...this.subnets.values()]
320
- .filter(s => s !== SUBNET_LOCALHOST_IPV4 && s !== SUBNET_LOCALHOST_IPV6)
321
- .map(s => s.prefix)
322
- );
323
-
324
326
  const ddns = {
325
327
  DhcpDdns: {
326
328
  "ip-address": ddnsEndpoint.address,
@@ -334,7 +336,7 @@ export class kea extends CoreService {
334
336
  },
335
337
  "reverse-ddns": {
336
338
  "ddns-domains": dnsServersSlot(
337
- [...subnetPrefixes].map(prefix => reverseArpa(prefix))
339
+ subnets.map(s => s.prefix).map(prefix => reverseArpa(prefix))
338
340
  )
339
341
  },
340
342
 
@@ -397,10 +399,6 @@ export class kea extends CoreService {
397
399
  endpoint => `${endpoint.networkInterface.name}/${endpoint.address}`
398
400
  );
399
401
 
400
- const subnets = [...this.subnets.values()].filter(
401
- s => s !== SUBNET_LOCALHOST_IPV4 && s !== SUBNET_LOCALHOST_IPV6
402
- );
403
-
404
402
  const pools = subnet => {
405
403
  return subnet.dhcpPools.map(pool => {
406
404
  return { pool: Array.isArray(pool) ? pool.join(" - ") : pool };