mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix about prepareMigrationCommand
This commit is contained in:
parent
71cae63323
commit
d4828debba
@ -1317,7 +1317,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
if ("untagged".equalsIgnoreCase(vlanId)) {
|
if ("untagged".equalsIgnoreCase(vlanId)) {
|
||||||
vifr.network = Network.getByUuid(conn, _host.publicNetwork);
|
vifr.network = Network.getByUuid(conn, _host.publicNetwork);
|
||||||
} else {
|
} else {
|
||||||
Network vlanNetwork = enableVlanNetwork(Long.valueOf(vlanId), _host.publicNetwork, _host.publicPif);
|
Network vlanNetwork = enableVlanNetwork(Long.valueOf(vlanId), _host.publicPif);
|
||||||
|
|
||||||
if (vlanNetwork == null) {
|
if (vlanNetwork == null) {
|
||||||
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlanId);
|
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlanId);
|
||||||
@ -1975,7 +1975,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Network vlanNetwork = enableVlanNetwork(vlan, nwuuid, pifuuid);
|
Network vlanNetwork = enableVlanNetwork(vlan, pifuuid);
|
||||||
|
|
||||||
if (vlanNetwork == null) {
|
if (vlanNetwork == null) {
|
||||||
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlan);
|
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlan);
|
||||||
@ -2845,7 +2845,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
if ("untagged".equalsIgnoreCase(vlanTag)) {
|
if ("untagged".equalsIgnoreCase(vlanTag)) {
|
||||||
vlanNetwork = Network.getByUuid(conn, nwUuid);
|
vlanNetwork = Network.getByUuid(conn, nwUuid);
|
||||||
} else {
|
} else {
|
||||||
vlanNetwork = enableVlanNetwork(Long.valueOf(vlanTag), nwUuid, pifUuid);
|
vlanNetwork = enableVlanNetwork(Long.valueOf(vlanTag), pifUuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vlanNetwork == null) {
|
if (vlanNetwork == null) {
|
||||||
@ -3069,7 +3069,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
Connection conn = getConnection();
|
Connection conn = getConnection();
|
||||||
network = Network.getByUuid(conn, _host.guestNetwork);
|
network = Network.getByUuid(conn, _host.guestNetwork);
|
||||||
} else {
|
} else {
|
||||||
network = enableVlanNetwork(Long.parseLong(tag), _host.guestNetwork, _host.guestPif);
|
network = enableVlanNetwork(Long.parseLong(tag), _host.guestPif);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (network == null) {
|
if (network == null) {
|
||||||
@ -3190,7 +3190,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
if ("untagged".equalsIgnoreCase(vlanId)) {
|
if ("untagged".equalsIgnoreCase(vlanId)) {
|
||||||
vifr.network = Network.getByUuid(conn, _host.publicNetwork);
|
vifr.network = Network.getByUuid(conn, _host.publicNetwork);
|
||||||
} else {
|
} else {
|
||||||
Network vlanNetwork = enableVlanNetwork(Long.valueOf(vlanId), _host.publicNetwork, _host.publicPif);
|
Network vlanNetwork = enableVlanNetwork(Long.valueOf(vlanId), _host.publicPif);
|
||||||
|
|
||||||
if (vlanNetwork == null) {
|
if (vlanNetwork == null) {
|
||||||
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlanId);
|
throw new InternalErrorException("Failed to enable VLAN network with tag: " + vlanId);
|
||||||
@ -3658,7 +3658,7 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR
|
|||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Network enableVlanNetwork(long tag, String networkUuid, String pifUuid) throws XenAPIException, XmlRpcException {
|
protected Network enableVlanNetwork(long tag, String pifUuid) throws XenAPIException, XmlRpcException {
|
||||||
// In XenServer, vlan is added by
|
// In XenServer, vlan is added by
|
||||||
// 1. creating a network.
|
// 1. creating a network.
|
||||||
// 2. creating a vlan associating network with the pif.
|
// 2. creating a vlan associating network with the pif.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user