mirror of https://github.com/apache/cloudstack.git
avoid both PodBaseNetworkGuru and StorageNetworkGuru reply to storage network
design call
This commit is contained in:
parent
2d218ad451
commit
de7a763ff9
|
|
@ -61,7 +61,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
@Inject StorageNetworkManager _sNwMgr;
|
||||
Random _rand = new Random(System.currentTimeMillis());
|
||||
|
||||
private static final TrafficType[] _trafficTypes = {TrafficType.Management, TrafficType.Storage};
|
||||
private static final TrafficType[] _trafficTypes = {TrafficType.Management};
|
||||
|
||||
@Override
|
||||
public boolean isMyTrafficType(TrafficType type) {
|
||||
|
|
@ -85,12 +85,7 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
if (!isMyTrafficType(type)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (type == TrafficType.Storage && _sNwMgr.isStorageIpRangeAvailable()) {
|
||||
s_logger.debug("There is an storage network ip range, let StorageNetworkGuru to handle TrafficType.Storage");
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
NetworkVO config = new NetworkVO(type, Mode.Static, BroadcastDomainType.Native, offering.getId(), Network.State.Setup, plan.getDataCenterId(), plan.getPhysicalNetworkId());
|
||||
return config;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,11 +71,7 @@ public class StorageNetworkGuru extends PodBasedNetworkGuru implements NetworkGu
|
|||
if (!canHandle(offering)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!_sNwMgr.isStorageIpRangeAvailable()) {
|
||||
return super.design(offering, plan, userSpecified, owner);
|
||||
}
|
||||
|
||||
|
||||
NetworkVO config = new NetworkVO(offering.getTrafficType(), Mode.Static, BroadcastDomainType.Native, offering.getId(), Network.State.Setup,
|
||||
plan.getDataCenterId(), plan.getPhysicalNetworkId());
|
||||
return config;
|
||||
|
|
|
|||
Loading…
Reference in New Issue