pmcf 6.44.8 → 6.44.9
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
|
@@ -155,11 +155,9 @@ export const networkAttributes = {
|
|
|
155
155
|
multicastDNS: { ...boolean_attribute_writable, name: "multicastDNS" }
|
|
156
156
|
};
|
|
157
157
|
|
|
158
|
-
|
|
159
158
|
export const networkAddressAttributes = {
|
|
160
159
|
hostName: hostname_attribute,
|
|
161
160
|
cidrAddresses: cidr_addresses_attribute,
|
|
162
|
-
cidrAddress: cidr_address_attribute,
|
|
163
161
|
addresses: { ...string_collection_attribute_writable, name: "addresses" },
|
|
164
162
|
address: address_attribute
|
|
165
163
|
};
|
package/src/host.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
priority_attribute,
|
|
10
10
|
asArray
|
|
11
11
|
} from "pacc";
|
|
12
|
-
import { addresses, addType, assign } from "pmcf";
|
|
12
|
+
import { cidrAddresses, addresses, addType, assign } from "pmcf";
|
|
13
13
|
import {
|
|
14
14
|
networkAddressAttributes,
|
|
15
15
|
networkInterfaces_attribute,
|
|
@@ -297,6 +297,10 @@ export class Host extends ServiceOwner {
|
|
|
297
297
|
return addresses(this.networkAddresses());
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
+
get cidrAddresses() {
|
|
301
|
+
return cidrAddresses(this.networkAddresses());
|
|
302
|
+
}
|
|
303
|
+
|
|
300
304
|
get subnets() {
|
|
301
305
|
return new AggregatedMap(
|
|
302
306
|
[...this.networkInterfaces.values()].map(ni => ni.subnets)
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { join } from "node:path";
|
|
2
2
|
import {
|
|
3
3
|
string_attribute_writable,
|
|
4
|
-
default_collection_attribute_writable
|
|
5
|
-
number_attribute_writable
|
|
4
|
+
default_collection_attribute_writable
|
|
6
5
|
} from "pacc";
|
|
7
6
|
import { network_attribute } from "../common-attributes.mjs";
|
|
8
7
|
import { Host, cidrAddresses, addType } from "pmcf";
|
|
@@ -76,10 +75,6 @@ export class NetworkInterface extends SkeletonNetworkInterface {
|
|
|
76
75
|
get cidrAddresses() {
|
|
77
76
|
return cidrAddresses(this.networkAddresses());
|
|
78
77
|
}
|
|
79
|
-
|
|
80
|
-
get cidrAddress() {
|
|
81
|
-
return cidrAddresses(this.networkAddresses())[0];
|
|
82
|
-
}
|
|
83
78
|
|
|
84
79
|
addSubnet(address) {
|
|
85
80
|
if (this.network) {
|