mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 8099: returning systemvms for direct networking
status 8099: resolved fixed
This commit is contained in:
parent
69846d7c6e
commit
b2a9b3061d
@ -89,6 +89,7 @@ import com.cloud.dc.DataCenterVO;
|
|||||||
import com.cloud.dc.HostPodVO;
|
import com.cloud.dc.HostPodVO;
|
||||||
import com.cloud.dc.Pod;
|
import com.cloud.dc.Pod;
|
||||||
import com.cloud.dc.Vlan;
|
import com.cloud.dc.Vlan;
|
||||||
|
import com.cloud.dc.DataCenter.NetworkType;
|
||||||
import com.cloud.dc.Vlan.VlanType;
|
import com.cloud.dc.Vlan.VlanType;
|
||||||
import com.cloud.dc.VlanVO;
|
import com.cloud.dc.VlanVO;
|
||||||
import com.cloud.domain.Domain;
|
import com.cloud.domain.Domain;
|
||||||
@ -1230,7 +1231,11 @@ public class ApiResponseHelper implements ResponseGenerator {
|
|||||||
for (Nic singleNic : nics) {
|
for (Nic singleNic : nics) {
|
||||||
Network network = ApiDBUtils.findNetworkById(singleNic.getNetworkId());
|
Network network = ApiDBUtils.findNetworkById(singleNic.getNetworkId());
|
||||||
if (network != null) {
|
if (network != null) {
|
||||||
if (network.getTrafficType() == TrafficType.Public) {
|
TrafficType trafficType = TrafficType.Public;
|
||||||
|
if(zone.getNetworkType() == NetworkType.Basic) {
|
||||||
|
trafficType = TrafficType.Guest;
|
||||||
|
}
|
||||||
|
if (network.getTrafficType() == trafficType) {
|
||||||
vmResponse.setPublicIp(singleNic.getIp4Address());
|
vmResponse.setPublicIp(singleNic.getIp4Address());
|
||||||
vmResponse.setPublicMacAddress(singleNic.getMacAddress());
|
vmResponse.setPublicMacAddress(singleNic.getMacAddress());
|
||||||
vmResponse.setPublicNetmask(singleNic.getNetmask());
|
vmResponse.setPublicNetmask(singleNic.getNetmask());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user