Skip to content

Commit efe2549

Browse files
committed
CLOUDSTACK-5458: cpu speed is not getting updated in vm_instance table after service offeirngs change
Removed cpu, ram and cpu speed fields from the vm_instance table as these are not used
1 parent c5088ee commit efe2549

3 files changed

Lines changed: 6 additions & 20 deletions

File tree

‎engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityImpl.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ public void init(String vmId, String owner, String hostName, String displayName,
5454
this.vmEntityVO.setOwner(owner);
5555
this.vmEntityVO.setHostname(hostName);
5656
this.vmEntityVO.setDisplayname(displayName);
57-
this.vmEntityVO.setSpeed(speed);
5857
this.vmEntityVO.setComputeTags(computeTags);
5958
this.vmEntityVO.setRootDiskTags(rootDiskTags);
6059
this.vmEntityVO.setNetworkIds(networks);
@@ -72,7 +71,6 @@ public VirtualMachineEntityImpl(String vmId, String owner, String hostName, Stri
7271
this.vmEntityVO.setOwner(owner);
7372
this.vmEntityVO.setHostname(hostName);
7473
this.vmEntityVO.setDisplayname(displayName);
75-
this.vmEntityVO.setSpeed(speed);
7674
this.vmEntityVO.setComputeTags(computeTags);
7775
this.vmEntityVO.setRootDiskTags(rootDiskTags);
7876
this.vmEntityVO.setNetworkIds(networks);

‎engine/schema/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,12 +145,6 @@ public class VMEntityVO implements VirtualMachine, FiniteStateObject<State, Virt
145145
@Enumerated(value=EnumType.STRING)
146146
protected HypervisorType hypervisorType;
147147

148-
@Column(name="ram")
149-
protected long ram;
150-
151-
@Column(name="cpu")
152-
protected int cpu;
153-
154148
@Transient
155149
Map<String, String> details;
156150

@@ -161,9 +155,6 @@ public class VMEntityVO implements VirtualMachine, FiniteStateObject<State, Virt
161155
@Column(name="owner")
162156
private String owner = null;
163157

164-
@Column(name="speed")
165-
private int speed;
166-
167158
@Transient
168159
List<String> computeTags;
169160

@@ -513,14 +504,6 @@ public void setOwner(String owner) {
513504
this.owner = owner;
514505
}
515506

516-
public int getSpeed() {
517-
return speed;
518-
}
519-
520-
public void setSpeed(int speed) {
521-
this.speed = speed;
522-
}
523-
524507
public List<String> getComputeTags() {
525508
return computeTags;
526509
}

‎setup/db/db/schema-421to430.sql‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,4 +861,9 @@ CREATE TABLE `cloud`.`s2s_vpn_connection_details` (
861861
`display` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'True if the detail can be displayed to the end user',
862862
PRIMARY KEY (`id`),
863863
CONSTRAINT `fk_s2s_vpn_connection_details__s2s_vpn_connection_id` FOREIGN KEY `fk_s2s_vpn_connection_details__s2s_vpn_connection_id`(`s2s_vpn_connection_id`) REFERENCES `s2s_vpn_connection`(`id`) ON DELETE CASCADE
864-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
864+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
865+
866+
ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `cpu`;
867+
ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `ram`;
868+
ALTER TABLE `cloud`.`vm_instance` DROP COLUMN `speed`;
869+

0 commit comments

Comments
 (0)