Skip to content

Commit bd45085

Browse files
committed
Revert "CLOUDSTACK-874 Ability to delete Events and Alerts"
This reverts commit 5e4c2c8.
1 parent ee22753 commit bd45085

17 files changed

Lines changed: 120 additions & 475 deletions

File tree

api/src/com/cloud/alert/Alert.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ public interface Alert extends Identity, InternalIdentity {
3030
Date getCreatedDate();
3131
Date getLastSent();
3232
Date getResolved();
33-
boolean getArchived();
3433
}

api/src/com/cloud/event/Event.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,4 @@ public enum State {
4040
String getLevel();
4141
long getStartId();
4242
String getParameters();
43-
boolean getArchived();
4443
}

api/src/com/cloud/server/ManagementService.java

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import org.apache.cloudstack.api.command.admin.host.ListHostsCmd;
3030
import org.apache.cloudstack.api.command.admin.host.UpdateHostPasswordCmd;
3131
import org.apache.cloudstack.api.command.admin.pod.ListPodsByCmd;
32-
import org.apache.cloudstack.api.command.admin.resource.ArchiveAlertsCmd;
33-
import org.apache.cloudstack.api.command.admin.resource.DeleteAlertsCmd;
3432
import org.apache.cloudstack.api.command.admin.resource.ListAlertsCmd;
3533
import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd;
3634
import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd;
@@ -42,12 +40,12 @@
4240
import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd;
4341
import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd;
4442
import org.apache.cloudstack.api.command.user.config.ListCapabilitiesCmd;
45-
import org.apache.cloudstack.api.command.user.event.ArchiveEventsCmd;
46-
import org.apache.cloudstack.api.command.user.event.DeleteEventsCmd;
4743
import org.apache.cloudstack.api.command.user.guest.ListGuestOsCategoriesCmd;
4844
import org.apache.cloudstack.api.command.user.guest.ListGuestOsCmd;
4945
import org.apache.cloudstack.api.command.user.iso.ListIsosCmd;
5046
import org.apache.cloudstack.api.command.user.iso.UpdateIsoCmd;
47+
import org.apache.cloudstack.api.command.user.offering.ListDiskOfferingsCmd;
48+
import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd;
5149
import org.apache.cloudstack.api.command.user.ssh.CreateSSHKeyPairCmd;
5250
import org.apache.cloudstack.api.command.user.ssh.DeleteSSHKeyPairCmd;
5351
import org.apache.cloudstack.api.command.user.ssh.ListSSHKeyPairsCmd;
@@ -57,10 +55,12 @@
5755
import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd;
5856
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
5957
import org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd;
58+
import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
6059

6160
import com.cloud.alert.Alert;
6261
import com.cloud.capacity.Capacity;
6362
import com.cloud.configuration.Configuration;
63+
import com.cloud.dc.DataCenter;
6464
import com.cloud.dc.Pod;
6565
import com.cloud.dc.Vlan;
6666
import com.cloud.domain.Domain;
@@ -72,6 +72,8 @@
7272
import com.cloud.hypervisor.Hypervisor.HypervisorType;
7373
import com.cloud.hypervisor.HypervisorCapabilities;
7474
import com.cloud.network.IpAddress;
75+
import com.cloud.offering.DiskOffering;
76+
import com.cloud.offering.ServiceOffering;
7577
import com.cloud.org.Cluster;
7678
import com.cloud.storage.GuestOS;
7779
import com.cloud.storage.GuestOsCategory;
@@ -192,34 +194,6 @@ public interface ManagementService {
192194
*/
193195
Pair<List<? extends Alert>, Integer> searchForAlerts(ListAlertsCmd cmd);
194196

195-
/**
196-
* Archive alerts
197-
* @param cmd
198-
* @return True on success. False otherwise.
199-
*/
200-
boolean archiveAlerts(ArchiveAlertsCmd cmd);
201-
202-
/**
203-
* Delete alerts
204-
* @param cmd
205-
* @return True on success. False otherwise.
206-
*/
207-
boolean deleteAlerts(DeleteAlertsCmd cmd);
208-
209-
/**
210-
* Archive events
211-
* @param cmd
212-
* @return True on success. False otherwise.
213-
*/
214-
boolean archiveEvents(ArchiveEventsCmd cmd);
215-
216-
/**
217-
* Delete events
218-
* @param cmd
219-
* @return True on success. False otherwise.
220-
*/
221-
boolean deleteEvents(DeleteEventsCmd cmd);
222-
223197
/**
224198
* list all the capacity rows in capacity operations table
225199
*

api/src/org/apache/cloudstack/api/ApiConstants.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ public class ApiConstants {
459459
public static final String UCS_BLADE_DN = "bladedn";
460460
public static final String UCS_BLADE_ID = "bladeid";
461461
public static final String VM_GUEST_IP = "vmguestip";
462-
public static final String OLDER_THAN = "olderthan";
463462

464463
public enum HostDetails {
465464
all, capacity, events, stats, min;

client/tomcatconf/commands.properties.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,9 @@ listZones=15
218218
#### events commands
219219
listEvents=15
220220
listEventTypes=15
221-
archiveEvents=15
222-
deleteEvents=15
223221

224222
#### alerts commands
225223
listAlerts=3
226-
archiveAlerts=1
227-
deleteAlerts=1
228224

229225
#### system capacity commands
230226
listCapacity=3

core/src/com/cloud/alert/AlertVO.java

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
import javax.persistence.Temporal;
2929
import javax.persistence.TemporalType;
3030

31+
import org.apache.cloudstack.api.Identity;
3132
import com.cloud.utils.db.GenericDao;
33+
import org.apache.cloudstack.api.InternalIdentity;
3234

3335
@Entity
3436
@Table(name="alert")
@@ -66,19 +68,16 @@ public class AlertVO implements Alert {
6668
@Temporal(TemporalType.TIMESTAMP)
6769
@Column(name="resolved", updatable=true, nullable=true)
6870
private Date resolved;
69-
71+
7072
@Column(name="uuid")
7173
private String uuid;
7274

73-
@Column(name="archived")
74-
private boolean archived;
75-
7675
public AlertVO() {
77-
this.uuid = UUID.randomUUID().toString();
76+
this.uuid = UUID.randomUUID().toString();
7877
}
7978
public AlertVO(Long id) {
8079
this.id = id;
81-
this.uuid = UUID.randomUUID().toString();
80+
this.uuid = UUID.randomUUID().toString();
8281
}
8382

8483
@Override
@@ -104,12 +103,12 @@ public void setSubject(String subject) {
104103
}
105104

106105
public Long getClusterId() {
107-
return clusterId;
108-
}
109-
public void setClusterId(Long clusterId) {
110-
this.clusterId = clusterId;
111-
}
112-
@Override
106+
return clusterId;
107+
}
108+
public void setClusterId(Long clusterId) {
109+
this.clusterId = clusterId;
110+
}
111+
@Override
113112
public Long getPodId() {
114113
return podId;
115114
}
@@ -165,19 +164,10 @@ public void setResolved(Date resolved) {
165164

166165
@Override
167166
public String getUuid() {
168-
return this.uuid;
167+
return this.uuid;
169168
}
170-
169+
171170
public void setUuid(String uuid) {
172-
this.uuid = uuid;
173-
}
174-
175-
@Override
176-
public boolean getArchived() {
177-
return archived;
178-
}
179-
180-
public void setArchived(Boolean archived) {
181-
this.archived = archived;
171+
this.uuid = uuid;
182172
}
183173
}

0 commit comments

Comments
 (0)