pmcf 2.6.3 → 2.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pmcf",
3
- "version": "2.6.3",
3
+ "version": "2.6.5",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
package/src/base.mjs CHANGED
@@ -93,6 +93,12 @@ export class Base {
93
93
  read(data, type) {
94
94
  const assign = (property, value) => {
95
95
  if (value !== undefined) {
96
+ if (property.values) {
97
+ if (property.values.indexOf(value) < 0) {
98
+ this.error(property.name, "unknown value", value, property.values);
99
+ }
100
+ }
101
+
96
102
  if (property.collection) {
97
103
  const current = this[property.name];
98
104
 
@@ -121,16 +127,6 @@ export class Base {
121
127
  break;
122
128
  }
123
129
  } else {
124
- if (property.values) {
125
- if (property.values.indexOf(value) < 0) {
126
- this.error(
127
- property.name,
128
- "unknown value",
129
- value,
130
- property.values
131
- );
132
- }
133
- }
134
130
  this[property.name] = value;
135
131
  }
136
132
  }
package/src/cluster.mjs CHANGED
@@ -64,7 +64,7 @@ export class Cluster extends Host {
64
64
  new Set()
65
65
  )) {
66
66
  const host = ni.host;
67
- const name = `keepalived-${host.name}`;
67
+ const name = `keepalived-${host.location.name}-${host.name}`;
68
68
  const packageStagingDir = join(stagingDir, name);
69
69
  const result = {
70
70
  sources: [
@@ -77,7 +77,8 @@ export class Cluster extends Host {
77
77
  name,
78
78
  description: `${this.typeName} definitions for ${this.fullName}`,
79
79
  access: "private",
80
- dependencies: ["keepalived>=2.3.3"]
80
+ dependencies: ["keepalived>=2.3.3"],
81
+ replaces: [`keepalived-${host.name}`]
81
82
  }
82
83
  };
83
84
 
@@ -47,11 +47,11 @@ export class DHCPService extends Service {
47
47
  sources: [new FileContentProvider(dir + "/")[Symbol.asyncIterator]()],
48
48
  outputs: this.outputs,
49
49
  properties: {
50
- name: `kea-${name}`,
50
+ name: `kea-${this.location.name}-${host.name}`,
51
51
  description: `kea definitions for ${this.fullName}@${name}`,
52
52
  access: "private",
53
53
  dependencies: ["kea"],
54
- replaces: ["kea-SW"] // TODO remove
54
+ replaces: [`kea-${name}`] // TODO remove
55
55
  }
56
56
  };
57
57
 
@@ -351,6 +351,7 @@ export class Cluster extends Host {
351
351
  description: string;
352
352
  access: string;
353
353
  dependencies: string[];
354
+ replaces: string[];
354
355
  };
355
356
  }, void, unknown>;
356
357
  }