pmcf 2.5.0 → 2.5.2

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": "2.5.0",
3
+ "version": "2.5.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/network.mjs CHANGED
@@ -5,7 +5,7 @@ import { networkProperties } from "./network-support.mjs";
5
5
 
6
6
  const NetworkTypeDefinition = {
7
7
  name: "network",
8
- owners: ["location", "cluster", "owner", "root"],
8
+ owners: ["location", "owner", "root"],
9
9
  priority: 0.8,
10
10
  extends: Owner.typeDefinition,
11
11
  properties: {
@@ -53,6 +53,18 @@ export class Network extends Owner {
53
53
  }
54
54
  }
55
55
 
56
+ hosts() {
57
+ if (this.bridge) {
58
+ let hosts = new Set();
59
+ for (const network of this.bridge) {
60
+ hosts = hosts.union(network.directHosts());
61
+ }
62
+ return hosts;
63
+ }
64
+
65
+ return super.hosts();
66
+ }
67
+
56
68
  get bridge() {
57
69
  return this._bridge;
58
70
  }
package/src/owner.mjs CHANGED
@@ -5,7 +5,7 @@ import { addType, types } from "./types.mjs";
5
5
 
6
6
  const OwnerTypeDefinition = {
7
7
  name: "owner",
8
- owners: ["owner", "root"],
8
+ owners: ["location", "owner", "root"],
9
9
  priority: 0.9,
10
10
  extends: Base.typeDefinition,
11
11
  properties: {
@@ -137,13 +137,18 @@ export class Owner extends Base {
137
137
  return this.typeNamed("host", name) || this.typeNamed("cluster", name);
138
138
  }
139
139
 
140
- hosts() {
140
+ directHosts() {
141
141
  let hosts = new Set();
142
-
143
142
  for (const type of ["host", "cluster"]) {
144
143
  hosts = hosts.union(new Set(Array.from(this.typeList(type))));
145
144
  }
146
145
 
146
+ return hosts;
147
+ }
148
+
149
+ hosts() {
150
+ let hosts = this.directHosts();
151
+
147
152
  for (const type of types.host.owners) {
148
153
  for (const object of this.typeList(type)) {
149
154
  hosts = hosts.union(object.hosts());
@@ -162,6 +162,9 @@ export class DHCPService extends Service {
162
162
  const dhcp4 = {
163
163
  Dhcp4: {
164
164
  ...commonConfig,
165
+ "multi-threading": {
166
+ "enable-multi-threading": false
167
+ },
165
168
  "control-socket": {
166
169
  "socket-type": "unix",
167
170
  "socket-name": "/run/kea/4-ctrl-socket"
package/types/owner.d.mts CHANGED
@@ -142,6 +142,7 @@ export class Owner extends Base {
142
142
  locationNamed(name: any): any;
143
143
  locations(): any;
144
144
  hostNamed(name: any): any;
145
+ directHosts(): Set<any>;
145
146
  hosts(): Set<any>;
146
147
  networkNamed(name: any): any;
147
148
  networks(): any;