mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
removed unused guest ip fields from system vm
This commit is contained in:
parent
1a7617bb95
commit
65034995a3
@ -50,15 +50,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
@Column(name="dns2")
|
||||
private String dns2;
|
||||
|
||||
@Column(name="guest_mac_address")
|
||||
private String guestMacAddress;
|
||||
|
||||
@Column(name="guest_ip_address")
|
||||
private String guestIpAddress;
|
||||
|
||||
@Column(name="guest_netmask")
|
||||
private String guestNetmask;
|
||||
|
||||
@Column(name="public_ip_address", nullable=false)
|
||||
private String publicIpAddress;
|
||||
|
||||
@ -130,18 +121,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
this.publicMacAddress = publicMacAddress;
|
||||
}
|
||||
|
||||
public void setGuestIpAddress(String guestIpAddress) {
|
||||
this.guestIpAddress = guestIpAddress;
|
||||
}
|
||||
|
||||
public void setGuestNetmask(String guestNetmask) {
|
||||
this.guestNetmask = guestNetmask;
|
||||
}
|
||||
|
||||
public void setGuestMacAddress(String guestMacAddress) {
|
||||
this.guestMacAddress = guestMacAddress;
|
||||
}
|
||||
|
||||
public void setRamSize(int ramSize) {
|
||||
this.ramSize = ramSize;
|
||||
}
|
||||
@ -187,21 +166,6 @@ public class ConsoleProxyVO extends VMInstanceVO implements ConsoleProxy {
|
||||
public String getPublicMacAddress() {
|
||||
return this.publicMacAddress;
|
||||
}
|
||||
|
||||
|
||||
public String getGuestIpAddress() {
|
||||
return this.guestIpAddress;
|
||||
}
|
||||
|
||||
|
||||
public String getGuestNetmask() {
|
||||
return this.guestNetmask;
|
||||
}
|
||||
|
||||
|
||||
public String getGuestMacAddress() {
|
||||
return this.guestMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomain() {
|
||||
|
||||
@ -57,15 +57,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
@Column(name="public_netmask", nullable=false)
|
||||
private String publicNetmask;
|
||||
|
||||
@Column(name="guest_mac_address")
|
||||
private String guestMacAddress;
|
||||
|
||||
@Column(name="guest_ip_address")
|
||||
private String guestIpAddress;
|
||||
|
||||
@Column(name="guest_netmask")
|
||||
private String guestNetmask;
|
||||
|
||||
@Column(name="domain", nullable=false)
|
||||
private String domain;
|
||||
|
||||
@ -122,18 +113,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
this.publicMacAddress = publicMacAddress;
|
||||
}
|
||||
|
||||
public void setGuestIpAddress(String guestIpAddress) {
|
||||
this.guestIpAddress = guestIpAddress;
|
||||
}
|
||||
|
||||
public void setGuestNetmask(String guestNetmask) {
|
||||
this.guestNetmask = guestNetmask;
|
||||
}
|
||||
|
||||
public void setGuestMacAddress(String guestMacAddress) {
|
||||
this.guestMacAddress = guestMacAddress;
|
||||
}
|
||||
|
||||
public void setRamSize(int ramSize) {
|
||||
this.ramSize = ramSize;
|
||||
}
|
||||
@ -173,20 +152,6 @@ public class SecondaryStorageVmVO extends VMInstanceVO implements SecondaryStora
|
||||
}
|
||||
|
||||
|
||||
public String getGuestIpAddress() {
|
||||
return this.guestIpAddress;
|
||||
}
|
||||
|
||||
|
||||
public String getGuestNetmask() {
|
||||
return this.guestNetmask;
|
||||
}
|
||||
|
||||
|
||||
public String getGuestMacAddress() {
|
||||
return this.guestMacAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDomain() {
|
||||
return this.domain;
|
||||
|
||||
@ -1665,10 +1665,6 @@ public class ConsoleProxyManagerImpl implements ConsoleProxyManager, ConsoleProx
|
||||
proxy.setPublicIpAddress(nic.getIp4Address());
|
||||
proxy.setPublicNetmask(nic.getNetmask());
|
||||
proxy.setPublicMacAddress(nic.getMacAddress());
|
||||
} else if (network.getTrafficType() == TrafficType.Control) {
|
||||
proxy.setGuestIpAddress(nic.getIp4Address());
|
||||
proxy.setGuestNetmask(nic.getNetmask());
|
||||
proxy.setGuestMacAddress(nic.getMacAddress());
|
||||
} else if (network.getTrafficType() == TrafficType.Management) {
|
||||
proxy.setPrivateIpAddress(nic.getIp4Address());
|
||||
proxy.setPrivateMacAddress(nic.getMacAddress());
|
||||
|
||||
@ -563,15 +563,12 @@ public class Db20to21MigrationUtil {
|
||||
String[] macAddresses = _dcDao.getNextAvailableMacAddressPair(zoneId, (1L << 31));
|
||||
String guestMacAddress = macAddresses[0];
|
||||
|
||||
proxy.setGuestMacAddress(guestMacAddress);
|
||||
if(proxy.getState() == State.Running || proxy.getState() == State.Starting) {
|
||||
System.out.println("System VM " + proxy.getName() + " is in active state, mark it to Stopping state for migration");
|
||||
proxy.setState(State.Stopping);
|
||||
}
|
||||
|
||||
String guestIpAddress = _dcDao.allocateLinkLocalIpAddress(proxy.getDataCenterId(), proxy.getPodId(), proxy.getId(), null);
|
||||
proxy.setGuestIpAddress(guestIpAddress);
|
||||
proxy.setGuestNetmask("255.255.0.0");
|
||||
|
||||
System.out.println("Assign link loal address to proxy " + proxy.getName() + ", link local address: " + guestIpAddress);
|
||||
_consoleProxyDao.update(proxy.getId(), proxy);
|
||||
@ -590,15 +587,12 @@ public class Db20to21MigrationUtil {
|
||||
String[] macAddresses = _dcDao.getNextAvailableMacAddressPair(zoneId, (1L << 31));
|
||||
String guestMacAddress = macAddresses[0];
|
||||
|
||||
secStorageVm.setGuestMacAddress(guestMacAddress);
|
||||
if(secStorageVm.getState() == State.Running || secStorageVm.getState() == State.Starting) {
|
||||
System.out.println("System VM " + secStorageVm.getName() + " is in active state, mark it to Stopping state for migration");
|
||||
secStorageVm.setState(State.Stopping);
|
||||
}
|
||||
|
||||
String guestIpAddress = _dcDao.allocateLinkLocalIpAddress(secStorageVm.getDataCenterId(), secStorageVm.getPodId(), secStorageVm.getId(), null);
|
||||
secStorageVm.setGuestIpAddress(guestIpAddress);
|
||||
secStorageVm.setGuestNetmask("255.255.0.0");
|
||||
|
||||
System.out.println("Assign link loal address to secondary storage VM " + secStorageVm.getName() + ", link local address: " + guestIpAddress);
|
||||
_secStorageVmDao.update(secStorageVm.getId(), secStorageVm);
|
||||
|
||||
@ -1137,10 +1137,6 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
secVm.setPublicIpAddress(nic.getIp4Address());
|
||||
secVm.setPublicNetmask(nic.getNetmask());
|
||||
secVm.setPublicMacAddress(nic.getMacAddress());
|
||||
} else if (network.getTrafficType() == TrafficType.Control) {
|
||||
secVm.setGuestIpAddress(nic.getIp4Address());
|
||||
secVm.setGuestNetmask(nic.getNetmask());
|
||||
secVm.setGuestMacAddress(nic.getMacAddress());
|
||||
} else if (network.getTrafficType() == TrafficType.Management) {
|
||||
secVm.setPrivateIpAddress(nic.getIp4Address());
|
||||
secVm.setPrivateMacAddress(nic.getMacAddress());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user