pmcf 6.46.6 → 6.46.8
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/cluster.mjs +2 -2
- package/src/common-attributes.mjs +0 -1
- package/src/core-service.mjs +2 -2
- package/src/host.mjs +2 -3
- package/src/keepalived.mjs +17 -1
- package/src/network-interfaces/network-interface.mjs +2 -2
- package/src/network-interfaces/skeleton.mjs +2 -2
package/package.json
CHANGED
package/src/cluster.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
3
3
|
import { FAMILY_IPV4 } from "ip-utilties";
|
|
4
4
|
import { duration_attribute_writable } from "pacc";
|
|
5
|
-
import {
|
|
5
|
+
import { host } from "./host.mjs";
|
|
6
6
|
import { addType, serviceEndpoints } from "pmcf";
|
|
7
7
|
import {
|
|
8
8
|
networkInterfaces_attribute,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./common-attributes.mjs";
|
|
11
11
|
import { writeLines } from "./utils.mjs";
|
|
12
12
|
|
|
13
|
-
export class cluster extends
|
|
13
|
+
export class cluster extends host {
|
|
14
14
|
static priority = 1.5;
|
|
15
15
|
static attributes = {
|
|
16
16
|
masters: {
|
|
@@ -113,7 +113,6 @@ export const bridges_attribute = {
|
|
|
113
113
|
};
|
|
114
114
|
|
|
115
115
|
export const family_attribute = { ...string_attribute, name: "family" };
|
|
116
|
-
|
|
117
116
|
export const psk_attribute = { ...string_attribute_writable, name: "psk" };
|
|
118
117
|
export const ssid_attribute = { ...string_attribute_writable, name: "ssid" };
|
|
119
118
|
export const hostname_attribute = {
|
package/src/core-service.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "pacc";
|
|
15
15
|
import {
|
|
16
16
|
base,
|
|
17
|
-
|
|
17
|
+
host,
|
|
18
18
|
Endpoint,
|
|
19
19
|
DomainNameEndpoint,
|
|
20
20
|
HTTPEndpoint,
|
|
@@ -50,7 +50,7 @@ export class credential extends base {
|
|
|
50
50
|
export class CoreService extends base {
|
|
51
51
|
static name = "core-service";
|
|
52
52
|
static priority = 1.1;
|
|
53
|
-
static owners = [
|
|
53
|
+
static owners = [host, "cluster", "network_interface"];
|
|
54
54
|
static specializationOf = CoreService;
|
|
55
55
|
static specializations = {};
|
|
56
56
|
static factoryFor(owner, value) {
|
package/src/host.mjs
CHANGED
|
@@ -21,8 +21,7 @@ import { addHook } from "./hooks.mjs";
|
|
|
21
21
|
import { domainFromDominName, domainName, writeLines } from "./utils.mjs";
|
|
22
22
|
import { generateKnownHosts } from "./host-utils.mjs";
|
|
23
23
|
|
|
24
|
-
export class
|
|
25
|
-
static name = "host";
|
|
24
|
+
export class host extends ServiceOwner {
|
|
26
25
|
static priority = 1.9;
|
|
27
26
|
static attributes = {
|
|
28
27
|
...networkAddressAttributes,
|
|
@@ -70,7 +69,7 @@ export class Host extends ServiceOwner {
|
|
|
70
69
|
},
|
|
71
70
|
extends: {
|
|
72
71
|
...extends_attribute,
|
|
73
|
-
type:
|
|
72
|
+
type: host
|
|
74
73
|
},
|
|
75
74
|
model: { ...string_attribute, name: "model" }
|
|
76
75
|
};
|
package/src/keepalived.mjs
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
import { duration_attribute_writable } from "pacc";
|
|
2
|
+
import { addType } from "pmcf";
|
|
3
|
+
|
|
1
4
|
import { cluster } from "./cluster.mjs";
|
|
2
5
|
|
|
3
|
-
export class keepalived extends cluster {
|
|
6
|
+
export class keepalived extends cluster {
|
|
7
|
+
static priority = 1.5;
|
|
8
|
+
static attributes = {
|
|
9
|
+
checkInterval: {
|
|
10
|
+
...duration_attribute_writable,
|
|
11
|
+
name: "checkInterval",
|
|
12
|
+
default: 60
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
static {
|
|
17
|
+
addType(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
default_collection_attribute_writable
|
|
5
5
|
} from "pacc";
|
|
6
6
|
import { network_attribute } from "../common-attributes.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { host, cidrAddresses, addType } from "pmcf";
|
|
8
8
|
import {
|
|
9
9
|
networkAttributes,
|
|
10
10
|
networkAddressAttributes,
|
|
@@ -17,7 +17,7 @@ import { yesno } from "../utils.mjs";
|
|
|
17
17
|
|
|
18
18
|
export class NetworkInterface extends SkeletonNetworkInterface {
|
|
19
19
|
static name = "network_interface";
|
|
20
|
-
static owners = [
|
|
20
|
+
static owners = [host];
|
|
21
21
|
static specializationOf = NetworkInterface;
|
|
22
22
|
static specializations = {};
|
|
23
23
|
static factoryFor(owner, value) {
|
|
@@ -2,7 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
import { AggregatedMap } from "aggregated-map";
|
|
3
3
|
import { addType, asArray } from "pacc";
|
|
4
4
|
import { writeLines, sectionLines } from "../utils.mjs";
|
|
5
|
-
import { NetworkAddress,
|
|
5
|
+
import { NetworkAddress, host, cidrAddresses } from "pmcf";
|
|
6
6
|
import { ServiceOwner } from "../service-owner.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -35,7 +35,7 @@ export class SkeletonNetworkInterface extends ServiceOwner {
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
get host() {
|
|
38
|
-
if (this.owner instanceof
|
|
38
|
+
if (this.owner instanceof host) {
|
|
39
39
|
return this.owner;
|
|
40
40
|
}
|
|
41
41
|
}
|