pmcf 1.99.2 → 1.100.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 +1 -1
- package/src/base.mjs +22 -21
- package/src/cluster.mjs +6 -6
- package/src/host.mjs +85 -84
- package/src/network.mjs +3 -3
- package/src/owner.mjs +37 -37
- package/src/service.mjs +23 -53
- package/src/services/dns.mjs +20 -19
- package/src/services/ntp.mjs +3 -3
- package/types/base.d.mts +5 -2
- package/types/cluster.d.mts +12 -6
- package/types/host.d.mts +33 -7
- package/types/network.d.mts +1 -1
- package/types/owner.d.mts +8 -1
- package/types/service.d.mts +6 -1
- package/types/services/dns.d.mts +4 -1
- package/types/services/ntp.d.mts +1 -1
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -32,7 +32,10 @@ export class Base {
|
|
|
32
32
|
owner;
|
|
33
33
|
description;
|
|
34
34
|
name;
|
|
35
|
-
|
|
35
|
+
_tags = new Set();
|
|
36
|
+
_packaging = new Set();
|
|
37
|
+
_directory;
|
|
38
|
+
_finalize;
|
|
36
39
|
|
|
37
40
|
static {
|
|
38
41
|
addType(this);
|
|
@@ -179,7 +182,8 @@ export class Base {
|
|
|
179
182
|
if (value instanceof property.type.clazz) {
|
|
180
183
|
assign(property, value);
|
|
181
184
|
} else {
|
|
182
|
-
const factory =
|
|
185
|
+
const factory =
|
|
186
|
+
property.type.factoryFor?.(value) || property.type.clazz;
|
|
183
187
|
|
|
184
188
|
assign(
|
|
185
189
|
property,
|
|
@@ -328,13 +332,12 @@ export class Base {
|
|
|
328
332
|
}
|
|
329
333
|
}
|
|
330
334
|
|
|
331
|
-
#directory;
|
|
332
335
|
set directory(directory) {
|
|
333
|
-
this
|
|
336
|
+
this._directory = directory;
|
|
334
337
|
}
|
|
335
338
|
|
|
336
339
|
get directory() {
|
|
337
|
-
return this
|
|
340
|
+
return this._directory || join(this.owner.directory, this.name);
|
|
338
341
|
}
|
|
339
342
|
|
|
340
343
|
get fullName() {
|
|
@@ -343,10 +346,9 @@ export class Base {
|
|
|
343
346
|
: this.owner.fullName;
|
|
344
347
|
}
|
|
345
348
|
|
|
346
|
-
#packaging = new Set();
|
|
347
349
|
|
|
348
350
|
set packaging(value) {
|
|
349
|
-
this
|
|
351
|
+
this._packaging.add(value);
|
|
350
352
|
}
|
|
351
353
|
|
|
352
354
|
get derivedPackaging() {
|
|
@@ -357,10 +359,10 @@ export class Base {
|
|
|
357
359
|
const dp = this.derivedPackaging;
|
|
358
360
|
|
|
359
361
|
if (dp) {
|
|
360
|
-
return this
|
|
362
|
+
return this._packaging.union(dp);
|
|
361
363
|
}
|
|
362
364
|
|
|
363
|
-
return this
|
|
365
|
+
return this._packaging;
|
|
364
366
|
}
|
|
365
367
|
|
|
366
368
|
get outputs() {
|
|
@@ -379,14 +381,14 @@ export class Base {
|
|
|
379
381
|
}
|
|
380
382
|
|
|
381
383
|
get tags() {
|
|
382
|
-
return this
|
|
384
|
+
return this._tags;
|
|
383
385
|
}
|
|
384
386
|
|
|
385
387
|
set tags(value) {
|
|
386
388
|
if (value instanceof Set) {
|
|
387
|
-
this
|
|
389
|
+
this._tags = this._tags.union(value);
|
|
388
390
|
} else {
|
|
389
|
-
this
|
|
391
|
+
this._tags.add(value);
|
|
390
392
|
}
|
|
391
393
|
}
|
|
392
394
|
|
|
@@ -422,25 +424,24 @@ export class Base {
|
|
|
422
424
|
return object;
|
|
423
425
|
}
|
|
424
426
|
|
|
425
|
-
#finalize;
|
|
426
427
|
|
|
427
428
|
finalize(action) {
|
|
428
|
-
if (!this
|
|
429
|
-
this
|
|
429
|
+
if (!this._finalize) {
|
|
430
|
+
this._finalize = [];
|
|
430
431
|
}
|
|
431
|
-
this
|
|
432
|
+
this._finalize.push(action);
|
|
432
433
|
}
|
|
433
434
|
|
|
434
435
|
execFinalize() {
|
|
435
|
-
this.traverse(object => object.
|
|
436
|
+
this.traverse(object => object._execFinalize());
|
|
436
437
|
}
|
|
437
438
|
|
|
438
|
-
|
|
439
|
-
if (this
|
|
439
|
+
_execFinalize() {
|
|
440
|
+
if (this._finalize) {
|
|
440
441
|
let i = 0;
|
|
441
|
-
for (const action of this
|
|
442
|
+
for (const action of this._finalize) {
|
|
442
443
|
if (action) {
|
|
443
|
-
this
|
|
444
|
+
this._finalize[i] = undefined;
|
|
444
445
|
action();
|
|
445
446
|
}
|
|
446
447
|
i++;
|
package/src/cluster.mjs
CHANGED
|
@@ -20,8 +20,8 @@ const ClusterTypeDefinition = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export class Cluster extends Host {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
_masters = new Set();
|
|
24
|
+
_backups = new Set();
|
|
25
25
|
routerId = 100;
|
|
26
26
|
checkInterval = 60;
|
|
27
27
|
|
|
@@ -39,19 +39,19 @@ export class Cluster extends Host {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
set masters(value) {
|
|
42
|
-
this
|
|
42
|
+
this._masters.add(value);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
get masters() {
|
|
46
|
-
return this
|
|
46
|
+
return this._masters;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
set backups(value) {
|
|
50
|
-
this
|
|
50
|
+
this._backups.add(value);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
get backups() {
|
|
54
|
-
return this
|
|
54
|
+
return this._backups;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
get members() {
|
package/src/host.mjs
CHANGED
|
@@ -45,11 +45,12 @@ const HostTypeDefinition = {
|
|
|
45
45
|
distribution: { type: "string", collection: false, writeable: true },
|
|
46
46
|
deployment: { type: "string", collection: false, writeable: true },
|
|
47
47
|
master: { type: "boolean", collection: false, writeable: true },
|
|
48
|
+
priority: { type: "number", collection: false, writeable: true },
|
|
49
|
+
weight: { type: "number", collection: false, writeable: true },
|
|
48
50
|
serial: { type: "string", collection: false, writeable: true },
|
|
49
51
|
vendor: { type: "string", collection: false, writeable: true },
|
|
50
52
|
chassis: { type: "string", collection: false, writeable: true },
|
|
51
53
|
architecture: { type: "string", collection: false, writeable: true },
|
|
52
|
-
priority: { type: "number", collection: false, writeable: true },
|
|
53
54
|
replaces: { type: "string", collection: true, writeable: true },
|
|
54
55
|
depends: { type: "string", collection: true, writeable: true },
|
|
55
56
|
provides: { type: "string", collection: true, writeable: true },
|
|
@@ -61,21 +62,21 @@ const HostTypeDefinition = {
|
|
|
61
62
|
|
|
62
63
|
export class Host extends Base {
|
|
63
64
|
priority = 1;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
65
|
+
_services = [];
|
|
66
|
+
_extends = [];
|
|
67
|
+
_aliases = new Set();
|
|
68
|
+
_networkInterfaces = new Map();
|
|
69
|
+
_provides = new Set();
|
|
70
|
+
_replaces = new Set();
|
|
71
|
+
_depends = new Set();
|
|
72
|
+
_master = false;
|
|
73
|
+
_os;
|
|
74
|
+
_distribution;
|
|
75
|
+
_deployment;
|
|
76
|
+
_chassis;
|
|
77
|
+
_vendor;
|
|
78
|
+
_architecture;
|
|
79
|
+
_serial;
|
|
79
80
|
|
|
80
81
|
static {
|
|
81
82
|
addType(this);
|
|
@@ -108,10 +109,10 @@ export class Host extends Base {
|
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
for (const [name, ni] of host.networkInterfaces) {
|
|
111
|
-
let present = this
|
|
112
|
+
let present = this._networkInterfaces.get(name);
|
|
112
113
|
if (!present) {
|
|
113
114
|
present = ni.forOwner(this);
|
|
114
|
-
this
|
|
115
|
+
this._networkInterfaces.set(name, present);
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
present.extends.push(ni);
|
|
@@ -123,7 +124,7 @@ export class Host extends Base {
|
|
|
123
124
|
for (const ni of this.networkInterfaces.values()) {
|
|
124
125
|
ni._traverse(...args);
|
|
125
126
|
}
|
|
126
|
-
for (const service of this
|
|
127
|
+
for (const service of this._services) {
|
|
127
128
|
service._traverse(...args);
|
|
128
129
|
}
|
|
129
130
|
|
|
@@ -133,44 +134,44 @@ export class Host extends Base {
|
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
set serial(value) {
|
|
136
|
-
this
|
|
137
|
+
this._serial = value;
|
|
137
138
|
}
|
|
138
139
|
|
|
139
140
|
get serial() {
|
|
140
|
-
return this
|
|
141
|
+
return this._serial || this.extends.find(e => e.serial)?.serial;
|
|
141
142
|
}
|
|
142
143
|
|
|
143
144
|
set deployment(value) {
|
|
144
|
-
this
|
|
145
|
+
this._deployment = value;
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
get deployment() {
|
|
148
|
-
return this
|
|
149
|
+
return this._deployment || this.extends.find(e => e.deployment)?.deployment;
|
|
149
150
|
}
|
|
150
151
|
|
|
151
152
|
set chassis(value) {
|
|
152
|
-
this
|
|
153
|
+
this._chassis = value;
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
get chassis() {
|
|
156
|
-
return this
|
|
157
|
+
return this._chassis || this.extends.find(e => e.chassis)?.chassis;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
set vendor(value) {
|
|
160
|
-
this
|
|
161
|
+
this._vendor = value;
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
get vendor() {
|
|
164
|
-
return this
|
|
165
|
+
return this._vendor || this.extends.find(e => e.vendor)?.vendor;
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
set architecture(value) {
|
|
168
|
-
this
|
|
169
|
+
this._architecture = value;
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
get architecture() {
|
|
172
173
|
return (
|
|
173
|
-
this
|
|
174
|
+
this._architecture || this.extends.find(e => e.architecture)?.architecture
|
|
174
175
|
);
|
|
175
176
|
}
|
|
176
177
|
|
|
@@ -183,7 +184,7 @@ export class Host extends Base {
|
|
|
183
184
|
}
|
|
184
185
|
|
|
185
186
|
get isModel() {
|
|
186
|
-
return this
|
|
187
|
+
return this._vendor || this._chassis ? true : false;
|
|
187
188
|
}
|
|
188
189
|
|
|
189
190
|
get model() {
|
|
@@ -192,89 +193,89 @@ export class Host extends Base {
|
|
|
192
193
|
|
|
193
194
|
set aliases(value) {
|
|
194
195
|
if (value instanceof Set) {
|
|
195
|
-
this
|
|
196
|
+
this._aliases = this._aliases.union(value);
|
|
196
197
|
} else {
|
|
197
|
-
this
|
|
198
|
+
this._aliases.add(value);
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
get aliases() {
|
|
202
|
-
return this.extends.reduce((a, c) => a.union(c.aliases), this
|
|
203
|
+
return this.extends.reduce((a, c) => a.union(c.aliases), this._aliases);
|
|
203
204
|
}
|
|
204
205
|
|
|
205
206
|
set extends(value) {
|
|
206
|
-
this
|
|
207
|
+
this._extends.push(value);
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
get extends() {
|
|
210
|
-
return this
|
|
211
|
+
return this._extends;
|
|
211
212
|
}
|
|
212
213
|
|
|
213
214
|
set provides(value) {
|
|
214
215
|
if (value instanceof Set) {
|
|
215
|
-
this
|
|
216
|
+
this._provides = this._provides.union(value);
|
|
216
217
|
} else {
|
|
217
|
-
this
|
|
218
|
+
this._provides.add(value);
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
221
|
|
|
221
222
|
get provides() {
|
|
222
223
|
return this.expand(
|
|
223
|
-
this.extends.reduce((a, c) => a.union(c.provides), this
|
|
224
|
+
this.extends.reduce((a, c) => a.union(c.provides), this._provides)
|
|
224
225
|
);
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
set replaces(value) {
|
|
228
229
|
if (value instanceof Set) {
|
|
229
|
-
this
|
|
230
|
+
this._replaces = this._replaces.union(value);
|
|
230
231
|
} else {
|
|
231
|
-
this
|
|
232
|
+
this._replaces.add(value);
|
|
232
233
|
}
|
|
233
234
|
}
|
|
234
235
|
|
|
235
236
|
get replaces() {
|
|
236
237
|
return this.expand(
|
|
237
|
-
this.extends.reduce((a, c) => a.union(c.replaces), this
|
|
238
|
+
this.extends.reduce((a, c) => a.union(c.replaces), this._replaces)
|
|
238
239
|
);
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
set depends(value) {
|
|
242
243
|
if (value instanceof Set) {
|
|
243
|
-
this
|
|
244
|
+
this._depends = this._depends.union(value);
|
|
244
245
|
} else {
|
|
245
|
-
this
|
|
246
|
+
this._depends.add(value);
|
|
246
247
|
}
|
|
247
248
|
}
|
|
248
249
|
|
|
249
250
|
get depends() {
|
|
250
251
|
return this.expand(
|
|
251
|
-
this.extends.reduce((a, c) => a.union(c.depends), this
|
|
252
|
+
this.extends.reduce((a, c) => a.union(c.depends), this._depends)
|
|
252
253
|
);
|
|
253
254
|
}
|
|
254
255
|
|
|
255
256
|
set master(value) {
|
|
256
|
-
this
|
|
257
|
+
this._master = value;
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
get master() {
|
|
260
|
-
return this
|
|
261
|
+
return this._master || this.extends.find(e => e.master) ? true : false;
|
|
261
262
|
}
|
|
262
263
|
|
|
263
264
|
set os(value) {
|
|
264
|
-
this
|
|
265
|
+
this._os = value;
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
get os() {
|
|
268
|
-
return this
|
|
269
|
+
return this._os || this.extends.find(e => e.os)?.os;
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
set distribution(value) {
|
|
272
|
-
this
|
|
273
|
+
this._distribution = value;
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
get distribution() {
|
|
276
277
|
return (
|
|
277
|
-
this
|
|
278
|
+
this._distribution || this.extends.find(e => e.distribution)?.distribution
|
|
278
279
|
);
|
|
279
280
|
}
|
|
280
281
|
|
|
@@ -335,24 +336,24 @@ export class Host extends Base {
|
|
|
335
336
|
}
|
|
336
337
|
|
|
337
338
|
get services() {
|
|
338
|
-
return this
|
|
339
|
+
return this._services;
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
set services(service) {
|
|
342
|
-
const present = this
|
|
343
|
+
const present = this._services.find(s => s.name === service.name);
|
|
343
344
|
|
|
344
345
|
if (!present) {
|
|
345
|
-
this
|
|
346
|
+
this._services.push(service);
|
|
346
347
|
}
|
|
347
348
|
}
|
|
348
349
|
|
|
349
350
|
*findServices(filter) {
|
|
350
|
-
yield* objectFilter(types.service, this
|
|
351
|
+
yield* objectFilter(types.service, this._services, filter);
|
|
351
352
|
}
|
|
352
353
|
|
|
353
354
|
typeNamed(typeName, name) {
|
|
354
355
|
if (typeName === NetworkInterfaceTypeDefinition.name) {
|
|
355
|
-
const ni = this
|
|
356
|
+
const ni = this._networkInterfaces.get(name);
|
|
356
357
|
if (ni) {
|
|
357
358
|
return ni;
|
|
358
359
|
}
|
|
@@ -368,7 +369,7 @@ export class Host extends Base {
|
|
|
368
369
|
}
|
|
369
370
|
|
|
370
371
|
named(name) {
|
|
371
|
-
const ni = this
|
|
372
|
+
const ni = this._networkInterfaces.get(name);
|
|
372
373
|
if (ni) {
|
|
373
374
|
return ni;
|
|
374
375
|
}
|
|
@@ -379,11 +380,11 @@ export class Host extends Base {
|
|
|
379
380
|
}
|
|
380
381
|
|
|
381
382
|
get networkInterfaces() {
|
|
382
|
-
return this
|
|
383
|
+
return this._networkInterfaces;
|
|
383
384
|
}
|
|
384
385
|
|
|
385
386
|
set networkInterfaces(networkInterface) {
|
|
386
|
-
this
|
|
387
|
+
this._networkInterfaces.set(networkInterface.name, networkInterface);
|
|
387
388
|
|
|
388
389
|
if (!this.isTemplate) {
|
|
389
390
|
networkInterface.network?.addObject(this);
|
|
@@ -484,14 +485,14 @@ export class NetworkInterface extends Base {
|
|
|
484
485
|
return NetworkInterfaceTypeDefinition;
|
|
485
486
|
}
|
|
486
487
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
488
|
+
_ipAddresses = new Map();
|
|
489
|
+
_scope;
|
|
490
|
+
_metric;
|
|
491
|
+
_ssid;
|
|
492
|
+
_psk;
|
|
493
|
+
_network;
|
|
494
|
+
_kind;
|
|
495
|
+
_hostName;
|
|
495
496
|
extends = [];
|
|
496
497
|
arpbridge;
|
|
497
498
|
hwaddr;
|
|
@@ -512,12 +513,12 @@ export class NetworkInterface extends Base {
|
|
|
512
513
|
}
|
|
513
514
|
|
|
514
515
|
get ipAddresses() {
|
|
515
|
-
return this
|
|
516
|
+
return this._ipAddresses;
|
|
516
517
|
}
|
|
517
518
|
|
|
518
519
|
set ipAddresses(value) {
|
|
519
520
|
for (const address of asArray(value)) {
|
|
520
|
-
this
|
|
521
|
+
this._ipAddresses.set(
|
|
521
522
|
normalizeIPAddress(address),
|
|
522
523
|
this.addSubnet(address)
|
|
523
524
|
);
|
|
@@ -529,7 +530,7 @@ export class NetworkInterface extends Base {
|
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
get rawAddresses() {
|
|
532
|
-
return [...this
|
|
533
|
+
return [...this._ipAddresses].map(([address]) => address);
|
|
533
534
|
}
|
|
534
535
|
|
|
535
536
|
get cidrAddress() {
|
|
@@ -537,7 +538,7 @@ export class NetworkInterface extends Base {
|
|
|
537
538
|
}
|
|
538
539
|
|
|
539
540
|
get cidrAddresses() {
|
|
540
|
-
return [...this
|
|
541
|
+
return [...this._ipAddresses].map(([address, subnet]) =>
|
|
541
542
|
formatCIDR(address, subnet)
|
|
542
543
|
);
|
|
543
544
|
}
|
|
@@ -574,11 +575,11 @@ export class NetworkInterface extends Base {
|
|
|
574
575
|
}
|
|
575
576
|
|
|
576
577
|
get hostName() {
|
|
577
|
-
return this
|
|
578
|
+
return this._hostName || this.host.hostName;
|
|
578
579
|
}
|
|
579
580
|
|
|
580
581
|
set hostName(value) {
|
|
581
|
-
this
|
|
582
|
+
this._hostName = value;
|
|
582
583
|
}
|
|
583
584
|
|
|
584
585
|
get domainNames() {
|
|
@@ -596,50 +597,50 @@ export class NetworkInterface extends Base {
|
|
|
596
597
|
}
|
|
597
598
|
|
|
598
599
|
get network() {
|
|
599
|
-
return this
|
|
600
|
+
return this._network || this.host.network;
|
|
600
601
|
}
|
|
601
602
|
|
|
602
603
|
set network(network) {
|
|
603
|
-
this
|
|
604
|
+
this._network = network;
|
|
604
605
|
}
|
|
605
606
|
|
|
606
607
|
set scope(value) {
|
|
607
|
-
this
|
|
608
|
+
this._scope = value;
|
|
608
609
|
}
|
|
609
610
|
|
|
610
611
|
get scope() {
|
|
611
|
-
return this
|
|
612
|
+
return this._scope || this.network?.scope || "global";
|
|
612
613
|
}
|
|
613
614
|
|
|
614
615
|
set metric(value) {
|
|
615
|
-
this
|
|
616
|
+
this._metric = value;
|
|
616
617
|
}
|
|
617
618
|
|
|
618
619
|
get metric() {
|
|
619
|
-
return this
|
|
620
|
+
return this._metric || this.network?.metric || 1004;
|
|
620
621
|
}
|
|
621
622
|
|
|
622
623
|
set ssid(value) {
|
|
623
|
-
this
|
|
624
|
+
this._ssid = value;
|
|
624
625
|
}
|
|
625
626
|
|
|
626
627
|
get ssid() {
|
|
627
|
-
return this
|
|
628
|
+
return this._ssid || this.network?.ssid;
|
|
628
629
|
}
|
|
629
630
|
|
|
630
631
|
set psk(value) {
|
|
631
|
-
this
|
|
632
|
+
this._psk = value;
|
|
632
633
|
}
|
|
633
634
|
|
|
634
635
|
get psk() {
|
|
635
|
-
return this
|
|
636
|
+
return this._psk || this.network?.psk;
|
|
636
637
|
}
|
|
637
638
|
|
|
638
639
|
set kind(value) {
|
|
639
|
-
this
|
|
640
|
+
this._kind = value;
|
|
640
641
|
}
|
|
641
642
|
|
|
642
643
|
get kind() {
|
|
643
|
-
return this
|
|
644
|
+
return this._kind || this.network?.kind;
|
|
644
645
|
}
|
|
645
646
|
}
|
package/src/network.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export class Network extends Owner {
|
|
|
20
20
|
scope;
|
|
21
21
|
metric;
|
|
22
22
|
gateway;
|
|
23
|
-
|
|
23
|
+
_bridge;
|
|
24
24
|
|
|
25
25
|
static {
|
|
26
26
|
addType(this);
|
|
@@ -54,11 +54,11 @@ export class Network extends Owner {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
get bridge() {
|
|
57
|
-
return this
|
|
57
|
+
return this._bridge;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
set bridge(network) {
|
|
61
|
-
this
|
|
61
|
+
this._bridge = this.owner.addBridge(this, network);
|
|
62
62
|
network.bridge = this.bridge; // TODO should happen in addBridge
|
|
63
63
|
}
|
|
64
64
|
}
|
package/src/owner.mjs
CHANGED
|
@@ -27,8 +27,8 @@ const OwnerTypeDefinition = {
|
|
|
27
27
|
const EMPTY = new Map();
|
|
28
28
|
|
|
29
29
|
export class Owner extends Base {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
_membersByType = new Map();
|
|
31
|
+
_bridges = new Set();
|
|
32
32
|
|
|
33
33
|
static {
|
|
34
34
|
addType(this);
|
|
@@ -45,7 +45,7 @@ export class Owner extends Base {
|
|
|
45
45
|
|
|
46
46
|
_traverse(...args) {
|
|
47
47
|
if (super._traverse(...args)) {
|
|
48
|
-
for (const typeSlot of this
|
|
48
|
+
for (const typeSlot of this._membersByType.values()) {
|
|
49
49
|
for (const object of typeSlot.values()) {
|
|
50
50
|
object._traverse(...args);
|
|
51
51
|
}
|
|
@@ -62,7 +62,7 @@ export class Owner extends Base {
|
|
|
62
62
|
name = name.substring(this.fullName.length + 1);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
for (const slot of this
|
|
65
|
+
for (const slot of this._membersByType.values()) {
|
|
66
66
|
const object = slot.get(name);
|
|
67
67
|
if (object) {
|
|
68
68
|
return object;
|
|
@@ -83,7 +83,7 @@ export class Owner extends Base {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
typeNamed(typeName, name) {
|
|
86
|
-
const typeSlot = this
|
|
86
|
+
const typeSlot = this._membersByType.get(typeName);
|
|
87
87
|
if (typeSlot) {
|
|
88
88
|
const object = typeSlot.get(
|
|
89
89
|
name[0] === "/" ? name.substring(this.fullName.length + 1) : name
|
|
@@ -97,19 +97,19 @@ export class Owner extends Base {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
typeObject(typeName) {
|
|
100
|
-
return this
|
|
100
|
+
return this._membersByType.get(typeName);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
typeList(typeName) {
|
|
104
|
-
const typeSlot = this
|
|
104
|
+
const typeSlot = this._membersByType.get(typeName);
|
|
105
105
|
return (typeSlot || EMPTY).values();
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
addTypeObject(typeName, name, object) {
|
|
109
|
-
let typeSlot = this
|
|
109
|
+
let typeSlot = this._membersByType.get(typeName);
|
|
110
110
|
if (!typeSlot) {
|
|
111
111
|
typeSlot = new Map();
|
|
112
|
-
this
|
|
112
|
+
this._membersByType.set(typeName, typeSlot);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
typeSlot.set(name, object);
|
|
@@ -221,7 +221,7 @@ export class Owner extends Base {
|
|
|
221
221
|
if (destinationNetworks) {
|
|
222
222
|
let bridge;
|
|
223
223
|
|
|
224
|
-
for (bridge of this
|
|
224
|
+
for (bridge of this._bridges) {
|
|
225
225
|
if (bridge.has(network.name)) {
|
|
226
226
|
bridge.delete(network.name);
|
|
227
227
|
bridge.add(network);
|
|
@@ -235,7 +235,7 @@ export class Owner extends Base {
|
|
|
235
235
|
|
|
236
236
|
if (!bridge) {
|
|
237
237
|
bridge = new Set([network]);
|
|
238
|
-
this
|
|
238
|
+
this._bridges.add(bridge);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
for (const nameOrNetwork of asIterator(destinationNetworks)) {
|
|
@@ -259,7 +259,7 @@ export class Owner extends Base {
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
_resolveBridges() {
|
|
262
|
-
for (const bridge of this
|
|
262
|
+
for (const bridge of this._bridges) {
|
|
263
263
|
const subnets = new Map();
|
|
264
264
|
|
|
265
265
|
for (let network of bridge) {
|
|
@@ -307,69 +307,69 @@ export class Owner extends Base {
|
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
_country;
|
|
311
311
|
|
|
312
312
|
set country(value) {
|
|
313
|
-
this
|
|
313
|
+
this._country = value;
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
get country() {
|
|
317
|
-
return this
|
|
317
|
+
return this._country || this.owner?.country;
|
|
318
318
|
}
|
|
319
319
|
|
|
320
|
-
|
|
320
|
+
_locales = new Set();
|
|
321
321
|
|
|
322
322
|
set locales(value) {
|
|
323
323
|
if (value instanceof Set) {
|
|
324
|
-
this
|
|
324
|
+
this._locales = this._locales.union(value);
|
|
325
325
|
} else {
|
|
326
|
-
this
|
|
326
|
+
this._locales.add(value);
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
get locales() {
|
|
331
331
|
if (this.owner) {
|
|
332
|
-
return this.owner.locales.union(this
|
|
332
|
+
return this.owner.locales.union(this._locales);
|
|
333
333
|
}
|
|
334
|
-
return this
|
|
334
|
+
return this._locales;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
|
|
337
|
+
_timezone;
|
|
338
338
|
|
|
339
339
|
set timezone(value) {
|
|
340
|
-
this
|
|
340
|
+
this._timezone = value;
|
|
341
341
|
}
|
|
342
342
|
|
|
343
343
|
get timezone() {
|
|
344
|
-
return this
|
|
344
|
+
return this._timezone || this.owner?.timezone;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
|
|
347
|
+
_administratorEmail;
|
|
348
348
|
|
|
349
349
|
set administratorEmail(value) {
|
|
350
|
-
this
|
|
350
|
+
this._administratorEmail = value;
|
|
351
351
|
}
|
|
352
352
|
|
|
353
353
|
get administratorEmail() {
|
|
354
|
-
if (this
|
|
355
|
-
return this
|
|
354
|
+
if (this._administratorEmail) {
|
|
355
|
+
return this._administratorEmail;
|
|
356
356
|
}
|
|
357
357
|
|
|
358
|
-
if (this.owner && !this
|
|
358
|
+
if (this.owner && !this._domain) {
|
|
359
359
|
return this.owner.administratorEmail;
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
return "admin@" + this.domain;
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
|
|
365
|
+
_domain;
|
|
366
366
|
|
|
367
367
|
set domain(value) {
|
|
368
|
-
this
|
|
368
|
+
this._domain = value;
|
|
369
369
|
}
|
|
370
370
|
|
|
371
371
|
get domain() {
|
|
372
|
-
return this
|
|
372
|
+
return this._domain || this.owner?.domain;
|
|
373
373
|
}
|
|
374
374
|
|
|
375
375
|
get domains() {
|
|
@@ -396,21 +396,21 @@ export class Owner extends Base {
|
|
|
396
396
|
return names;
|
|
397
397
|
}
|
|
398
398
|
|
|
399
|
-
|
|
399
|
+
_architectures;
|
|
400
400
|
|
|
401
401
|
set architectures(value) {
|
|
402
402
|
if (value instanceof Set) {
|
|
403
|
-
this
|
|
404
|
-
? this
|
|
403
|
+
this._architectures = this._architectures
|
|
404
|
+
? this._architectures.union(value)
|
|
405
405
|
: value;
|
|
406
406
|
} else {
|
|
407
|
-
this
|
|
407
|
+
this._architectures = new Set(value);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
get architectures() {
|
|
412
|
-
if (this
|
|
413
|
-
return this
|
|
412
|
+
if (this._architectures) {
|
|
413
|
+
return this._architectures;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
416
|
const architectures = new Set();
|
package/src/service.mjs
CHANGED
|
@@ -96,12 +96,12 @@ export const ServiceTypeDefinition = {
|
|
|
96
96
|
|
|
97
97
|
export class Service extends Base {
|
|
98
98
|
alias;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
_weight;
|
|
100
|
+
_priority;
|
|
101
|
+
_type;
|
|
102
|
+
_port;
|
|
103
|
+
_ipAddresses;
|
|
104
|
+
_systemd;
|
|
105
105
|
|
|
106
106
|
static {
|
|
107
107
|
addType(this);
|
|
@@ -116,41 +116,10 @@ export class Service extends Base {
|
|
|
116
116
|
this.read(data, ServiceTypeDefinition);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
|
|
120
|
-
if (this.owner !== owner) {
|
|
121
|
-
const data = { name: this.name };
|
|
122
|
-
if (this.alias) {
|
|
123
|
-
data.alias = this.alias;
|
|
124
|
-
}
|
|
125
|
-
if (this.#type) {
|
|
126
|
-
data.type = this.#type;
|
|
127
|
-
}
|
|
128
|
-
if (this.#weight) {
|
|
129
|
-
data.weight = this.#weight;
|
|
130
|
-
}
|
|
131
|
-
if (this.#port) {
|
|
132
|
-
data.port = this.#port;
|
|
133
|
-
}
|
|
134
|
-
if (this.#ipAddresses) {
|
|
135
|
-
data.ipAddresses = this.#ipAddresses;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
if (this.#systemd) {
|
|
139
|
-
data.systemd = this.#systemd;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
// @ts-ignore
|
|
143
|
-
return new this.constructor(owner, data);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
return this;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
get network()
|
|
150
|
-
{
|
|
119
|
+
get network() {
|
|
151
120
|
return this.server.network;
|
|
152
121
|
}
|
|
153
|
-
|
|
122
|
+
|
|
154
123
|
get server() {
|
|
155
124
|
return this.owner;
|
|
156
125
|
}
|
|
@@ -164,15 +133,15 @@ export class Service extends Base {
|
|
|
164
133
|
}
|
|
165
134
|
|
|
166
135
|
get rawAddresses() {
|
|
167
|
-
return this
|
|
136
|
+
return this._ipAddresses || this.owner.rawAddresses;
|
|
168
137
|
}
|
|
169
138
|
|
|
170
139
|
get rawAddress() {
|
|
171
|
-
return this
|
|
140
|
+
return this._ipAddresses?.[0] || this.server.rawAddress;
|
|
172
141
|
}
|
|
173
142
|
|
|
174
143
|
set ipAddresses(value) {
|
|
175
|
-
this
|
|
144
|
+
this._ipAddresses = value;
|
|
176
145
|
}
|
|
177
146
|
|
|
178
147
|
get addresses() {
|
|
@@ -180,20 +149,20 @@ export class Service extends Base {
|
|
|
180
149
|
}
|
|
181
150
|
|
|
182
151
|
set port(value) {
|
|
183
|
-
this
|
|
152
|
+
this._port = value;
|
|
184
153
|
}
|
|
185
154
|
|
|
186
155
|
get port() {
|
|
187
|
-
return this
|
|
156
|
+
return this._port || ServiceTypes[this.type]?.port;
|
|
188
157
|
}
|
|
189
158
|
|
|
190
159
|
set priority(value) {
|
|
191
|
-
this
|
|
160
|
+
this._priority = value;
|
|
192
161
|
}
|
|
193
162
|
|
|
194
163
|
get priority() {
|
|
195
|
-
if (this
|
|
196
|
-
return this
|
|
164
|
+
if (this._priority !== undefined) {
|
|
165
|
+
return this._priority;
|
|
197
166
|
}
|
|
198
167
|
if (this.owner.priority !== undefined) {
|
|
199
168
|
return this.owner.priority;
|
|
@@ -203,13 +172,14 @@ export class Service extends Base {
|
|
|
203
172
|
}
|
|
204
173
|
|
|
205
174
|
set weight(value) {
|
|
206
|
-
this
|
|
175
|
+
this._weight = value;
|
|
207
176
|
}
|
|
208
177
|
|
|
209
178
|
get weight() {
|
|
210
|
-
if (this
|
|
211
|
-
return this
|
|
179
|
+
if (this._weight !== undefined) {
|
|
180
|
+
return this._weight;
|
|
212
181
|
}
|
|
182
|
+
|
|
213
183
|
if (this.owner.weight !== undefined) {
|
|
214
184
|
return this.owner.weight;
|
|
215
185
|
}
|
|
@@ -218,11 +188,11 @@ export class Service extends Base {
|
|
|
218
188
|
}
|
|
219
189
|
|
|
220
190
|
set type(value) {
|
|
221
|
-
this
|
|
191
|
+
this._type = value;
|
|
222
192
|
}
|
|
223
193
|
|
|
224
194
|
get type() {
|
|
225
|
-
return this
|
|
195
|
+
return this._type || this.name;
|
|
226
196
|
}
|
|
227
197
|
|
|
228
198
|
get master() {
|
|
@@ -238,7 +208,7 @@ export class Service extends Base {
|
|
|
238
208
|
}
|
|
239
209
|
|
|
240
210
|
get systemdServices() {
|
|
241
|
-
return this
|
|
211
|
+
return this._systemd;
|
|
242
212
|
}
|
|
243
213
|
|
|
244
214
|
get srvPrefix() {
|
package/src/services/dns.mjs
CHANGED
|
@@ -68,10 +68,10 @@ export class DNSService extends Service {
|
|
|
68
68
|
hasCatalog = true;
|
|
69
69
|
hasLinkLocalAdresses = true;
|
|
70
70
|
notify = true;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
71
|
+
_source = [];
|
|
72
|
+
_trusted = [];
|
|
73
|
+
_protected = [];
|
|
74
|
+
_open = [];
|
|
75
75
|
|
|
76
76
|
serial = Math.ceil(Date.now() / 1000);
|
|
77
77
|
refresh = 36000;
|
|
@@ -101,35 +101,35 @@ export class DNSService extends Service {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
set protected(value) {
|
|
104
|
-
this
|
|
104
|
+
this._protected.push(value);
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
get protected() {
|
|
108
|
-
return this
|
|
108
|
+
return this._protected;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
set trusted(value) {
|
|
112
|
-
this
|
|
112
|
+
this._trusted.push(value);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
get trusted() {
|
|
116
|
-
return this
|
|
116
|
+
return this._trusted;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
set open(value) {
|
|
120
|
-
this
|
|
120
|
+
this._open.push(value);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
get open() {
|
|
124
|
-
return this
|
|
124
|
+
return this._open;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
set source(value) {
|
|
128
|
-
this
|
|
128
|
+
this._source.push(value);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
get source() {
|
|
132
|
-
return this
|
|
132
|
+
return this._source;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
*findServices(filter) {
|
|
@@ -161,7 +161,8 @@ export class DNSService extends Service {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
async *preparePackages(dir) {
|
|
164
|
-
const
|
|
164
|
+
const location = this.location;
|
|
165
|
+
const name = location.name;
|
|
165
166
|
const p1 = join(dir, "p1");
|
|
166
167
|
const packageData = {
|
|
167
168
|
dir: p1,
|
|
@@ -169,7 +170,7 @@ export class DNSService extends Service {
|
|
|
169
170
|
outputs: this.outputs,
|
|
170
171
|
properties: {
|
|
171
172
|
name: `named-${name}`,
|
|
172
|
-
description: `named definitions for ${
|
|
173
|
+
description: `named definitions for ${location.fullName}`,
|
|
173
174
|
access: "private"
|
|
174
175
|
}
|
|
175
176
|
};
|
|
@@ -203,7 +204,7 @@ export class DNSService extends Service {
|
|
|
203
204
|
|
|
204
205
|
packageData.properties = {
|
|
205
206
|
name: `named-zones-${name}`,
|
|
206
|
-
description: `zone definitions for ${
|
|
207
|
+
description: `zone definitions for ${location.fullName}`,
|
|
207
208
|
dependencies: ["mf-named"],
|
|
208
209
|
replaces: ["mf-named-zones"],
|
|
209
210
|
access: "private"
|
|
@@ -283,7 +284,7 @@ async function generateZoneDefs(dns, packageData) {
|
|
|
283
284
|
}
|
|
284
285
|
|
|
285
286
|
for (const domain of dns.localDomains) {
|
|
286
|
-
const
|
|
287
|
+
const locationName = location.name;
|
|
287
288
|
const reverseZones = new Map();
|
|
288
289
|
|
|
289
290
|
const config = {
|
|
@@ -296,7 +297,7 @@ async function generateZoneDefs(dns, packageData) {
|
|
|
296
297
|
|
|
297
298
|
const zone = {
|
|
298
299
|
id: domain,
|
|
299
|
-
file: `${
|
|
300
|
+
file: `${locationName}/${domain}.zone`,
|
|
300
301
|
records: new Set([SOARecord, NSRecord, locationRecord])
|
|
301
302
|
};
|
|
302
303
|
config.zones.push(zone);
|
|
@@ -310,7 +311,7 @@ async function generateZoneDefs(dns, packageData) {
|
|
|
310
311
|
|
|
311
312
|
zone.catalogZone = {
|
|
312
313
|
id: `catalog.${domain}`,
|
|
313
|
-
file: `${
|
|
314
|
+
file: `${locationName}/catalog.${domain}.zone`,
|
|
314
315
|
records: new Set([
|
|
315
316
|
SOARecord,
|
|
316
317
|
NSRecord,
|
|
@@ -353,7 +354,7 @@ async function generateZoneDefs(dns, packageData) {
|
|
|
353
354
|
reverseZone = {
|
|
354
355
|
id: reverseArpa,
|
|
355
356
|
type: "plain",
|
|
356
|
-
file: `${
|
|
357
|
+
file: `${locationName}/${reverseArpa}.zone`,
|
|
357
358
|
records: new Set([SOARecord, NSRecord])
|
|
358
359
|
};
|
|
359
360
|
config.zones.push(reverseZone);
|
package/src/services/ntp.mjs
CHANGED
|
@@ -17,7 +17,7 @@ const NTPServiceTypeDefinition = {
|
|
|
17
17
|
const NTP_SERVICE_FILTER = { type: NTPServiceTypeDefinition.name };
|
|
18
18
|
|
|
19
19
|
export class NTPService extends Service {
|
|
20
|
-
|
|
20
|
+
_source = [];
|
|
21
21
|
|
|
22
22
|
static {
|
|
23
23
|
addType(this);
|
|
@@ -37,11 +37,11 @@ export class NTPService extends Service {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
set source(value) {
|
|
40
|
-
this
|
|
40
|
+
this._source.push(value);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
get source() {
|
|
44
|
-
return this
|
|
44
|
+
return this._source;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
*findServices(filter) {
|
package/types/base.d.mts
CHANGED
|
@@ -49,6 +49,10 @@ export class Base {
|
|
|
49
49
|
owner: any;
|
|
50
50
|
description: any;
|
|
51
51
|
name: string;
|
|
52
|
+
_tags: Set<any>;
|
|
53
|
+
_packaging: Set<any>;
|
|
54
|
+
_directory: any;
|
|
55
|
+
_finalize: any;
|
|
52
56
|
ownerFor(property: any, data: any): any;
|
|
53
57
|
read(data: any, type: any): void;
|
|
54
58
|
named(name: any): void;
|
|
@@ -93,12 +97,11 @@ export class Base {
|
|
|
93
97
|
expand(object: any): any;
|
|
94
98
|
finalize(action: any): void;
|
|
95
99
|
execFinalize(): void;
|
|
96
|
-
|
|
100
|
+
_execFinalize(): void;
|
|
97
101
|
traverse(visitor: any, ...args: any[]): void;
|
|
98
102
|
_traverse(visited: any, visitor: any, ...args: any[]): boolean;
|
|
99
103
|
error(...args: any[]): void;
|
|
100
104
|
info(...args: any[]): void;
|
|
101
105
|
toString(): string;
|
|
102
106
|
toJSON(): any;
|
|
103
|
-
#private;
|
|
104
107
|
}
|
package/types/cluster.d.mts
CHANGED
|
@@ -216,27 +216,32 @@ export class Cluster extends Host {
|
|
|
216
216
|
collection: boolean;
|
|
217
217
|
writeable: boolean;
|
|
218
218
|
};
|
|
219
|
-
|
|
219
|
+
priority: {
|
|
220
220
|
type: string;
|
|
221
221
|
collection: boolean;
|
|
222
222
|
writeable: boolean;
|
|
223
223
|
};
|
|
224
|
-
|
|
224
|
+
weight: {
|
|
225
225
|
type: string;
|
|
226
226
|
collection: boolean;
|
|
227
227
|
writeable: boolean;
|
|
228
228
|
};
|
|
229
|
-
|
|
229
|
+
serial: {
|
|
230
230
|
type: string;
|
|
231
231
|
collection: boolean;
|
|
232
232
|
writeable: boolean;
|
|
233
233
|
};
|
|
234
|
-
|
|
234
|
+
vendor: {
|
|
235
235
|
type: string;
|
|
236
236
|
collection: boolean;
|
|
237
237
|
writeable: boolean;
|
|
238
238
|
};
|
|
239
|
-
|
|
239
|
+
chassis: {
|
|
240
|
+
type: string;
|
|
241
|
+
collection: boolean;
|
|
242
|
+
writeable: boolean;
|
|
243
|
+
};
|
|
244
|
+
architecture: {
|
|
240
245
|
type: string;
|
|
241
246
|
collection: boolean;
|
|
242
247
|
writeable: boolean;
|
|
@@ -326,6 +331,8 @@ export class Cluster extends Host {
|
|
|
326
331
|
};
|
|
327
332
|
};
|
|
328
333
|
};
|
|
334
|
+
_masters: Set<any>;
|
|
335
|
+
_backups: Set<any>;
|
|
329
336
|
routerId: number;
|
|
330
337
|
checkInterval: number;
|
|
331
338
|
set masters(value: Set<any>);
|
|
@@ -343,6 +350,5 @@ export class Cluster extends Host {
|
|
|
343
350
|
dependencies: string[];
|
|
344
351
|
};
|
|
345
352
|
}, void, unknown>;
|
|
346
|
-
#private;
|
|
347
353
|
}
|
|
348
354
|
import { Host } from "./host.mjs";
|
package/types/host.d.mts
CHANGED
|
@@ -86,27 +86,32 @@ export class Host extends Base {
|
|
|
86
86
|
collection: boolean;
|
|
87
87
|
writeable: boolean;
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
priority: {
|
|
90
90
|
type: string;
|
|
91
91
|
collection: boolean;
|
|
92
92
|
writeable: boolean;
|
|
93
93
|
};
|
|
94
|
-
|
|
94
|
+
weight: {
|
|
95
95
|
type: string;
|
|
96
96
|
collection: boolean;
|
|
97
97
|
writeable: boolean;
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
serial: {
|
|
100
100
|
type: string;
|
|
101
101
|
collection: boolean;
|
|
102
102
|
writeable: boolean;
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
vendor: {
|
|
105
105
|
type: string;
|
|
106
106
|
collection: boolean;
|
|
107
107
|
writeable: boolean;
|
|
108
108
|
};
|
|
109
|
-
|
|
109
|
+
chassis: {
|
|
110
|
+
type: string;
|
|
111
|
+
collection: boolean;
|
|
112
|
+
writeable: boolean;
|
|
113
|
+
};
|
|
114
|
+
architecture: {
|
|
110
115
|
type: string;
|
|
111
116
|
collection: boolean;
|
|
112
117
|
writeable: boolean;
|
|
@@ -169,6 +174,21 @@ export class Host extends Base {
|
|
|
169
174
|
};
|
|
170
175
|
};
|
|
171
176
|
priority: number;
|
|
177
|
+
_services: any[];
|
|
178
|
+
_extends: any[];
|
|
179
|
+
_aliases: Set<any>;
|
|
180
|
+
_networkInterfaces: Map<any, any>;
|
|
181
|
+
_provides: Set<any>;
|
|
182
|
+
_replaces: Set<any>;
|
|
183
|
+
_depends: Set<any>;
|
|
184
|
+
_master: boolean;
|
|
185
|
+
_os: any;
|
|
186
|
+
_distribution: any;
|
|
187
|
+
_deployment: any;
|
|
188
|
+
_chassis: any;
|
|
189
|
+
_vendor: any;
|
|
190
|
+
_architecture: any;
|
|
191
|
+
_serial: any;
|
|
172
192
|
_applyExtends(host: any): void;
|
|
173
193
|
set services(service: any[]);
|
|
174
194
|
get services(): any[];
|
|
@@ -241,7 +261,6 @@ export class Host extends Base {
|
|
|
241
261
|
hooks: any;
|
|
242
262
|
};
|
|
243
263
|
}, void, unknown>;
|
|
244
|
-
#private;
|
|
245
264
|
}
|
|
246
265
|
export class NetworkInterface extends Base {
|
|
247
266
|
static get typeDefinition(): {
|
|
@@ -378,6 +397,14 @@ export class NetworkInterface extends Base {
|
|
|
378
397
|
};
|
|
379
398
|
};
|
|
380
399
|
};
|
|
400
|
+
_ipAddresses: Map<any, any>;
|
|
401
|
+
_scope: any;
|
|
402
|
+
_metric: any;
|
|
403
|
+
_ssid: any;
|
|
404
|
+
_psk: any;
|
|
405
|
+
_network: any;
|
|
406
|
+
_kind: any;
|
|
407
|
+
_hostName: any;
|
|
381
408
|
extends: any[];
|
|
382
409
|
arpbridge: any;
|
|
383
410
|
hwaddr: any;
|
|
@@ -409,6 +436,5 @@ export class NetworkInterface extends Base {
|
|
|
409
436
|
get psk(): any;
|
|
410
437
|
set kind(value: any);
|
|
411
438
|
get kind(): any;
|
|
412
|
-
#private;
|
|
413
439
|
}
|
|
414
440
|
import { Base } from "./base.mjs";
|
package/types/network.d.mts
CHANGED
|
@@ -177,9 +177,9 @@ export class Network extends Owner {
|
|
|
177
177
|
scope: any;
|
|
178
178
|
metric: any;
|
|
179
179
|
gateway: any;
|
|
180
|
+
_bridge: any;
|
|
180
181
|
get network(): this;
|
|
181
182
|
set bridge(network: any);
|
|
182
183
|
get bridge(): any;
|
|
183
|
-
#private;
|
|
184
184
|
}
|
|
185
185
|
import { Owner } from "./owner.mjs";
|
package/types/owner.d.mts
CHANGED
|
@@ -126,6 +126,8 @@ export class Owner extends Base {
|
|
|
126
126
|
};
|
|
127
127
|
};
|
|
128
128
|
};
|
|
129
|
+
_membersByType: Map<any, any>;
|
|
130
|
+
_bridges: Set<any>;
|
|
129
131
|
_traverse(...args: any[]): boolean;
|
|
130
132
|
named(name: any): any;
|
|
131
133
|
typeObject(typeName: any): any;
|
|
@@ -148,21 +150,26 @@ export class Owner extends Base {
|
|
|
148
150
|
_resolveBridges(): void;
|
|
149
151
|
get derivedPackaging(): Set<any>;
|
|
150
152
|
networkAddresses(): Generator<any, void, any>;
|
|
153
|
+
_country: any;
|
|
151
154
|
set country(value: any);
|
|
152
155
|
get country(): any;
|
|
156
|
+
_locales: Set<any>;
|
|
153
157
|
set locales(value: any);
|
|
154
158
|
get locales(): any;
|
|
159
|
+
_timezone: any;
|
|
155
160
|
set timezone(value: any);
|
|
156
161
|
get timezone(): any;
|
|
162
|
+
_administratorEmail: any;
|
|
157
163
|
set administratorEmail(value: any);
|
|
158
164
|
get administratorEmail(): any;
|
|
165
|
+
_domain: any;
|
|
159
166
|
set domain(value: any);
|
|
160
167
|
get domain(): any;
|
|
161
168
|
get domains(): Set<any>;
|
|
162
169
|
get localDomains(): Set<any>;
|
|
163
170
|
get domainNames(): Set<any>;
|
|
171
|
+
_architectures: any;
|
|
164
172
|
set architectures(value: any);
|
|
165
173
|
get architectures(): any;
|
|
166
|
-
#private;
|
|
167
174
|
}
|
|
168
175
|
import { Base } from "./base.mjs";
|
package/types/service.d.mts
CHANGED
|
@@ -262,6 +262,12 @@ export class Service extends Base {
|
|
|
262
262
|
};
|
|
263
263
|
};
|
|
264
264
|
alias: any;
|
|
265
|
+
_weight: any;
|
|
266
|
+
_priority: any;
|
|
267
|
+
_type: any;
|
|
268
|
+
_port: any;
|
|
269
|
+
_ipAddresses: any;
|
|
270
|
+
_systemd: any;
|
|
265
271
|
get server(): any;
|
|
266
272
|
get domainName(): any;
|
|
267
273
|
get ipAddressOrDomainName(): any;
|
|
@@ -286,7 +292,6 @@ export class Service extends Base {
|
|
|
286
292
|
key: any;
|
|
287
293
|
toString: (maxKeyLength: any, ttl: any) => string;
|
|
288
294
|
}[];
|
|
289
|
-
#private;
|
|
290
295
|
}
|
|
291
296
|
export function sortByPriority(a: any, b: any): number;
|
|
292
297
|
import { DNSService } from "./module.mjs";
|
package/types/services/dns.d.mts
CHANGED
|
@@ -89,6 +89,10 @@ export class DNSService extends Service {
|
|
|
89
89
|
hasCatalog: boolean;
|
|
90
90
|
hasLinkLocalAdresses: boolean;
|
|
91
91
|
notify: boolean;
|
|
92
|
+
_source: any[];
|
|
93
|
+
_trusted: any[];
|
|
94
|
+
_protected: any[];
|
|
95
|
+
_open: any[];
|
|
92
96
|
serial: number;
|
|
93
97
|
refresh: number;
|
|
94
98
|
retry: number;
|
|
@@ -122,6 +126,5 @@ export class DNSService extends Service {
|
|
|
122
126
|
access: string;
|
|
123
127
|
};
|
|
124
128
|
}, void, unknown>;
|
|
125
|
-
#private;
|
|
126
129
|
}
|
|
127
130
|
import { Service } from "../service.mjs";
|
package/types/services/ntp.d.mts
CHANGED
|
@@ -11,12 +11,12 @@ export class NTPService extends Service {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
};
|
|
14
|
+
_source: any[];
|
|
14
15
|
get type(): string;
|
|
15
16
|
set source(value: any[]);
|
|
16
17
|
get source(): any[];
|
|
17
18
|
get systemdConfig(): (string | {
|
|
18
19
|
NTP: string;
|
|
19
20
|
})[];
|
|
20
|
-
#private;
|
|
21
21
|
}
|
|
22
22
|
import { Service } from "../service.mjs";
|