BigSwitch should only respond if it is the actual provider on the network. This fixes an NPE during the release call.
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90cd64cf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90cd64cf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90cd64cf Branch: refs/heads/vmware-datamodel Commit: 90cd64cf53378fcf99151211998cbb0b7b714fce Parents: 59cc382 Author: Hugo Trippaers <htrippa...@schubergphilis.com> Authored: Fri May 3 14:03:53 2013 +0200 Committer: Hugo Trippaers <htrippa...@schubergphilis.com> Committed: Mon May 6 11:48:56 2013 +0200 ---------------------------------------------------------------------- .../cloud/network/element/BigSwitchVnsElement.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cd64cf/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java ---------------------------------------------------------------------- diff --git a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java index 4ee9c93..411feab 100644 --- a/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java +++ b/plugins/network-elements/bigswitch-vns/src/com/cloud/network/element/BigSwitchVnsElement.java @@ -138,7 +138,7 @@ public class BigSwitchVnsElement extends AdapterBase implements if (network.getBroadcastDomainType() != BroadcastDomainType.Lswitch) { return false; } -/* + if (!_networkModel.isProviderForNetwork(getProvider(), network.getId())) { s_logger.debug("BigSwitchVnsElement is not a provider for network " @@ -153,7 +153,7 @@ public class BigSwitchVnsElement extends AdapterBase implements + network.getDisplayText()); return false; } -*/ + return true; }