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.
Files changed (61) hide show
  1. package/package.json +1 -1
  2. package/src/base.mjs +3 -3
  3. package/src/cluster.mjs +1 -1
  4. package/src/extra-source-service.mjs +3 -2
  5. package/src/filter.mjs +1 -1
  6. package/src/host.mjs +3 -8
  7. package/src/location.mjs +1 -1
  8. package/src/network-interfaces/ethernet.mjs +1 -1
  9. package/src/network-interfaces/loopback.mjs +1 -1
  10. package/src/network-interfaces/network-interface.mjs +8 -8
  11. package/src/network-interfaces/tun.mjs +1 -1
  12. package/src/network-interfaces/wireguard.mjs +1 -1
  13. package/src/network-interfaces/wlan.mjs +1 -1
  14. package/src/network-support.mjs +4 -2
  15. package/src/network.mjs +3 -3
  16. package/src/owner.mjs +1 -1
  17. package/src/root.mjs +1 -1
  18. package/src/service.mjs +6 -6
  19. package/src/services/bind.mjs +30 -27
  20. package/src/services/chrony.mjs +1 -1
  21. package/src/services/headscale.mjs +1 -1
  22. package/src/services/influxdb.mjs +2 -2
  23. package/src/services/kea.mjs +2 -2
  24. package/src/services/mosquitto.mjs +3 -3
  25. package/src/services/openldap.mjs +4 -4
  26. package/src/services/systemd-journal-remote.mjs +1 -1
  27. package/src/services/systemd-journal-upload.mjs +1 -1
  28. package/src/services/systemd-journal.mjs +1 -1
  29. package/src/services/systemd-resolved.mjs +1 -1
  30. package/src/services/systemd-timesyncd.mjs +1 -1
  31. package/src/subnet.mjs +1 -1
  32. package/src/types.mjs +8 -7
  33. package/types/base.d.mts +1 -1
  34. package/types/cluster.d.mts +6 -6
  35. package/types/extra-source-service.d.mts +9 -8
  36. package/types/host.d.mts +2 -2
  37. package/types/location.d.mts +7 -7
  38. package/types/network-interfaces/ethernet.d.mts +6 -6
  39. package/types/network-interfaces/loopback.d.mts +5 -5
  40. package/types/network-interfaces/network-interface.d.mts +4 -4
  41. package/types/network-interfaces/tun.d.mts +5 -5
  42. package/types/network-interfaces/wireguard.d.mts +5 -5
  43. package/types/network-interfaces/wlan.d.mts +8 -8
  44. package/types/network-support.d.mts +3 -2
  45. package/types/network.d.mts +4 -4
  46. package/types/owner.d.mts +3 -3
  47. package/types/root.d.mts +8 -8
  48. package/types/service.d.mts +6 -6
  49. package/types/services/bind.d.mts +12 -12
  50. package/types/services/chrony.d.mts +7 -7
  51. package/types/services/headscale.d.mts +7 -7
  52. package/types/services/influxdb.d.mts +5 -5
  53. package/types/services/kea.d.mts +5 -5
  54. package/types/services/mosquitto.d.mts +6 -6
  55. package/types/services/openldap.d.mts +6 -6
  56. package/types/services/systemd-journal-remote.d.mts +5 -5
  57. package/types/services/systemd-journal-upload.d.mts +5 -5
  58. package/types/services/systemd-journal.d.mts +5 -5
  59. package/types/services/systemd-resolved.d.mts +7 -7
  60. package/types/services/systemd-timesyncd.d.mts +7 -7
  61. package/types/subnet.d.mts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "3.9.3",
3
+ "version": "3.10.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
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
- properties: {
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.properties)) {
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.properties)) {
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
- properties: {
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
- properties: {
10
- source: { type: "network", collection: true, writable: true }
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.properties)) {
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 { networkAddressProperties } from "./network-support.mjs";
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
- properties: {
33
- ...networkAddressProperties,
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
@@ -9,7 +9,7 @@ const LocationTypeDefinition = {
9
9
  owners: [Owner.typeDefinition, "location", "root"],
10
10
  priority: 1.0,
11
11
  extends: Owner.typeDefinition,
12
- properties: {
12
+ attributes: {
13
13
  locales: { ...string_collection_attribute, writable: true }
14
14
  }
15
15
  };
@@ -10,7 +10,7 @@ export const EthernetNetworkInterfaceTypeDefinition = {
10
10
  owners: NetworkInterfaceTypeDefinition.owners,
11
11
  extends: NetworkInterfaceTypeDefinition,
12
12
  priority: 0.1,
13
- properties: {
13
+ attributes: {
14
14
  arpbridge: { type: "network_interface", collection: true, writable: true }
15
15
  }
16
16
  };
@@ -9,7 +9,7 @@ const LoopbackNetworkInterfaceTypeDefinition = {
9
9
  owners: NetworkInterfaceTypeDefinition.owners,
10
10
  extends: NetworkInterfaceTypeDefinition,
11
11
  priority: 0.1,
12
- properties: {}
12
+ attributes: {}
13
13
  };
14
14
 
15
15
  const _localAddresses = new Map([
@@ -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
- networkProperties,
7
- networkAddressProperties
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
- properties: {
39
- ...networkProperties,
40
- ...networkAddressProperties,
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
- networkProperties.scope.default
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
- networkProperties.metric.default
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"); // ?? networkProperties.mtu.default;
165
+ return this.extendedProperty("_mtu"); // ?? networkAttributes.mtu.default;
166
166
  }
167
167
 
168
168
  set class(value) {
@@ -8,7 +8,7 @@ const TUNdNetworkInterfaceTypeDefinition = {
8
8
  owners: NetworkInterfaceTypeDefinition.owners,
9
9
  extends: NetworkInterfaceTypeDefinition,
10
10
  priority: 0.1,
11
- properties: {}
11
+ attributes: {}
12
12
  };
13
13
 
14
14
  export class TUNNetworkInterface extends NetworkInterface {
@@ -8,7 +8,7 @@ const WireguardNetworkInterfaceTypeDefinition = {
8
8
  owners: NetworkInterfaceTypeDefinition.owners,
9
9
  extends: NetworkInterfaceTypeDefinition,
10
10
  priority: 0.1,
11
- properties: {}
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
- properties: {
18
+ attributes: {
19
19
  ssid: string_attribute_writable,
20
20
  psk: { ...secret_attribute, writable: true },
21
21
  secretName: string_attribute_writable
@@ -6,7 +6,9 @@ import {
6
6
  boolean_attribute_writable
7
7
  } from "pacc";
8
8
 
9
- export const networkProperties = {
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 networkAddressProperties = {
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 { networkProperties } from "./network-support.mjs";
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
- properties: {
13
- ...networkProperties,
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
- properties: {
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
@@ -8,7 +8,7 @@ const RootTypeDefinition = {
8
8
  owners: [],
9
9
  priority: 1000,
10
10
  extends: Location.typeDefinition,
11
- properties: {}
11
+ attributes: {}
12
12
  };
13
13
 
14
14
  export class Root extends Location {
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 { networkAddressProperties } from "./network-support.mjs";
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 endpointProperties = {
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
- properties: endpointProperties
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
- properties: {
65
- ...networkAddressProperties,
66
- ...endpointProperties,
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
@@ -16,33 +16,36 @@ import {
16
16
  dnsRecordTypeForAddressFamily,
17
17
  sortZoneRecords
18
18
  } from "../dns-utils.mjs";
19
- import { ExtraSourceService, serviceEndpoints, addresses } from "pmcf";
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
- properties: {
34
- addresses: {
35
- type: ["network", "host", "network_interface", "location", "owner"],
36
+ attributes: {
37
+ zones: {
38
+ type: [...networkAddressType, "location", "owner"],
36
39
  collection: true,
37
40
  writable: true
38
41
  },
39
42
  trusted: {
40
- type: address_types,
43
+ type: networkAddressType,
41
44
  collection: true,
42
45
  writable: true
43
46
  },
44
- protected: { type: address_types, collection: true, writable: true },
45
- internal: { type: address_types, collection: true, writable: true },
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: address_types, collection: true, writable: true },
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.properties.hasLinkLocalAdresses.default;
112
+ BindServiceTypeDefinition.attributes.hasLinkLocalAdresses.default;
110
113
  hasLocationRecord = true;
111
114
  notify = true;
112
- _addresses = [];
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 addresses(value) {
163
- this._addresses.push(value);
165
+ set zones(value) {
166
+ this._zones.push(value);
164
167
  }
165
168
 
166
- get addresses() {
167
- return this._addresses;
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 sources = this.addresses.length ? this.addresses : [this.owner];
212
- const names = sources.map(a => a.fullName).join(" ");
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(sources, packageData);
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(sources, packageData);
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(sources, packageData) {
346
+ async generateZoneDefs(zoneSources, packageData) {
344
347
  const configs = [];
345
348
 
346
- for (const source of sources) {
349
+ for (const zoneSource of zoneSources) {
347
350
  console.log(
348
351
  "SOURCE",
349
- source.toString(),
350
- [...source.localDomains].join(" ")
352
+ zoneSource.toString(),
353
+ [...zoneSource.localDomains].join(" ")
351
354
  );
352
355
 
353
- for (const domain of source.localDomains) {
354
- const locationName = source.location.name;
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 source.networkAddresses()) {
410
+ } of zoneSource.networkAddresses()) {
408
411
  if (
409
412
  !this.exclude.has(networkInterface.network) &&
410
413
  !this.excludeInterfaceKinds.has(networkInterface.kind)
@@ -19,7 +19,7 @@ const ChronyServiceTypeDefinition = {
19
19
  owners: ServiceTypeDefinition.owners,
20
20
  extends: ExtraSourceServiceTypeDefinition,
21
21
  priority: 0.1,
22
- properties: {},
22
+ attributes: {},
23
23
  service: {
24
24
  extends: ["ntp"],
25
25
  services: {
@@ -11,7 +11,7 @@ const HeadscaleServiceTypeDefinition = {
11
11
  owners: ServiceTypeDefinition.owners,
12
12
  extends: ExtraSourceServiceTypeDefinition,
13
13
  priority: 0.1,
14
- properties: {},
14
+ attributes: {},
15
15
  service: {
16
16
  endpoints: [
17
17
  {
@@ -11,7 +11,7 @@ const InfluxdbServiceTypeDefinition = {
11
11
  owners: ServiceTypeDefinition.owners,
12
12
  extends: ServiceTypeDefinition,
13
13
  priority: 0.1,
14
- properties: {
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.properties)
68
+ const lines = Object.entries(InfluxdbServiceTypeDefinition.attributes)
69
69
  .filter(
70
70
  ([key, attribute]) =>
71
71
  attribute.isCommonOption && this[key] !== undefined
@@ -23,7 +23,7 @@ const KeaServiceTypeDefinition = {
23
23
  owners: ServiceTypeDefinition.owners,
24
24
  extends: ServiceTypeDefinition,
25
25
  priority: 0.1,
26
- properties: {
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.properties
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
- properties: {
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
- properties: {
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.properties)
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
- properties: {
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
- properties: {
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.properties.hooks,
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.properties.hooks,
129
+ packageData.attributes.hooks,
130
130
  "post_install",
131
131
  "setfacl -m u:ldap:r /etc/letsencrypt/archive/*/privkey*.pem"
132
132
  );
@@ -7,7 +7,7 @@ const SystemdJournalRemoteServiceTypeDefinition = {
7
7
  owners: ServiceTypeDefinition.owners,
8
8
  extends: ServiceTypeDefinition,
9
9
  priority: 0.1,
10
- properties: {},
10
+ attributes: {},
11
11
  services: {
12
12
  endpoints: [
13
13
  {
@@ -8,7 +8,7 @@ const SystemdJournalUploadServiceTypeDefinition = {
8
8
  owners: ServiceTypeDefinition.owners,
9
9
  extends: ServiceTypeDefinition,
10
10
  priority: 0.1,
11
- properties: {
11
+ attributes: {
12
12
  url: { ...string_attribute_writable }
13
13
  },
14
14
  service: {}
@@ -7,7 +7,7 @@ const SystemdJournalServiceTypeDefinition = {
7
7
  owners: ServiceTypeDefinition.owners,
8
8
  extends: ServiceTypeDefinition,
9
9
  priority: 0.1,
10
- properties: {},
10
+ attributes: {},
11
11
  service: {}
12
12
  };
13
13
 
@@ -12,7 +12,7 @@ const SystemdResolvedServiceTypeDefinition = {
12
12
  owners: ServiceTypeDefinition.owners,
13
13
  extends: ExtraSourceServiceTypeDefinition,
14
14
  priority: 0.1,
15
- properties: {},
15
+ attributes: {},
16
16
  service: {}
17
17
  };
18
18
 
@@ -12,7 +12,7 @@ const SystemdTimesyncdServiceTypeDefinition = {
12
12
  owners: ServiceTypeDefinition.owners,
13
13
  extends: ExtraSourceServiceTypeDefinition,
14
14
  priority: 0.1,
15
- properties: {},
15
+ attributes: {},
16
16
  service: {}
17
17
  };
18
18
 
package/src/subnet.mjs CHANGED
@@ -15,7 +15,7 @@ const SubnetTypeDefinition = {
15
15
  owners: ["location", "owner", "network", "root"],
16
16
  priority: 0.6,
17
17
  constructWithIdentifierOnly: true,
18
- properties: {
18
+ attributes: {
19
19
  address: {
20
20
  ...string_attribute,
21
21
  isKey: true