pmcf 3.9.3 → 3.10.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 +3 -3
- package/src/cluster.mjs +1 -1
- package/src/extra-source-service.mjs +3 -2
- package/src/filter.mjs +1 -1
- package/src/host.mjs +3 -8
- package/src/location.mjs +1 -1
- package/src/network-interfaces/ethernet.mjs +1 -1
- package/src/network-interfaces/loopback.mjs +1 -1
- package/src/network-interfaces/network-interface.mjs +8 -8
- package/src/network-interfaces/tun.mjs +1 -1
- package/src/network-interfaces/wireguard.mjs +1 -1
- package/src/network-interfaces/wlan.mjs +1 -1
- package/src/network-support.mjs +4 -2
- package/src/network.mjs +3 -3
- package/src/owner.mjs +1 -1
- package/src/root.mjs +1 -1
- package/src/service.mjs +6 -6
- package/src/services/bind.mjs +30 -27
- package/src/services/chrony.mjs +1 -1
- package/src/services/headscale.mjs +1 -1
- package/src/services/influxdb.mjs +2 -2
- package/src/services/kea.mjs +2 -2
- package/src/services/mosquitto.mjs +3 -3
- package/src/services/openldap.mjs +4 -4
- package/src/services/systemd-journal-remote.mjs +1 -1
- package/src/services/systemd-journal-upload.mjs +1 -1
- package/src/services/systemd-journal.mjs +1 -1
- package/src/services/systemd-resolved.mjs +1 -1
- package/src/services/systemd-timesyncd.mjs +1 -1
- package/src/subnet.mjs +1 -1
- package/src/types.mjs +8 -7
- package/types/base.d.mts +1 -1
- package/types/cluster.d.mts +6 -6
- package/types/extra-source-service.d.mts +9 -8
- package/types/host.d.mts +2 -2
- package/types/location.d.mts +7 -7
- package/types/network-interfaces/ethernet.d.mts +6 -6
- package/types/network-interfaces/loopback.d.mts +5 -5
- package/types/network-interfaces/network-interface.d.mts +4 -4
- package/types/network-interfaces/tun.d.mts +5 -5
- package/types/network-interfaces/wireguard.d.mts +5 -5
- package/types/network-interfaces/wlan.d.mts +8 -8
- package/types/network-support.d.mts +3 -2
- package/types/network.d.mts +4 -4
- package/types/owner.d.mts +3 -3
- package/types/root.d.mts +8 -8
- package/types/service.d.mts +6 -6
- package/types/services/bind.d.mts +12 -12
- package/types/services/chrony.d.mts +7 -7
- package/types/services/headscale.d.mts +7 -7
- package/types/services/influxdb.d.mts +5 -5
- package/types/services/kea.d.mts +5 -5
- package/types/services/mosquitto.d.mts +6 -6
- package/types/services/openldap.d.mts +6 -6
- package/types/services/systemd-journal-remote.d.mts +5 -5
- package/types/services/systemd-journal-upload.d.mts +5 -5
- package/types/services/systemd-journal.d.mts +5 -5
- package/types/services/systemd-resolved.d.mts +7 -7
- package/types/services/systemd-timesyncd.d.mts +7 -7
- package/types/subnet.d.mts +1 -1
package/package.json
CHANGED
package/src/base.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import { asArray } from "./utils.mjs";
|
|
|
17
17
|
const BaseTypeDefinition = {
|
|
18
18
|
name: "base",
|
|
19
19
|
owners: [],
|
|
20
|
-
|
|
20
|
+
attributes: {
|
|
21
21
|
owner: { type: "base", collection: false, writable: false },
|
|
22
22
|
type: string_attribute,
|
|
23
23
|
name: name_attribute_writable,
|
|
@@ -228,7 +228,7 @@ export class Base {
|
|
|
228
228
|
this._properties = data.properties;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
-
for (const [name, attribute] of Object.entries(type.
|
|
231
|
+
for (const [name, attribute] of Object.entries(type.attributes)) {
|
|
232
232
|
if (attribute.writable) {
|
|
233
233
|
const value = this.expand(data[name]);
|
|
234
234
|
|
|
@@ -616,7 +616,7 @@ export function extractFrom(
|
|
|
616
616
|
const json = {};
|
|
617
617
|
|
|
618
618
|
do {
|
|
619
|
-
for (const [name, def] of Object.entries(typeDefinition.
|
|
619
|
+
for (const [name, def] of Object.entries(typeDefinition.attributes)) {
|
|
620
620
|
let value = object[name];
|
|
621
621
|
|
|
622
622
|
switch (typeof value) {
|
package/src/cluster.mjs
CHANGED
|
@@ -12,7 +12,7 @@ const ClusterTypeDefinition = {
|
|
|
12
12
|
owners: [Owner.typeDefinition, "network", "location", "root"],
|
|
13
13
|
priority: 0.7,
|
|
14
14
|
extends: Host.typeDefinition,
|
|
15
|
-
|
|
15
|
+
attributes: {
|
|
16
16
|
routerId: { ...number_attribute_writable },
|
|
17
17
|
masters: { type: "network_interface", collection: true, writable: true },
|
|
18
18
|
backups: { type: "network_interface", collection: true, writable: true },
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { addType } from "./types.mjs";
|
|
2
2
|
import { Service, ServiceTypeDefinition } from "./service.mjs";
|
|
3
|
+
import { networkAddressType } from "pmcf";
|
|
3
4
|
|
|
4
5
|
export const ExtraSourceServiceTypeDefinition = {
|
|
5
6
|
name: "extra-source-service",
|
|
6
7
|
owners: ServiceTypeDefinition.owners,
|
|
7
8
|
extends: ServiceTypeDefinition,
|
|
8
9
|
priority: 0.1,
|
|
9
|
-
|
|
10
|
-
source: { type:
|
|
10
|
+
attributes: {
|
|
11
|
+
source: { type: networkAddressType, collection: true, writable: true }
|
|
11
12
|
}
|
|
12
13
|
};
|
|
13
14
|
|
package/src/filter.mjs
CHANGED
|
@@ -55,7 +55,7 @@ export function* objectFilter(type, objects, filter) {
|
|
|
55
55
|
return false;
|
|
56
56
|
};
|
|
57
57
|
for (let t = type; t; t = t.extends) {
|
|
58
|
-
for (const property of Object.values(t.
|
|
58
|
+
for (const property of Object.values(t.attributes)) {
|
|
59
59
|
switch (property.type[0]) {
|
|
60
60
|
case "boolean":
|
|
61
61
|
if (
|
package/src/host.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
boolean_attribute_false
|
|
10
10
|
} from "pacc";
|
|
11
11
|
import { ServiceOwner, Base, addresses } from "pmcf";
|
|
12
|
-
import {
|
|
12
|
+
import { networkAddressAttributes } from "./network-support.mjs";
|
|
13
13
|
import { addHook } from "./hooks.mjs";
|
|
14
14
|
import {
|
|
15
15
|
domainFromDominName,
|
|
@@ -29,8 +29,8 @@ const HostTypeDefinition = {
|
|
|
29
29
|
priority: 0.5,
|
|
30
30
|
owners: ["owner", "network", "root"],
|
|
31
31
|
extends: Base.typeDefinition,
|
|
32
|
-
|
|
33
|
-
...
|
|
32
|
+
attributes: {
|
|
33
|
+
...networkAddressAttributes,
|
|
34
34
|
networkInterfaces: {
|
|
35
35
|
type: "network_interface",
|
|
36
36
|
collection: true,
|
|
@@ -107,11 +107,6 @@ export class Host extends ServiceOwner {
|
|
|
107
107
|
return HostTypeDefinition;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
constructor(owner, data) {
|
|
111
|
-
super(owner, data);
|
|
112
|
-
owner.addObject(this);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
110
|
read(data, type) {
|
|
116
111
|
super.read(data, type);
|
|
117
112
|
|
package/src/location.mjs
CHANGED
|
@@ -10,7 +10,7 @@ export const EthernetNetworkInterfaceTypeDefinition = {
|
|
|
10
10
|
owners: NetworkInterfaceTypeDefinition.owners,
|
|
11
11
|
extends: NetworkInterfaceTypeDefinition,
|
|
12
12
|
priority: 0.1,
|
|
13
|
-
|
|
13
|
+
attributes: {
|
|
14
14
|
arpbridge: { type: "network_interface", collection: true, writable: true }
|
|
15
15
|
}
|
|
16
16
|
};
|
|
@@ -3,8 +3,8 @@ import { hasWellKnownSubnet, normalizeIP } from "ip-utilties";
|
|
|
3
3
|
import { string_attribute_writable, hostname_attribute } from "pacc";
|
|
4
4
|
import { Base, cidrAddresses } from "pmcf";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
networkAttributes,
|
|
7
|
+
networkAddressAttributes
|
|
8
8
|
} from "../network-support.mjs";
|
|
9
9
|
import { asArray, writeLines, sectionLines } from "../utils.mjs";
|
|
10
10
|
import { addType } from "../types.mjs";
|
|
@@ -35,9 +35,9 @@ export const NetworkInterfaceTypeDefinition = {
|
|
|
35
35
|
|
|
36
36
|
return NetworkInterface;
|
|
37
37
|
},
|
|
38
|
-
|
|
39
|
-
...
|
|
40
|
-
...
|
|
38
|
+
attributes: {
|
|
39
|
+
...networkAttributes,
|
|
40
|
+
...networkAddressAttributes,
|
|
41
41
|
|
|
42
42
|
services: { type: "service", collection: true, writable: true },
|
|
43
43
|
hostName: { ...hostname_attribute, writable: true },
|
|
@@ -133,7 +133,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
133
133
|
return (
|
|
134
134
|
this.extendedProperty("_scope") ??
|
|
135
135
|
this.network?.scope ??
|
|
136
|
-
|
|
136
|
+
networkAttributes.scope.default
|
|
137
137
|
);
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -153,7 +153,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
153
153
|
return (
|
|
154
154
|
this.extendedProperty("_metric") ??
|
|
155
155
|
this.network?.metric ??
|
|
156
|
-
|
|
156
|
+
networkAttributes.metric.default
|
|
157
157
|
);
|
|
158
158
|
}
|
|
159
159
|
|
|
@@ -162,7 +162,7 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
get mtu() {
|
|
165
|
-
return this.extendedProperty("_mtu"); // ??
|
|
165
|
+
return this.extendedProperty("_mtu"); // ?? networkAttributes.mtu.default;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
set class(value) {
|
|
@@ -8,7 +8,7 @@ const WireguardNetworkInterfaceTypeDefinition = {
|
|
|
8
8
|
owners: NetworkInterfaceTypeDefinition.owners,
|
|
9
9
|
extends: NetworkInterfaceTypeDefinition,
|
|
10
10
|
priority: 0.1,
|
|
11
|
-
|
|
11
|
+
attributes: {}
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export class WireguardNetworkInterface extends SkeletonNetworkInterface {
|
|
@@ -15,7 +15,7 @@ const WLANNetworkInterfaceTypeDefinition = {
|
|
|
15
15
|
owners: EthernetNetworkInterfaceTypeDefinition.owners,
|
|
16
16
|
extends: EthernetNetworkInterfaceTypeDefinition,
|
|
17
17
|
priority: 0.1,
|
|
18
|
-
|
|
18
|
+
attributes: {
|
|
19
19
|
ssid: string_attribute_writable,
|
|
20
20
|
psk: { ...secret_attribute, writable: true },
|
|
21
21
|
secretName: string_attribute_writable
|
package/src/network-support.mjs
CHANGED
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
boolean_attribute_writable
|
|
7
7
|
} from "pacc";
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const networkAddressType = ["network", "host", "network_interface"];
|
|
10
|
+
|
|
11
|
+
export const networkAttributes = {
|
|
10
12
|
scope: {
|
|
11
13
|
...string_attribute_writable,
|
|
12
14
|
values: ["global", "site", "link", "host"]
|
|
@@ -29,7 +31,7 @@ export const networkProperties = {
|
|
|
29
31
|
multicastDNS: boolean_attribute_writable
|
|
30
32
|
};
|
|
31
33
|
|
|
32
|
-
export const
|
|
34
|
+
export const networkAddressAttributes = {
|
|
33
35
|
hostName: { ...hostname_attribute, writable: true },
|
|
34
36
|
cidrAddresses: { ...string_collection_attribute_writable },
|
|
35
37
|
cidrAddress: { ...string_attribute_writable },
|
package/src/network.mjs
CHANGED
|
@@ -2,15 +2,15 @@ import { default_attribute_writable } from "pacc";
|
|
|
2
2
|
import { Owner } from "./owner.mjs";
|
|
3
3
|
import { Subnet } from "./subnet.mjs";
|
|
4
4
|
import { addType } from "./types.mjs";
|
|
5
|
-
import {
|
|
5
|
+
import { networkAttributes } from "./network-support.mjs";
|
|
6
6
|
|
|
7
7
|
const NetworkTypeDefinition = {
|
|
8
8
|
name: "network",
|
|
9
9
|
owners: ["location", "owner", "root"],
|
|
10
10
|
priority: 0.8,
|
|
11
11
|
extends: Owner.typeDefinition,
|
|
12
|
-
|
|
13
|
-
...
|
|
12
|
+
attributes: {
|
|
13
|
+
...networkAttributes,
|
|
14
14
|
bridge: {
|
|
15
15
|
...default_attribute_writable,
|
|
16
16
|
type: "network",
|
package/src/owner.mjs
CHANGED
|
@@ -15,7 +15,7 @@ const OwnerTypeDefinition = {
|
|
|
15
15
|
owners: ["location", "owner", "root"],
|
|
16
16
|
priority: 0.9,
|
|
17
17
|
extends: Base.typeDefinition,
|
|
18
|
-
|
|
18
|
+
attributes: {
|
|
19
19
|
networks: { type: "network", collection: true, writable: true },
|
|
20
20
|
hosts: { type: "host", collection: true, writable: true },
|
|
21
21
|
clusters: { type: "cluster", collection: true, writable: true },
|
package/src/root.mjs
CHANGED
package/src/service.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "pmcf";
|
|
16
16
|
import { addType } from "./types.mjs";
|
|
17
17
|
import { asArray } from "./utils.mjs";
|
|
18
|
-
import {
|
|
18
|
+
import { networkAddressAttributes } from "./network-support.mjs";
|
|
19
19
|
import { serviceTypeEndpoints, ServiceTypes } from "./service-types.mjs";
|
|
20
20
|
import {
|
|
21
21
|
DNSRecord,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
dnsPriority
|
|
26
26
|
} from "./dns-utils.mjs";
|
|
27
27
|
|
|
28
|
-
export const
|
|
28
|
+
export const endpointAttributes = {
|
|
29
29
|
port: { ...number_attribute_writable },
|
|
30
30
|
protocol: {
|
|
31
31
|
...string_attribute_writable,
|
|
@@ -41,7 +41,7 @@ export const EndpointTypeDefinition = {
|
|
|
41
41
|
owners: ["service", "network_interface"],
|
|
42
42
|
priority: 0.4,
|
|
43
43
|
specializations: {},
|
|
44
|
-
|
|
44
|
+
attributes: endpointAttributes
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
export const ServiceTypeDefinition = {
|
|
@@ -61,9 +61,9 @@ export const ServiceTypeDefinition = {
|
|
|
61
61
|
|
|
62
62
|
return Service;
|
|
63
63
|
},
|
|
64
|
-
|
|
65
|
-
...
|
|
66
|
-
...
|
|
64
|
+
attributes: {
|
|
65
|
+
...networkAddressAttributes,
|
|
66
|
+
...endpointAttributes,
|
|
67
67
|
alias: { ...string_attribute_writable },
|
|
68
68
|
weight: { ...number_attribute_writable /*default: 1*/ },
|
|
69
69
|
systemd: string_collection_attribute_writable
|
package/src/services/bind.mjs
CHANGED
|
@@ -16,33 +16,36 @@ import {
|
|
|
16
16
|
dnsRecordTypeForAddressFamily,
|
|
17
17
|
sortZoneRecords
|
|
18
18
|
} from "../dns-utils.mjs";
|
|
19
|
-
import {
|
|
19
|
+
import {
|
|
20
|
+
ExtraSourceService,
|
|
21
|
+
serviceEndpoints,
|
|
22
|
+
addresses,
|
|
23
|
+
networkAddressType
|
|
24
|
+
} from "pmcf";
|
|
20
25
|
import { addType } from "../types.mjs";
|
|
21
26
|
import { Service, ServiceTypeDefinition } from "../service.mjs";
|
|
22
27
|
import { ExtraSourceServiceTypeDefinition } from "../extra-source-service.mjs";
|
|
23
28
|
import { addHook } from "../hooks.mjs";
|
|
24
29
|
|
|
25
|
-
const address_types = ["network", "host", "network_interface"];
|
|
26
|
-
|
|
27
30
|
const BindServiceTypeDefinition = {
|
|
28
31
|
name: "bind",
|
|
29
32
|
specializationOf: ServiceTypeDefinition,
|
|
30
33
|
owners: ServiceTypeDefinition.owners,
|
|
31
34
|
extends: ExtraSourceServiceTypeDefinition,
|
|
32
35
|
priority: 0.1,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
type: [
|
|
36
|
+
attributes: {
|
|
37
|
+
zones: {
|
|
38
|
+
type: [...networkAddressType, "location", "owner"],
|
|
36
39
|
collection: true,
|
|
37
40
|
writable: true
|
|
38
41
|
},
|
|
39
42
|
trusted: {
|
|
40
|
-
type:
|
|
43
|
+
type: networkAddressType,
|
|
41
44
|
collection: true,
|
|
42
45
|
writable: true
|
|
43
46
|
},
|
|
44
|
-
protected: { type:
|
|
45
|
-
internal: { type:
|
|
47
|
+
protected: { type: networkAddressType, collection: true, writable: true },
|
|
48
|
+
internal: { type: networkAddressType, collection: true, writable: true },
|
|
46
49
|
hasSVRRecords: boolean_attribute_writable_false,
|
|
47
50
|
hasCatalog: boolean_attribute_writable_true,
|
|
48
51
|
hasLinkLocalAdresses: boolean_attribute_writable_false,
|
|
@@ -50,7 +53,7 @@ const BindServiceTypeDefinition = {
|
|
|
50
53
|
excludeInterfaceKinds: {
|
|
51
54
|
...string_collection_attribute_writable
|
|
52
55
|
},
|
|
53
|
-
exclude: { type:
|
|
56
|
+
exclude: { type: networkAddressType, collection: true, writable: true },
|
|
54
57
|
notify: boolean_attribute_writable_false,
|
|
55
58
|
recordTTL: { ...string_attribute_writable },
|
|
56
59
|
serial: { ...number_attribute, writable: true },
|
|
@@ -106,10 +109,10 @@ export class BindService extends ExtraSourceService {
|
|
|
106
109
|
hasSVRRecords = true;
|
|
107
110
|
hasCatalog = true;
|
|
108
111
|
hasLinkLocalAdresses =
|
|
109
|
-
BindServiceTypeDefinition.
|
|
112
|
+
BindServiceTypeDefinition.attributes.hasLinkLocalAdresses.default;
|
|
110
113
|
hasLocationRecord = true;
|
|
111
114
|
notify = true;
|
|
112
|
-
|
|
115
|
+
_zones = [];
|
|
113
116
|
_trusted = [];
|
|
114
117
|
_exclude = new Set([]);
|
|
115
118
|
_excludeInterfaceKinds = new Set();
|
|
@@ -159,12 +162,12 @@ export class BindService extends ExtraSourceService {
|
|
|
159
162
|
return [this.serial, this.refresh, this.retry, this.expire, this.minimum];
|
|
160
163
|
}
|
|
161
164
|
|
|
162
|
-
set
|
|
163
|
-
this.
|
|
165
|
+
set zones(value) {
|
|
166
|
+
this._zones.push(value);
|
|
164
167
|
}
|
|
165
168
|
|
|
166
|
-
get
|
|
167
|
-
return this.
|
|
169
|
+
get zones() {
|
|
170
|
+
return this._zones;
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
set protected(value) {
|
|
@@ -208,8 +211,8 @@ export class BindService extends ExtraSourceService {
|
|
|
208
211
|
}
|
|
209
212
|
|
|
210
213
|
async *preparePackages(dir) {
|
|
211
|
-
const
|
|
212
|
-
const names =
|
|
214
|
+
const zoneSources = this.zones.length ? this.zones : [this.owner];
|
|
215
|
+
const names = zoneSources.map(a => a.fullName).join(" ");
|
|
213
216
|
const name = this.owner.owner.name || this.owner.name;
|
|
214
217
|
|
|
215
218
|
const configPackageDir = join(dir, "config") + "/";
|
|
@@ -292,7 +295,7 @@ export class BindService extends ExtraSourceService {
|
|
|
292
295
|
new FileContentProvider(zonesPackageDir, ...filePermissions)
|
|
293
296
|
];
|
|
294
297
|
|
|
295
|
-
yield this.generateZoneDefs(
|
|
298
|
+
yield this.generateZoneDefs(zoneSources, packageData);
|
|
296
299
|
|
|
297
300
|
const outfacingZonesPackageDir = join(dir, "outfacingZones") + "/";
|
|
298
301
|
|
|
@@ -309,7 +312,7 @@ export class BindService extends ExtraSourceService {
|
|
|
309
312
|
new FileContentProvider(outfacingZonesPackageDir, ...filePermissions)
|
|
310
313
|
];
|
|
311
314
|
|
|
312
|
-
yield* this.generateOutfacingDefs(
|
|
315
|
+
yield* this.generateOutfacingDefs(zoneSources, packageData);
|
|
313
316
|
}
|
|
314
317
|
|
|
315
318
|
async *generateOutfacingDefs(sources, packageData) {
|
|
@@ -340,18 +343,18 @@ export class BindService extends ExtraSourceService {
|
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
345
|
|
|
343
|
-
async generateZoneDefs(
|
|
346
|
+
async generateZoneDefs(zoneSources, packageData) {
|
|
344
347
|
const configs = [];
|
|
345
348
|
|
|
346
|
-
for (const
|
|
349
|
+
for (const zoneSource of zoneSources) {
|
|
347
350
|
console.log(
|
|
348
351
|
"SOURCE",
|
|
349
|
-
|
|
350
|
-
[...
|
|
352
|
+
zoneSource.toString(),
|
|
353
|
+
[...zoneSource.localDomains].join(" ")
|
|
351
354
|
);
|
|
352
355
|
|
|
353
|
-
for (const domain of
|
|
354
|
-
const locationName =
|
|
356
|
+
for (const domain of zoneSource.localDomains) {
|
|
357
|
+
const locationName = zoneSource.location.name;
|
|
355
358
|
const reverseZones = new Map();
|
|
356
359
|
|
|
357
360
|
const config = {
|
|
@@ -404,7 +407,7 @@ export class BindService extends ExtraSourceService {
|
|
|
404
407
|
networkInterface,
|
|
405
408
|
domainNames,
|
|
406
409
|
family
|
|
407
|
-
} of
|
|
410
|
+
} of zoneSource.networkAddresses()) {
|
|
408
411
|
if (
|
|
409
412
|
!this.exclude.has(networkInterface.network) &&
|
|
410
413
|
!this.excludeInterfaceKinds.has(networkInterface.kind)
|
package/src/services/chrony.mjs
CHANGED
|
@@ -11,7 +11,7 @@ const InfluxdbServiceTypeDefinition = {
|
|
|
11
11
|
owners: ServiceTypeDefinition.owners,
|
|
12
12
|
extends: ServiceTypeDefinition,
|
|
13
13
|
priority: 0.1,
|
|
14
|
-
|
|
14
|
+
attributes: {
|
|
15
15
|
"metrics-disabled": {
|
|
16
16
|
...boolean_attribute_writable_true,
|
|
17
17
|
isCommonOption: true
|
|
@@ -65,7 +65,7 @@ export class InfluxdbService extends Service {
|
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
const lines = Object.entries(InfluxdbServiceTypeDefinition.
|
|
68
|
+
const lines = Object.entries(InfluxdbServiceTypeDefinition.attributes)
|
|
69
69
|
.filter(
|
|
70
70
|
([key, attribute]) =>
|
|
71
71
|
attribute.isCommonOption && this[key] !== undefined
|
package/src/services/kea.mjs
CHANGED
|
@@ -23,7 +23,7 @@ const KeaServiceTypeDefinition = {
|
|
|
23
23
|
owners: ServiceTypeDefinition.owners,
|
|
24
24
|
extends: ServiceTypeDefinition,
|
|
25
25
|
priority: 0.1,
|
|
26
|
-
|
|
26
|
+
attributes: {
|
|
27
27
|
"ddns-send-updates": {
|
|
28
28
|
...boolean_attribute_writable_true,
|
|
29
29
|
isCommonOption: true
|
|
@@ -281,7 +281,7 @@ export class KeaService extends Service {
|
|
|
281
281
|
};
|
|
282
282
|
|
|
283
283
|
for (const [key] of Object.entries(
|
|
284
|
-
KeaServiceTypeDefinition.
|
|
284
|
+
KeaServiceTypeDefinition.attributes
|
|
285
285
|
).filter(
|
|
286
286
|
([key, attribute]) =>
|
|
287
287
|
attribute.isCommonOption && this[key] !== undefined
|
|
@@ -11,7 +11,7 @@ const MosquittoServiceTypeDefinition = {
|
|
|
11
11
|
owners: ServiceTypeDefinition.owners,
|
|
12
12
|
extends: ServiceTypeDefinition,
|
|
13
13
|
priority: 0.1,
|
|
14
|
-
|
|
14
|
+
attributes: {
|
|
15
15
|
log_timestamp: {
|
|
16
16
|
...boolean_attribute_writable_true,
|
|
17
17
|
isCommonOption: true
|
|
@@ -48,7 +48,7 @@ export class MosquittoService extends Service {
|
|
|
48
48
|
dir,
|
|
49
49
|
sources: [new FileContentProvider(dir + "/")],
|
|
50
50
|
outputs: this.outputs,
|
|
51
|
-
|
|
51
|
+
attributes: {
|
|
52
52
|
name: `mosquitto-${this.location.name}-${host.name}`,
|
|
53
53
|
description: `mosquitto definitions for ${this.fullName}@${name}`,
|
|
54
54
|
access: "private",
|
|
@@ -56,7 +56,7 @@ export class MosquittoService extends Service {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
const lines = Object.entries(MosquittoServiceTypeDefinition.
|
|
59
|
+
const lines = Object.entries(MosquittoServiceTypeDefinition.attributes)
|
|
60
60
|
.filter(
|
|
61
61
|
([key, attribute]) =>
|
|
62
62
|
attribute.isCommonOption && this[key] !== undefined
|
|
@@ -12,7 +12,7 @@ const OpenLDAPServiceTypeDefinition = {
|
|
|
12
12
|
owners: ServiceTypeDefinition.owners,
|
|
13
13
|
extends: ServiceTypeDefinition,
|
|
14
14
|
priority: 0.1,
|
|
15
|
-
|
|
15
|
+
attributes: {
|
|
16
16
|
baseDN: {
|
|
17
17
|
...string_attribute,
|
|
18
18
|
writable: true
|
|
@@ -110,7 +110,7 @@ export class OpenLDAPService extends Service {
|
|
|
110
110
|
dir,
|
|
111
111
|
sources: [new FileContentProvider(dir + "/", ...filePermissions)],
|
|
112
112
|
outputs: this.outputs,
|
|
113
|
-
|
|
113
|
+
attributes: {
|
|
114
114
|
name: `openldap-${this.location.name}-${name}`,
|
|
115
115
|
description: `openldap definitions for ${this.fullName}@${name}`,
|
|
116
116
|
access: "private",
|
|
@@ -120,13 +120,13 @@ export class OpenLDAPService extends Service {
|
|
|
120
120
|
};
|
|
121
121
|
|
|
122
122
|
addHook(
|
|
123
|
-
packageData.
|
|
123
|
+
packageData.attributes.hooks,
|
|
124
124
|
"post_upgrade",
|
|
125
125
|
"setfacl -m u:ldap:r /etc/letsencrypt/archive/*/privkey*.pem"
|
|
126
126
|
);
|
|
127
127
|
|
|
128
128
|
addHook(
|
|
129
|
-
packageData.
|
|
129
|
+
packageData.attributes.hooks,
|
|
130
130
|
"post_install",
|
|
131
131
|
"setfacl -m u:ldap:r /etc/letsencrypt/archive/*/privkey*.pem"
|
|
132
132
|
);
|