mirror of https://github.com/apache/cloudstack.git
Added details about account/domain to which network will be assigned during creation (#7387)
This commit is contained in:
parent
5d5fa04c8b
commit
ec3698dfbe
|
|
@ -111,13 +111,14 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd {
|
|||
+ " - Account. Account means that only the account owner can use the network, domain - all accounts in the domain can use the network")
|
||||
private String aclType;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that will own the network")
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account that will own the network. Account should be under the selected domain")
|
||||
private String accountName;
|
||||
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the network")
|
||||
private Long projectId;
|
||||
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network")
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " +
|
||||
"If no account is provided then network will be assigned to the caller account and domain")
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name = ApiConstants.SUBDOMAIN_ACCESS,
|
||||
|
|
|
|||
|
|
@ -1402,6 +1402,7 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService, C
|
|||
if ((cmd.getAccountName() != null && domainId != null) || cmd.getProjectId() != null) {
|
||||
owner = _accountMgr.finalizeOwner(caller, cmd.getAccountName(), domainId, cmd.getProjectId());
|
||||
} else {
|
||||
s_logger.info(String.format("Assigning the network to caller:%s because either projectId or accountname and domainId are not provided", caller.getAccountName()));
|
||||
owner = caller;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue