Skip to content

Commit 6d89e7a

Browse files
Fix the name of the column used to hold IPv4 range in 'vlan' table.
1 parent 8a3943b commit 6d89e7a

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

engine/schema/src/main/java/com/cloud/dc/VlanVO.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
// under the License.
1717
package com.cloud.dc;
1818

19-
import com.cloud.utils.db.GenericDao;
20-
2119
import java.util.Date;
2220
import java.util.UUID;
2321

@@ -30,6 +28,8 @@
3028
import javax.persistence.Id;
3129
import javax.persistence.Table;
3230

31+
import com.cloud.utils.db.GenericDao;
32+
3333
@Entity
3434
@Table(name = "vlan")
3535
public class VlanVO implements Vlan {
@@ -57,7 +57,7 @@ public class VlanVO implements Vlan {
5757
@Column(name = "data_center_id")
5858
long dataCenterId;
5959

60-
@Column(name = "description")
60+
@Column(name = "ip4_range")
6161
String ipRange;
6262

6363
@Column(name = "ip6_range")
@@ -185,7 +185,7 @@ public void setPhysicalNetworkId(Long physicalNetworkId) {
185185
public String toString() {
186186
if (toString == null) {
187187
toString =
188-
new StringBuilder("Vlan[").append(vlanTag)
188+
new StringBuilder("Vlan[").append(vlanTag)
189189
.append("|")
190190
.append(vlanGateway)
191191
.append("|")

engine/schema/src/main/resources/META-INF/db/schema-41100to41200.sql

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,8 @@
2222
-- [CLOUDSTACK-10314] Add reason column to ACL rule table
2323
ALTER TABLE `cloud`.`network_acl_item` ADD COLUMN `reason` VARCHAR(2500) AFTER `display`;
2424

25-
--[CLOUDSTACK-9846] Make provision to store content and subject for Alerts in separate columns.
25+
-- [CLOUDSTACK-9846] Make provision to store content and subject for Alerts in separate columns.
2626
ALTER TABLE `cloud`.`alert` ADD COLUMN `content` VARCHAR(5000);
27+
28+
-- Fix the name of the column used to hold IPv4 range in 'vlan' table.
29+
ALTER TABLE `vlan` CHANGE `description` `ip4_range` varchar(255);

server/src/main/java/com/cloud/test/PodZoneConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ public void deleteZone(String name) {
485485
public void saveVlan(long zoneId, Long podId, String vlanId, String vlanGateway, String vlanNetmask, String vlanType, String ipRange, long networkId,
486486
long physicalNetworkId) {
487487
String sql =
488-
"INSERT INTO `cloud`.`vlan` (vlan_id, vlan_gateway, vlan_netmask, data_center_id, vlan_type, description, network_id, physical_network_id) " + "VALUES ('" +
488+
"INSERT INTO `cloud`.`vlan` (vlan_id, vlan_gateway, vlan_netmask, data_center_id, vlan_type, ip4_range, network_id, physical_network_id) " + "VALUES ('" +
489489
vlanId + "','" + vlanGateway + "','" + vlanNetmask + "','" + zoneId + "','" + vlanType + "','" + ipRange + "','" + networkId + "','" + physicalNetworkId +
490490
"')";
491491
DatabaseConfig.saveSQL(sql, "Failed to save vlan due to exception. Please contact Cloud Support.");

0 commit comments

Comments
 (0)