pmcf 6.60.5 → 6.60.7
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 +2 -1
- package/src/network.mjs +1 -1
- package/src/owner.mjs +3 -18
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pmcf",
|
|
3
|
-
"version": "6.60.
|
|
3
|
+
"version": "6.60.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"npm-pkgbuild": "^22.2.6",
|
|
58
58
|
"pacc": "^11.17.0",
|
|
59
59
|
"package-directory": "^8.2.0",
|
|
60
|
+
"pmcf": "^6.60.5",
|
|
60
61
|
"yaml": "^2.9.1"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
package/src/network.mjs
CHANGED
package/src/owner.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { normalizeCIDR, familyIP, FAMILY_IPV4 } from "ip-utilties";
|
|
2
2
|
import { FileContentProvider } from "npm-pkgbuild";
|
|
3
3
|
import { AggregatedMap } from "aggregated-map";
|
|
4
|
+
import { FilteredMap } from "filtered-map";
|
|
4
5
|
import {
|
|
5
6
|
string_set_attribute_writable,
|
|
6
7
|
string_attribute_writable,
|
|
@@ -59,21 +60,13 @@ export class owner extends ServiceOwner {
|
|
|
59
60
|
owners = new Map();
|
|
60
61
|
networkInterfaces = new Map();
|
|
61
62
|
_networks = new Map();
|
|
62
|
-
_clusters = new Map();
|
|
63
63
|
_hosts = new Map();
|
|
64
64
|
_subnets = new Map();
|
|
65
65
|
|
|
66
|
-
/**
|
|
67
|
-
* hosts we own direcly.
|
|
68
|
-
*/
|
|
69
|
-
get directHosts() {
|
|
70
|
-
return new AggregatedMap([this._hosts, this._clusters]);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
66
|
get hosts() {
|
|
74
67
|
return new AggregatedMap(
|
|
75
68
|
[this, ...this.networks.values(), ...this.owners.values()].map(
|
|
76
|
-
node => node.
|
|
69
|
+
node => node._hosts
|
|
77
70
|
)
|
|
78
71
|
);
|
|
79
72
|
}
|
|
@@ -83,15 +76,7 @@ export class owner extends ServiceOwner {
|
|
|
83
76
|
}
|
|
84
77
|
|
|
85
78
|
get clusters() {
|
|
86
|
-
return new
|
|
87
|
-
[this, ...this.networks.values(), ...this.owners.values()].map(
|
|
88
|
-
node => node._clusters
|
|
89
|
-
)
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
set clusters(value) {
|
|
94
|
-
this._clusters = value;
|
|
79
|
+
return new FilteredMap(this.hosts, host => host.isCluster);
|
|
95
80
|
}
|
|
96
81
|
|
|
97
82
|
get networks() {
|