mirror of https://github.com/apache/cloudstack.git
CS-15404 [2.2.14 to 3.0.4 upgrade] After upgrade cloud.physical_network.id starts from 200 which is not the case with fresh installation
Reviewed-By: Alena Changes: - We need to set the id while creating physical network entry.
This commit is contained in:
parent
31ba107338
commit
9ea905b620
|
|
@ -4701,7 +4701,9 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
|||
try {
|
||||
txn.start();
|
||||
// Create the new physical network in the database
|
||||
PhysicalNetworkVO pNetwork = new PhysicalNetworkVO(zoneId, vnetRange, networkSpeed, domainId, broadcastDomainRange, name);
|
||||
long id = _physicalNetworkDao.getNextInSequence(Long.class, "id");
|
||||
|
||||
PhysicalNetworkVO pNetwork = new PhysicalNetworkVO(id, zoneId, vnetRange, networkSpeed, domainId, broadcastDomainRange, name);
|
||||
pNetwork.setTags(tags);
|
||||
pNetwork.setIsolationMethods(isolationMethods);
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class PhysicalNetworkVO implements PhysicalNetwork {
|
|||
|
||||
}
|
||||
|
||||
public PhysicalNetworkVO(long dataCenterId, String vnet, String speed, Long domainId, BroadcastDomainRange broadcastDomainRange, String name) {
|
||||
public PhysicalNetworkVO(long id, long dataCenterId, String vnet, String speed, Long domainId, BroadcastDomainRange broadcastDomainRange, String name) {
|
||||
this.dataCenterId = dataCenterId;
|
||||
this.setVnet(vnet);
|
||||
this.setSpeed(speed);
|
||||
|
|
@ -103,6 +103,7 @@ public class PhysicalNetworkVO implements PhysicalNetwork {
|
|||
this.state = State.Disabled;
|
||||
this.uuid = UUID.randomUUID().toString();
|
||||
this.name = name;
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue