mirror of https://github.com/apache/cloudstack.git
fix secondary storage in new networking mode
This commit is contained in:
parent
5571b444f2
commit
fd7960f13d
|
|
@ -184,7 +184,7 @@ public class NicProfile {
|
|||
|
||||
public NicProfile(Nic nic, Network network, URI broadcastUri, URI isolationUri) {
|
||||
this.id = nic.getId();
|
||||
this.gateway = network.getGateway();
|
||||
this.gateway = nic.getGateway();
|
||||
this.mode = network.getMode();
|
||||
this.format = null;
|
||||
this.broadcastType = network.getBroadcastDomainType();
|
||||
|
|
@ -198,6 +198,9 @@ public class NicProfile {
|
|||
this.defaultNic = nic.isDefaultNic();
|
||||
this.broadcastUri = broadcastUri;
|
||||
this.isolationUri = isolationUri;
|
||||
this.netmask = nic.getNetmask();
|
||||
this.dns1 = network.getDns1();
|
||||
this.dns2 = network.getDns2();
|
||||
}
|
||||
|
||||
public NicProfile(long id, BroadcastDomainType type, Mode mode, long vmId) {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import javax.ejb.Local;
|
|||
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.Pod;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.deploy.DeployDestination;
|
||||
|
|
@ -46,7 +47,9 @@ public class PodBasedNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
}
|
||||
|
||||
NetworkVO config = new NetworkVO(type, offering.getGuestIpType(), Mode.Static, BroadcastDomainType.Native, offering.getId(), plan.getDataCenterId());
|
||||
|
||||
DataCenterVO dc = _dcDao.findById(plan.getDataCenterId());
|
||||
config.setDns1(dc.getDns1());
|
||||
config.setDns2(dc.getDns2());
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import javax.ejb.Local;
|
|||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenterVO;
|
||||
import com.cloud.dc.Vlan.VlanType;
|
||||
import com.cloud.dc.VlanVO;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
|
|
@ -51,7 +52,11 @@ public class PublicNetworkGuru extends AdapterBase implements NetworkGuru {
|
|||
return null;
|
||||
}
|
||||
|
||||
return new NetworkVO(offering.getTrafficType(), offering.getGuestIpType(), Mode.Static, BroadcastDomainType.Vlan, offering.getId(), plan.getDataCenterId());
|
||||
NetworkVO network = new NetworkVO(offering.getTrafficType(), offering.getGuestIpType(), Mode.Static, BroadcastDomainType.Vlan, offering.getId(), plan.getDataCenterId());
|
||||
DataCenterVO dc = _dcDao.findById(plan.getDataCenterId());
|
||||
network.setDns1(dc.getDns1());
|
||||
network.setDns2(dc.getDns2());
|
||||
return network;
|
||||
}
|
||||
|
||||
protected PublicNetworkGuru() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue