* ofmock: Notify link explicitly when the port state is changed.
* ofmock: Ensure that both edge ports of the inter-switch link are
created.
Change-Id: I80278595c11fc6537dfd91ce0813858c0dc52b43
Signed-off-by: Shigeru Yasuda <s-yasuda@da.jp.nec.com>
"Initial switch port cannot be specified to peer: " + peer;
throw new IllegalArgumentException(msg);
}
+
+ // Ensure that both ports are already notified.
+ portListener.awaitCreated(pid);
+ portListener.awaitCreated(peer);
}
String dst;
provider.publish(getNodeConnectorUpdated());
String peer = peerIdentifier;
- if (peer != null && state) {
- notifyLinkDiscovered(provider, peer);
+ if (peer != null) {
+ if (state) {
+ notifyLinkDiscovered(provider, peer);
+ } else {
+ notifyLinkRemoved(provider, peer);
+ }
}
}
}