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 +1 -1
- package/src/base.mjs +6 -10
- package/src/cluster.mjs +3 -2
- package/src/services/dhcp.mjs +2 -2
- package/types/cluster.d.mts +1 -0
package/package.json
CHANGED
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
|
|
package/src/services/dhcp.mjs
CHANGED
|
@@ -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: [
|
|
54
|
+
replaces: [`kea-${name}`] // TODO remove
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|