Skip to content

Commit a9387df

Browse files
committed
Merge branch 'master' into ui-multiple-nics
2 parents 53c589a + ee22753 commit a9387df

126 files changed

Lines changed: 2664 additions & 1988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

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

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

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

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

‎api/src/com/cloud/network/Network.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ public static class Provider {
138138
// NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking
139139
public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
140140
public static final Provider MidokuraMidonet = new Provider("MidokuraMidonet", true);
141-
public static final Provider VPCNetscaler = new Provider("VPCNetscaler", true);
142141

143142
private String name;
144143
private boolean isExternal;

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

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
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;
3234
import org.apache.cloudstack.api.command.admin.resource.ListAlertsCmd;
3335
import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd;
3436
import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd;
@@ -40,12 +42,12 @@
4042
import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd;
4143
import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd;
4244
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;
4347
import org.apache.cloudstack.api.command.user.guest.ListGuestOsCategoriesCmd;
4448
import org.apache.cloudstack.api.command.user.guest.ListGuestOsCmd;
4549
import org.apache.cloudstack.api.command.user.iso.ListIsosCmd;
4650
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;
4951
import org.apache.cloudstack.api.command.user.ssh.CreateSSHKeyPairCmd;
5052
import org.apache.cloudstack.api.command.user.ssh.DeleteSSHKeyPairCmd;
5153
import org.apache.cloudstack.api.command.user.ssh.ListSSHKeyPairsCmd;
@@ -55,12 +57,10 @@
5557
import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd;
5658
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
5759
import org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd;
58-
import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd;
5960

6061
import com.cloud.alert.Alert;
6162
import com.cloud.capacity.Capacity;
6263
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,8 +72,6 @@
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;
7775
import com.cloud.org.Cluster;
7876
import com.cloud.storage.GuestOS;
7977
import com.cloud.storage.GuestOsCategory;
@@ -194,6 +192,34 @@ public interface ManagementService {
194192
*/
195193
Pair<List<? extends Alert>, Integer> searchForAlerts(ListAlertsCmd cmd);
196194

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+
197223
/**
198224
* list all the capacity rows in capacity operations table
199225
*

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,7 @@ 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";
462463

463464
public enum HostDetails {
464465
all, capacity, events, stats, min;

‎api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public class CreateAccountCmd extends BaseCmd {
7878
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
7979
private Map<String, String> details;
8080

81+
8182
/////////////////////////////////////////////////////
8283
/////////////////// Accessors ///////////////////////
8384
/////////////////////////////////////////////////////
@@ -149,7 +150,8 @@ public long getEntityOwnerId() {
149150
@Override
150151
public void execute(){
151152
UserContext.current().setEventDetails("Account Name: "+getAccountName()+", Domain Id:"+getDomainId());
152-
UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), getDomainId(), getNetworkDomain(), getDetails());
153+
UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(),
154+
getDomainId(), getNetworkDomain(), getDetails());
153155
if (userAccount != null) {
154156
AccountResponse response = _responseGenerator.createUserAccountResponse(userAccount);
155157
response.setResponseName(getCommandName());

‎api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class DeleteAccountCmd extends BaseAsyncCmd {
4949
private Long id;
5050

5151
@Inject RegionService _regionService;
52-
52+
5353
/////////////////////////////////////////////////////
5454
/////////////////// Accessors ///////////////////////
5555
/////////////////////////////////////////////////////
@@ -96,7 +96,7 @@ public String getEventDescription() {
9696
@Override
9797
public void execute(){
9898
UserContext.current().setEventDetails("Account Id: "+getId());
99-
99+
100100
boolean result = _regionService.deleteUserAccount(this);
101101
if (result) {
102102
SuccessResponse response = new SuccessResponse(getCommandName());

‎api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public class DisableAccountCmd extends BaseAsyncCmd {
5959
private Boolean lockRequested;
6060

6161
@Inject RegionService _regionService;
62-
62+
6363
/////////////////////////////////////////////////////
6464
/////////////////// Accessors ///////////////////////
6565
/////////////////////////////////////////////////////

‎api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class EnableAccountCmd extends BaseCmd {
5151
private Long domainId;
5252

5353
@Inject RegionService _regionService;
54-
54+
5555
/////////////////////////////////////////////////////
5656
/////////////////// Accessors ///////////////////////
5757
/////////////////////////////////////////////////////
@@ -68,7 +68,6 @@ public Long getDomainId() {
6868
return domainId;
6969
}
7070

71-
7271
/////////////////////////////////////////////////////
7372
/////////////// API Implementation///////////////////
7473
/////////////////////////////////////////////////////

‎api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class UpdateAccountCmd extends BaseCmd{
6464
private Map details;
6565

6666
@Inject RegionService _regionService;
67-
67+
6868
/////////////////////////////////////////////////////
6969
/////////////////// Accessors ///////////////////////
7070
/////////////////////////////////////////////////////
@@ -99,7 +99,6 @@ public Map getDetails() {
9999
return params;
100100
}
101101

102-
103102
/////////////////////////////////////////////////////
104103
/////////////// API Implementation///////////////////
105104
/////////////////////////////////////////////////////

0 commit comments

Comments
 (0)