Skip to content

Commit 0009b8d

Browse files
committed
Merge remote-tracking branch 'apache/master' into 4.15-lbconfigs
2 parents fd8e6b2 + 49baa90 commit 0009b8d

File tree

352 files changed

+8777
-3149
lines changed

Some content is hidden

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

352 files changed

+8777
-3149
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ env:
164164

165165
- TESTS="component/test_project_usage
166166
component/test_protocol_number_security_group
167+
component/test_public_ip
167168
component/test_resource_limits"
168169

169170
- TESTS="component/test_regions_accounts

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ via Github pull requests.
5858
* Developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Home)
5959
* [Release notes](http://docs.cloudstack.apache.org/projects/cloudstack-release-notes)
6060
* Design [documents](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Design)
61-
* API [documentation](http://cloudstack.apache.org/docs/api)
61+
* API [documentation](https://cloudstack.apache.org/api.html)
6262
* How to [contribute](CONTRIBUTING.md)
6363

6464
## Getting Involved and Contributing
@@ -81,11 +81,7 @@ Mailing lists:
8181
- [Issues Mailing List](mailto:issues-subscribe@cloudstack.apache.org)
8282
- [Marketing Mailing List](mailto:marketing-subscribe@cloudstack.apache.org)
8383

84-
IRC, join us on irc.freenode.net on:
85-
- `#cloudstack`: General Apache CloudStack conversation and end user support
86-
- `#cloudstack-dev`: Development discussions
87-
88-
Report and/or check bugs on [JIRA](https://issues.apache.org/jira/browse/CLOUDSTACK) and check our
84+
Report and/or check bugs on [Github](https://github.com/apache/cloudstack/issues) and check our
8985
developer [page](http://cloudstack.apache.org/developers.html) for contributing code.
9086

9187
## News and Events

api/src/main/java/com/cloud/network/VirtualNetworkApplianceService.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import com.cloud.network.router.VirtualRouter;
2828
import com.cloud.user.Account;
2929
import com.cloud.utils.Pair;
30+
import com.cloud.vm.Nic;
3031

3132
public interface VirtualNetworkApplianceService {
3233
/**
@@ -75,4 +76,6 @@ public interface VirtualNetworkApplianceService {
7576
* @return
7677
*/
7778
Pair<Boolean, String> performRouterHealthChecks(long routerId);
79+
80+
<T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic);
7881
}

api/src/main/java/com/cloud/vm/VmDetailConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public interface VmDetailConstants {
2121
String CPU_CORE_PER_SOCKET = "cpu.corespersocket";
2222
String ROOT_DISK_SIZE = "rootdisksize";
2323
String BOOT_MODE = "boot.mode";
24+
String NAME_ON_HYPERVISOR= "nameonhypervisor";
2425

2526
// VMware specific
2627
String NIC_ADAPTER = "nicAdapter";

api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public String getDescription() {
5959
s_fsm.addTransition(Error, Event.ExpungeRequested, Expunging);
6060
s_fsm.addTransition(Expunging, Event.ExpungeRequested, Expunging);
6161
s_fsm.addTransition(Expunging, Event.OperationSucceeded, Removed);
62+
s_fsm.addTransition(Expunging, Event.OperationFailed, Error);
6263
}
6364
}
6465

api/src/main/java/org/apache/cloudstack/api/ApiServerService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@ public ResponseObject loginUser(HttpSession session, String username, String pas
4242
public String handleRequest(Map<String, Object[]> params, String responseType, StringBuilder auditTrailSb) throws ServerApiException;
4343

4444
public Class<?> getCmdClass(String cmdName);
45-
46-
public boolean isValidApiName(String apiName);
4745
}

api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class CreateRoleCmd extends RoleCmd {
4242
/////////////////////////////////////////////////////
4343

4444
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true,
45-
description = "creates a role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
45+
description = "Creates a role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty})
4646
private String roleName;
4747

4848
@Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class,

api/src/main/java/org/apache/cloudstack/api/command/admin/acl/ImportRoleCmd.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,6 @@ public List<Map<String, Object>> getRules() {
9494
if (Strings.isNullOrEmpty(rule)) {
9595
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Empty rule provided in rules param");
9696
}
97-
if (!rule.contains("*") && !_apiServer.isValidApiName(rule)) {
98-
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid api name: " + rule + " provided in rules param");
99-
}
10097
ruleDetails.put(ApiConstants.RULE, new Rule(rule));
10198

10299
String permission = detail.get(ApiConstants.PERMISSION);

api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListUsageRecordsCmd.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ public class ListUsageRecordsCmd extends BaseListCmd {
8585
@Parameter(name = ApiConstants.OLD_FORMAT, type = CommandType.BOOLEAN, description = "Flag to enable description rendered in old format which uses internal database IDs instead of UUIDs. False by default.")
8686
private Boolean oldFormat;
8787

88+
@Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN,
89+
description = "Specify if usage records should be fetched recursively per domain. If an account id is passed, records will be limited to that account.",
90+
since = "4.15")
91+
private Boolean recursive = false;
92+
8893
/////////////////////////////////////////////////////
8994
/////////////////// Accessors ///////////////////////
9095
/////////////////////////////////////////////////////
@@ -153,6 +158,10 @@ public boolean getOldFormat() {
153158
return oldFormat != null && oldFormat;
154159
}
155160

161+
public Boolean isRecursive() {
162+
return recursive;
163+
}
164+
156165
/////////////////////////////////////////////////////
157166
/////////////// API Implementation///////////////////
158167
/////////////////////////////////////////////////////

api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,10 +223,12 @@ public void execute() {
223223
response.setResponseName(getCommandName());
224224
setResponseObject(response);
225225
} else {
226-
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create snapshot due to an internal error creating snapshot for volume " + getVolumeUuid());
226+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Snapshot from volume [%s] was not found in database.", getVolumeUuid()));
227227
}
228228
} catch (Exception e) {
229-
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create snapshot due to an internal error creating snapshot for volume " + getVolumeUuid());
229+
String errorMessage = "Failed to create snapshot due to an internal error creating snapshot for volume " + getVolumeUuid();
230+
s_logger.error(errorMessage, e);
231+
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, errorMessage);
230232
}
231233
}
232234

0 commit comments

Comments
 (0)