pmcf 1.18.0 → 1.19.0
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/model.mjs +8 -2
package/package.json
CHANGED
package/src/model.mjs
CHANGED
|
@@ -776,6 +776,10 @@ export class Host extends Base {
|
|
|
776
776
|
|
|
777
777
|
addNetworkInterface(networkInterface) {
|
|
778
778
|
this.networkInterfaces[networkInterface.name] = networkInterface;
|
|
779
|
+
|
|
780
|
+
if(networkInterface.network) {
|
|
781
|
+
networkInterface.network.addHost(this);
|
|
782
|
+
}
|
|
779
783
|
}
|
|
780
784
|
|
|
781
785
|
*networkAddresses() {
|
|
@@ -866,12 +870,14 @@ export class NetworkInterface extends Base {
|
|
|
866
870
|
|
|
867
871
|
if (network) {
|
|
868
872
|
data.network = network;
|
|
869
|
-
network.addHost(owner);
|
|
870
873
|
} else {
|
|
871
874
|
this.error("Missing network", data.network);
|
|
872
875
|
}
|
|
873
876
|
}
|
|
874
|
-
|
|
877
|
+
else if(owner.owner instanceof Network) {
|
|
878
|
+
data.network = owner.owner;
|
|
879
|
+
}
|
|
880
|
+
|
|
875
881
|
Object.assign(this, data);
|
|
876
882
|
|
|
877
883
|
owner.addNetworkInterface(this);
|