pmcf 1.43.1 → 1.44.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 +1 -1
- package/src/base.mjs +67 -33
- package/src/cluster.mjs +1 -1
- package/src/dns.mjs +5 -16
- package/src/host.mjs +18 -49
- package/src/location.mjs +1 -12
- package/src/network.mjs +8 -17
- package/src/owner.mjs +4 -6
- package/src/root.mjs +2 -4
- package/src/service.mjs +9 -24
- package/src/subnet.mjs +2 -9
- package/src/utils.mjs +5 -1
- package/types/base.d.mts +14 -4
- package/types/cluster.d.mts +1 -1
- package/types/dns.d.mts +14 -0
- package/types/host.d.mts +50 -8
- package/types/location.d.mts +26 -0
- package/types/network.d.mts +26 -0
- package/types/owner.d.mts +7 -1
- package/types/root.d.mts +1 -1
- package/types/service.d.mts +26 -2
- package/types/subnet.d.mts +13 -2
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -16,10 +16,10 @@ export class Base {
|
|
|
16
16
|
return {
|
|
17
17
|
name: "base",
|
|
18
18
|
properties: {
|
|
19
|
-
|
|
19
|
+
name: { type: "string" },
|
|
20
20
|
description: { type: "string" },
|
|
21
21
|
directory: { type: "string" },
|
|
22
|
-
owner: {}
|
|
22
|
+
owner: {}
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
}
|
|
@@ -81,9 +81,18 @@ export class Base {
|
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
83
|
} else {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
switch (typeDef.type) {
|
|
85
|
+
case "undefined":
|
|
86
|
+
break;
|
|
87
|
+
case "boolean":
|
|
88
|
+
case "string":
|
|
89
|
+
case "number":
|
|
90
|
+
this[slotName] = slot;
|
|
91
|
+
break;
|
|
92
|
+
|
|
93
|
+
default:
|
|
94
|
+
this[slotName] = new typesByName[typeDef.type](this, slot);
|
|
95
|
+
}
|
|
87
96
|
}
|
|
88
97
|
}
|
|
89
98
|
}
|
|
@@ -220,43 +229,68 @@ export class Base {
|
|
|
220
229
|
return `${this.fullName}(${this.typeName})`;
|
|
221
230
|
}
|
|
222
231
|
|
|
223
|
-
get propertyNames() {
|
|
224
|
-
return ["name", "description", "directory", "owner"];
|
|
225
|
-
}
|
|
226
|
-
|
|
227
232
|
toJSON() {
|
|
228
|
-
return extractFrom(this);
|
|
233
|
+
return extractFrom(this, this.constructor.typeDefinition);
|
|
229
234
|
}
|
|
230
235
|
}
|
|
231
236
|
|
|
232
|
-
export function extractFrom(object) {
|
|
233
|
-
|
|
237
|
+
export function extractFrom(object, typeDefinition) {
|
|
238
|
+
if (!typeDefinition || object === undefined) {
|
|
239
|
+
return object;
|
|
240
|
+
}
|
|
234
241
|
|
|
235
|
-
|
|
236
|
-
const value = object[p];
|
|
242
|
+
const json = {};
|
|
237
243
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
do {
|
|
245
|
+
for (const [name, def] of Object.entries(typeDefinition.properties)) {
|
|
246
|
+
let value = object[name];
|
|
247
|
+
|
|
248
|
+
switch (typeof value) {
|
|
249
|
+
case "function":
|
|
250
|
+
{
|
|
251
|
+
value = object[name]();
|
|
252
|
+
|
|
253
|
+
if (Array.isArray(value)) {
|
|
254
|
+
if (value.length > 0) {
|
|
255
|
+
json[name] = value;
|
|
256
|
+
}
|
|
257
|
+
} else {
|
|
258
|
+
if (typeof value?.next === "function") {
|
|
259
|
+
value = [...value];
|
|
260
|
+
if (value.length > 0) {
|
|
261
|
+
json[name] = value;
|
|
262
|
+
}
|
|
263
|
+
} else {
|
|
264
|
+
json[name] = value;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
246
267
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
268
|
+
break;
|
|
269
|
+
case "object":
|
|
270
|
+
if (value instanceof Base) {
|
|
271
|
+
json[name] = { type: value.typeName };
|
|
272
|
+
if (value.name) {
|
|
273
|
+
json[name].name = value.name;
|
|
274
|
+
}
|
|
250
275
|
} else {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
276
|
+
if (Array.isArray(value)) {
|
|
277
|
+
json[name] = value;
|
|
278
|
+
} else {
|
|
279
|
+
json[name] = Object.fromEntries(
|
|
280
|
+
Object.entries(value).map(([k, v]) => [k, extractFrom(v)])
|
|
281
|
+
);
|
|
282
|
+
}
|
|
254
283
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
284
|
+
break;
|
|
285
|
+
case "undefined":
|
|
286
|
+
break;
|
|
287
|
+
|
|
288
|
+
default:
|
|
289
|
+
json[name] = value;
|
|
290
|
+
}
|
|
259
291
|
}
|
|
260
|
-
|
|
292
|
+
typeDefinition = typeDefinition?.extends?.typeDefinition;
|
|
293
|
+
} while (typeDefinition);
|
|
294
|
+
|
|
261
295
|
return json;
|
|
262
296
|
}
|
package/src/cluster.mjs
CHANGED
package/src/dns.mjs
CHANGED
|
@@ -14,15 +14,15 @@ export class DNSService extends Base {
|
|
|
14
14
|
static {
|
|
15
15
|
addType(this);
|
|
16
16
|
}
|
|
17
|
-
|
|
17
|
+
|
|
18
18
|
static get typeDefinition() {
|
|
19
19
|
return {
|
|
20
20
|
name: "dns",
|
|
21
21
|
properties: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
hasSVRRecords: { type: "boolean" },
|
|
23
|
+
hasCatalog: { type: "boolean" },
|
|
24
|
+
recordTTL: { type: "string" }
|
|
25
|
+
/*soaUpdates: {},
|
|
26
26
|
forwardsTo: {},
|
|
27
27
|
allowedUpdates: {}*/
|
|
28
28
|
}
|
|
@@ -50,17 +50,6 @@ export class DNSService extends Base {
|
|
|
50
50
|
return [this.owner.domain];
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
get propertyNames() {
|
|
54
|
-
return [
|
|
55
|
-
"recordTTL",
|
|
56
|
-
"soaUpdates",
|
|
57
|
-
"hasSVRRecords",
|
|
58
|
-
"hasCatalog",
|
|
59
|
-
"forwardsTo",
|
|
60
|
-
"allowedUpdates"
|
|
61
|
-
];
|
|
62
|
-
}
|
|
63
|
-
|
|
64
53
|
async resolvedConfig() {
|
|
65
54
|
const dnsServices = (await Array.fromAsync(this.services())).sort(
|
|
66
55
|
(a, b) => a.priority - b.priority
|
package/src/host.mjs
CHANGED
|
@@ -30,17 +30,17 @@ export class Host extends Base {
|
|
|
30
30
|
static get typeDefinition() {
|
|
31
31
|
return {
|
|
32
32
|
name: "host",
|
|
33
|
-
extends:
|
|
33
|
+
extends: Base,
|
|
34
34
|
properties: {
|
|
35
35
|
networkInterfaces: { type: "network_interface", collection: true },
|
|
36
|
-
services: { type: "service", collection: true }
|
|
37
|
-
|
|
38
|
-
distribution: {},
|
|
39
|
-
deployment: {},
|
|
40
|
-
master: { },
|
|
41
|
-
model: {},
|
|
42
|
-
replaces: { },
|
|
43
|
-
depends: {
|
|
36
|
+
services: { type: "service", collection: true },
|
|
37
|
+
os: { type: "string" },
|
|
38
|
+
distribution: { type: "string" },
|
|
39
|
+
deployment: { type: "string" },
|
|
40
|
+
master: { type: "boolean" },
|
|
41
|
+
model: { type: "string" },
|
|
42
|
+
replaces: { type: "string" },
|
|
43
|
+
depends: { type: "string" }
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
@@ -273,20 +273,6 @@ export class Host extends Base {
|
|
|
273
273
|
return readFile(join(this.directory, `ssh_host_${type}_key.pub`), "utf8");
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
-
get propertyNames() {
|
|
277
|
-
return [
|
|
278
|
-
...super.propertyNames,
|
|
279
|
-
"os",
|
|
280
|
-
"distribution",
|
|
281
|
-
"deployment",
|
|
282
|
-
"master",
|
|
283
|
-
"model",
|
|
284
|
-
"replaces",
|
|
285
|
-
"depends",
|
|
286
|
-
"networkInterfaces"
|
|
287
|
-
];
|
|
288
|
-
}
|
|
289
|
-
|
|
290
276
|
toJSON() {
|
|
291
277
|
return {
|
|
292
278
|
...super.toJSON(),
|
|
@@ -309,19 +295,18 @@ export class NetworkInterface extends Base {
|
|
|
309
295
|
static get typeDefinition() {
|
|
310
296
|
return {
|
|
311
297
|
name: "network_interface",
|
|
312
|
-
extends:
|
|
298
|
+
extends: Base,
|
|
313
299
|
properties: {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
300
|
+
hwaddr: { type: "string" },
|
|
301
|
+
scope: { type: "string" },
|
|
302
|
+
kind: { type: "string" },
|
|
303
|
+
ssid: { type: "string" },
|
|
304
|
+
psk: { type: "string" },
|
|
305
|
+
metric: { type: "number" },
|
|
306
|
+
ipAddresses: { type: "string", isCollection: true },
|
|
317
307
|
network: {},
|
|
318
308
|
gateway: {},
|
|
319
|
-
|
|
320
|
-
psk: {},
|
|
321
|
-
scope: {},
|
|
322
|
-
metric: {},
|
|
323
|
-
kind: {},
|
|
324
|
-
ipAddresses: {}*/
|
|
309
|
+
arpbridge: {}
|
|
325
310
|
}
|
|
326
311
|
};
|
|
327
312
|
}
|
|
@@ -482,20 +467,4 @@ export class NetworkInterface extends Base {
|
|
|
482
467
|
get kind() {
|
|
483
468
|
return this.#kind || this.network?.kind;
|
|
484
469
|
}
|
|
485
|
-
|
|
486
|
-
get propertyNames() {
|
|
487
|
-
return [
|
|
488
|
-
...super.propertyNames,
|
|
489
|
-
"arpbridge",
|
|
490
|
-
"hwaddr",
|
|
491
|
-
"network",
|
|
492
|
-
"gateway",
|
|
493
|
-
"ssid",
|
|
494
|
-
"psk",
|
|
495
|
-
"scope",
|
|
496
|
-
"metric",
|
|
497
|
-
"kind",
|
|
498
|
-
"ipAddresses"
|
|
499
|
-
];
|
|
500
|
-
}
|
|
501
470
|
}
|
package/src/location.mjs
CHANGED
|
@@ -9,7 +9,7 @@ export class Location extends Owner {
|
|
|
9
9
|
static get typeDefinition() {
|
|
10
10
|
return {
|
|
11
11
|
name: "location",
|
|
12
|
-
extends:
|
|
12
|
+
extends: Owner,
|
|
13
13
|
properties: {
|
|
14
14
|
networks: { type: "network", collection: true },
|
|
15
15
|
hosts: { type: "host", collection: true },
|
|
@@ -35,15 +35,4 @@ export class Location extends Owner {
|
|
|
35
35
|
get network() {
|
|
36
36
|
return [...this.typeList("network")][0] || super.network;
|
|
37
37
|
}
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
*subnets() {
|
|
41
|
-
// yield* super.subnets();
|
|
42
|
-
|
|
43
|
-
for(const network of this.networks()) {
|
|
44
|
-
// console.log(network.toString());
|
|
45
|
-
yield* network.typeList("subnet");
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
*/
|
|
49
38
|
}
|
package/src/network.mjs
CHANGED
|
@@ -16,18 +16,18 @@ export class Network extends Owner {
|
|
|
16
16
|
static get typeDefinition() {
|
|
17
17
|
return {
|
|
18
18
|
name: "network",
|
|
19
|
-
extends:
|
|
19
|
+
extends: Owner,
|
|
20
20
|
properties: {
|
|
21
21
|
networks: { type: "network", collection: true },
|
|
22
22
|
hosts: { type: "host", collection: true },
|
|
23
23
|
clusters: { type: "cluster", collection: true },
|
|
24
24
|
subnets: { type: "subnet", collection: true },
|
|
25
|
-
dns: { type: "dns", collection: false }
|
|
25
|
+
dns: { type: "dns", collection: false },
|
|
26
|
+
//metric: { type: "number" }
|
|
26
27
|
|
|
27
|
-
/*
|
|
28
|
-
scope: {},
|
|
29
|
-
|
|
30
|
-
bridge: {},
|
|
28
|
+
/*kind: { type: "string" },
|
|
29
|
+
scope: { type: "string" },
|
|
30
|
+
/*bridge: {},
|
|
31
31
|
gateway: {}*/
|
|
32
32
|
}
|
|
33
33
|
};
|
|
@@ -41,6 +41,8 @@ export class Network extends Owner {
|
|
|
41
41
|
delete data.bridge;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
//this.read(data);
|
|
45
|
+
|
|
44
46
|
Object.assign(this, data);
|
|
45
47
|
|
|
46
48
|
if (typeof this.gateway === "string") {
|
|
@@ -73,15 +75,4 @@ export class Network extends Owner {
|
|
|
73
75
|
set bridge(bridge) {
|
|
74
76
|
this.#bridge = bridge;
|
|
75
77
|
}
|
|
76
|
-
|
|
77
|
-
get propertyNames() {
|
|
78
|
-
return [
|
|
79
|
-
...super.propertyNames,
|
|
80
|
-
"kind",
|
|
81
|
-
"scope",
|
|
82
|
-
"metric",
|
|
83
|
-
"bridge",
|
|
84
|
-
"gateway"
|
|
85
|
-
];
|
|
86
|
-
}
|
|
87
78
|
}
|
package/src/owner.mjs
CHANGED
|
@@ -17,13 +17,15 @@ export class Owner extends Base {
|
|
|
17
17
|
static get typeDefinition() {
|
|
18
18
|
return {
|
|
19
19
|
name: "owner",
|
|
20
|
-
extends:
|
|
20
|
+
extends: Base,
|
|
21
21
|
properties: {
|
|
22
22
|
networks: { type: "network", collection: true },
|
|
23
23
|
hosts: { type: "host", collection: true },
|
|
24
24
|
clusters: { type: "cluster", collection: true },
|
|
25
25
|
subnets: { type: "subnet", collection: true },
|
|
26
|
-
dns: { type: "dns", collection: false }
|
|
26
|
+
dns: { type: "dns", collection: false },
|
|
27
|
+
domain: { type: "string" },
|
|
28
|
+
administratorEmail: { type: "string" }
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
31
|
}
|
|
@@ -284,10 +286,6 @@ export class Owner extends Base {
|
|
|
284
286
|
}
|
|
285
287
|
}
|
|
286
288
|
|
|
287
|
-
get propertyNames() {
|
|
288
|
-
return [...super.propertyNames, "domain", "administratorEmail", "dns"];
|
|
289
|
-
}
|
|
290
|
-
|
|
291
289
|
toJSON() {
|
|
292
290
|
const json = super.toJSON();
|
|
293
291
|
|
package/src/root.mjs
CHANGED
|
@@ -5,7 +5,6 @@ import { Location } from "./location.mjs";
|
|
|
5
5
|
import { addType, types } from "./types.mjs";
|
|
6
6
|
|
|
7
7
|
export class Root extends Location {
|
|
8
|
-
|
|
9
8
|
static {
|
|
10
9
|
addType(this);
|
|
11
10
|
}
|
|
@@ -13,9 +12,8 @@ export class Root extends Location {
|
|
|
13
12
|
static get typeDefinition() {
|
|
14
13
|
return {
|
|
15
14
|
name: "root",
|
|
16
|
-
extends:
|
|
17
|
-
properties: {
|
|
18
|
-
}
|
|
15
|
+
extends: Location,
|
|
16
|
+
properties: {}
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
19
|
|
package/src/service.mjs
CHANGED
|
@@ -29,17 +29,17 @@ export class Service extends Base {
|
|
|
29
29
|
static get typeDefinition() {
|
|
30
30
|
return {
|
|
31
31
|
name: "service",
|
|
32
|
-
extends:
|
|
32
|
+
extends: Base,
|
|
33
33
|
properties: {
|
|
34
|
-
|
|
34
|
+
ipAddresses: {},
|
|
35
35
|
addresses: {},
|
|
36
|
-
port: {},
|
|
37
|
-
protocol: {},
|
|
38
|
-
alias: {},
|
|
39
|
-
type: {},
|
|
40
|
-
master: {},
|
|
41
|
-
priority: {},
|
|
42
|
-
weight: {}
|
|
36
|
+
port: { type: "number" },
|
|
37
|
+
protocol: { type: "string" },
|
|
38
|
+
alias: { type: "string" },
|
|
39
|
+
type: { type: "string" },
|
|
40
|
+
master: { type: "boolean" },
|
|
41
|
+
priority: { type: "number" },
|
|
42
|
+
weight: { type: "number" }
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
@@ -135,19 +135,4 @@ export class Service extends Base {
|
|
|
135
135
|
get type() {
|
|
136
136
|
return this.#type || this.name;
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
get propertyNames() {
|
|
140
|
-
return [
|
|
141
|
-
...super.propertyNames,
|
|
142
|
-
"ipAddresses",
|
|
143
|
-
"addresses",
|
|
144
|
-
"port",
|
|
145
|
-
"protocol",
|
|
146
|
-
"alias",
|
|
147
|
-
"type",
|
|
148
|
-
"master",
|
|
149
|
-
"priority",
|
|
150
|
-
"weight"
|
|
151
|
-
];
|
|
152
|
-
}
|
|
153
138
|
}
|
package/src/subnet.mjs
CHANGED
|
@@ -12,13 +12,10 @@ export class Subnet extends Base {
|
|
|
12
12
|
static get typeDefinition() {
|
|
13
13
|
return {
|
|
14
14
|
name: "subnet",
|
|
15
|
-
extends: "base",
|
|
16
15
|
properties: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
networks: { type: "network", collection true },
|
|
16
|
+
address: { type: "string" },
|
|
17
|
+
networks: { type: "network", collection: true },
|
|
20
18
|
prefixLength: { type: "number", writeable: false }
|
|
21
|
-
*/
|
|
22
19
|
}
|
|
23
20
|
};
|
|
24
21
|
}
|
|
@@ -65,10 +62,6 @@ export class Subnet extends Base {
|
|
|
65
62
|
return this.name;
|
|
66
63
|
}
|
|
67
64
|
|
|
68
|
-
get propertyNames() {
|
|
69
|
-
return [...super.propertyNames, "networks", "prefixLength"];
|
|
70
|
-
}
|
|
71
|
-
|
|
72
65
|
_traverse(...args) {
|
|
73
66
|
if (super._traverse(...args)) {
|
|
74
67
|
for (const network of this.networks) {
|
package/src/utils.mjs
CHANGED
|
@@ -147,6 +147,9 @@ export function normalizeCIDR(address) {
|
|
|
147
147
|
if (n === IPV4_LOCALHOST) {
|
|
148
148
|
prefixLength = 8;
|
|
149
149
|
prefix = _decode(definition, n, prefixLength);
|
|
150
|
+
} else if (n === IPV6_LOCALHOST) {
|
|
151
|
+
prefixLength = 127;
|
|
152
|
+
prefix = _decode(definition, n, prefixLength);
|
|
150
153
|
} else {
|
|
151
154
|
return {};
|
|
152
155
|
}
|
|
@@ -156,4 +159,5 @@ export function normalizeCIDR(address) {
|
|
|
156
159
|
return { prefix, prefixLength, cidr: `${prefix}/${prefixLength}` };
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
const IPV4_LOCALHOST = _encode(ipv4,
|
|
162
|
+
const IPV4_LOCALHOST = _encode(ipv4, "127.0.0.1");
|
|
163
|
+
const IPV6_LOCALHOST = _encode(ipv6, "::1");
|
package/types/base.d.mts
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
|
-
export function extractFrom(object: any):
|
|
1
|
+
export function extractFrom(object: any, typeDefinition: any): any;
|
|
2
2
|
export class Base {
|
|
3
3
|
static get typeName(): string;
|
|
4
4
|
static get typeDefinition(): {
|
|
5
5
|
name: string;
|
|
6
|
-
properties: {
|
|
6
|
+
properties: {
|
|
7
|
+
name: {
|
|
8
|
+
type: string;
|
|
9
|
+
};
|
|
10
|
+
description: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
directory: {
|
|
14
|
+
type: string;
|
|
15
|
+
};
|
|
16
|
+
owner: {};
|
|
17
|
+
};
|
|
7
18
|
};
|
|
8
19
|
static get nameLookupName(): string;
|
|
9
20
|
static get typeFileName(): string;
|
|
@@ -34,7 +45,6 @@ export class Base {
|
|
|
34
45
|
error(...args: any[]): void;
|
|
35
46
|
info(...args: any[]): void;
|
|
36
47
|
toString(): string;
|
|
37
|
-
|
|
38
|
-
toJSON(): {};
|
|
48
|
+
toJSON(): any;
|
|
39
49
|
#private;
|
|
40
50
|
}
|
package/types/cluster.d.mts
CHANGED
package/types/dns.d.mts
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
export class DNSService extends Base {
|
|
2
|
+
static get typeDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
properties: {
|
|
5
|
+
hasSVRRecords: {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
hasCatalog: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
recordTTL: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
2
16
|
allowedUpdates: any[];
|
|
3
17
|
recordTTL: string;
|
|
4
18
|
soaUpdates: number[];
|
package/types/host.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class Host extends Base {
|
|
2
2
|
static get typeDefinition(): {
|
|
3
3
|
name: string;
|
|
4
|
-
extends:
|
|
4
|
+
extends: typeof Base;
|
|
5
5
|
properties: {
|
|
6
6
|
networkInterfaces: {
|
|
7
7
|
type: string;
|
|
@@ -11,6 +11,27 @@ export class Host extends Base {
|
|
|
11
11
|
type: string;
|
|
12
12
|
collection: boolean;
|
|
13
13
|
};
|
|
14
|
+
os: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
distribution: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
deployment: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
master: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
model: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
replaces: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
depends: {
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
14
35
|
};
|
|
15
36
|
};
|
|
16
37
|
static prepareData(root: any, data: any): Promise<typeof Host>;
|
|
@@ -48,18 +69,39 @@ export class Host extends Base {
|
|
|
48
69
|
get ipAddressesWithPrefixLength(): any[];
|
|
49
70
|
get ipAddress(): any;
|
|
50
71
|
publicKey(type?: string): Promise<any>;
|
|
51
|
-
toJSON(): {
|
|
52
|
-
extends: any[];
|
|
53
|
-
networkInterfaces: any;
|
|
54
|
-
services: any;
|
|
55
|
-
};
|
|
56
72
|
#private;
|
|
57
73
|
}
|
|
58
74
|
export class NetworkInterface extends Base {
|
|
59
75
|
static get typeDefinition(): {
|
|
60
76
|
name: string;
|
|
61
|
-
extends:
|
|
62
|
-
properties: {
|
|
77
|
+
extends: typeof Base;
|
|
78
|
+
properties: {
|
|
79
|
+
hwaddr: {
|
|
80
|
+
type: string;
|
|
81
|
+
};
|
|
82
|
+
scope: {
|
|
83
|
+
type: string;
|
|
84
|
+
};
|
|
85
|
+
kind: {
|
|
86
|
+
type: string;
|
|
87
|
+
};
|
|
88
|
+
ssid: {
|
|
89
|
+
type: string;
|
|
90
|
+
};
|
|
91
|
+
psk: {
|
|
92
|
+
type: string;
|
|
93
|
+
};
|
|
94
|
+
metric: {
|
|
95
|
+
type: string;
|
|
96
|
+
};
|
|
97
|
+
ipAddresses: {
|
|
98
|
+
type: string;
|
|
99
|
+
isCollection: boolean;
|
|
100
|
+
};
|
|
101
|
+
network: {};
|
|
102
|
+
gateway: {};
|
|
103
|
+
arpbridge: {};
|
|
104
|
+
};
|
|
63
105
|
};
|
|
64
106
|
arpbridge: any;
|
|
65
107
|
hwaddr: any;
|
package/types/location.d.mts
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export class Location extends Owner {
|
|
2
|
+
static get typeDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
extends: typeof Owner;
|
|
5
|
+
properties: {
|
|
6
|
+
networks: {
|
|
7
|
+
type: string;
|
|
8
|
+
collection: boolean;
|
|
9
|
+
};
|
|
10
|
+
hosts: {
|
|
11
|
+
type: string;
|
|
12
|
+
collection: boolean;
|
|
13
|
+
};
|
|
14
|
+
clusters: {
|
|
15
|
+
type: string;
|
|
16
|
+
collection: boolean;
|
|
17
|
+
};
|
|
18
|
+
subnets: {
|
|
19
|
+
type: string;
|
|
20
|
+
collection: boolean;
|
|
21
|
+
};
|
|
22
|
+
dns: {
|
|
23
|
+
type: string;
|
|
24
|
+
collection: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
2
28
|
get location(): this;
|
|
3
29
|
}
|
|
4
30
|
import { Owner } from "./owner.mjs";
|
package/types/network.d.mts
CHANGED
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export class Network extends Owner {
|
|
2
|
+
static get typeDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
extends: typeof Owner;
|
|
5
|
+
properties: {
|
|
6
|
+
networks: {
|
|
7
|
+
type: string;
|
|
8
|
+
collection: boolean;
|
|
9
|
+
};
|
|
10
|
+
hosts: {
|
|
11
|
+
type: string;
|
|
12
|
+
collection: boolean;
|
|
13
|
+
};
|
|
14
|
+
clusters: {
|
|
15
|
+
type: string;
|
|
16
|
+
collection: boolean;
|
|
17
|
+
};
|
|
18
|
+
subnets: {
|
|
19
|
+
type: string;
|
|
20
|
+
collection: boolean;
|
|
21
|
+
};
|
|
22
|
+
dns: {
|
|
23
|
+
type: string;
|
|
24
|
+
collection: boolean;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
2
28
|
constructor(owner: any, data: any);
|
|
3
29
|
kind: any;
|
|
4
30
|
scope: any;
|
package/types/owner.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export class Owner extends Base {
|
|
2
2
|
static get typeDefinition(): {
|
|
3
3
|
name: string;
|
|
4
|
-
extends:
|
|
4
|
+
extends: typeof Base;
|
|
5
5
|
properties: {
|
|
6
6
|
networks: {
|
|
7
7
|
type: string;
|
|
@@ -23,6 +23,12 @@ export class Owner extends Base {
|
|
|
23
23
|
type: string;
|
|
24
24
|
collection: boolean;
|
|
25
25
|
};
|
|
26
|
+
domain: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
administratorEmail: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
26
32
|
};
|
|
27
33
|
};
|
|
28
34
|
constructor(owner: any, data?: {});
|
package/types/root.d.mts
CHANGED
package/types/service.d.mts
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
export class Service extends Base {
|
|
2
2
|
static get typeDefinition(): {
|
|
3
3
|
name: string;
|
|
4
|
-
extends:
|
|
5
|
-
properties: {
|
|
4
|
+
extends: typeof Base;
|
|
5
|
+
properties: {
|
|
6
|
+
ipAddresses: {};
|
|
7
|
+
addresses: {};
|
|
8
|
+
port: {
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
11
|
+
protocol: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
alias: {
|
|
15
|
+
type: string;
|
|
16
|
+
};
|
|
17
|
+
type: {
|
|
18
|
+
type: string;
|
|
19
|
+
};
|
|
20
|
+
master: {
|
|
21
|
+
type: string;
|
|
22
|
+
};
|
|
23
|
+
priority: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
weight: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
6
30
|
};
|
|
7
31
|
alias: any;
|
|
8
32
|
get protocol(): any;
|
package/types/subnet.d.mts
CHANGED
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
export class Subnet extends Base {
|
|
2
2
|
static get typeDefinition(): {
|
|
3
3
|
name: string;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
properties: {
|
|
5
|
+
address: {
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
networks: {
|
|
9
|
+
type: string;
|
|
10
|
+
collection: boolean;
|
|
11
|
+
};
|
|
12
|
+
prefixLength: {
|
|
13
|
+
type: string;
|
|
14
|
+
writeable: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
6
17
|
};
|
|
7
18
|
networks: Set<any>;
|
|
8
19
|
matchesAddress(address: any): any;
|