mirror of https://github.com/apache/cloudstack.git
VPC: CS-15812 - fixed listVPCs by projectId
This commit is contained in:
parent
1a212b3b05
commit
0b2b021f18
|
|
@ -137,7 +137,7 @@ public class ListVPCsCmd extends BaseListTaggedResourcesCmd{
|
|||
List<? extends Vpc> vpcs = _vpcService.listVpcs(getId(), getVpcName(), getDisplayText(),
|
||||
getSupportedServices(), getCidr(), getVpcOffId(), getState(), getAccountName(), getDomainId(),
|
||||
this.getKeyword(), this.getStartIndex(), this.getPageSizeVal(), getZoneId(), this.isRecursive(),
|
||||
this.listAll(), getRestartRequired(), getTags());
|
||||
this.listAll(), getRestartRequired(), getTags(), getProjectId());
|
||||
ListResponse<VpcResponse> response = new ListResponse<VpcResponse>();
|
||||
List<VpcResponse> offeringResponses = new ArrayList<VpcResponse>();
|
||||
for (Vpc vpc : vpcs) {
|
||||
|
|
|
|||
|
|
@ -113,13 +113,14 @@ public interface VpcService {
|
|||
* @param listAll TODO
|
||||
* @param restartRequired TODO
|
||||
* @param tags TODO
|
||||
* @param projectId TODO
|
||||
* @param vpc
|
||||
* @return
|
||||
*/
|
||||
public List<? extends Vpc> listVpcs(Long id, String vpcName, String displayText,
|
||||
List<String> supportedServicesStr, String cidr, Long vpcOffId, String state, String accountName, Long domainId,
|
||||
String keyword, Long startIndex, Long pageSizeVal, Long zoneId, Boolean isRecursive, Boolean listAll,
|
||||
Boolean restartRequired, Map<String, String> tags);
|
||||
Boolean restartRequired, Map<String, String> tags, Long projectId);
|
||||
|
||||
/**
|
||||
* @param vpcId
|
||||
|
|
|
|||
|
|
@ -714,13 +714,13 @@ public class VpcManagerImpl implements VpcManager, Manager{
|
|||
@Override
|
||||
public List<? extends Vpc> listVpcs(Long id, String vpcName, String displayText, List<String> supportedServicesStr,
|
||||
String cidr, Long vpcOffId, String state, String accountName, Long domainId, String keyword,
|
||||
Long startIndex, Long pageSizeVal, Long zoneId, Boolean isRecursive, Boolean listAll, Boolean restartRequired, Map<String, String> tags) {
|
||||
Long startIndex, Long pageSizeVal, Long zoneId, Boolean isRecursive, Boolean listAll, Boolean restartRequired, Map<String, String> tags, Long projectId) {
|
||||
Account caller = UserContext.current().getCaller();
|
||||
List<Long> permittedAccounts = new ArrayList<Long>();
|
||||
|
||||
Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean,
|
||||
ListProjectResourcesCriteria>(domainId, isRecursive, null);
|
||||
_accountMgr.buildACLSearchParameters(caller, id, accountName, null, permittedAccounts, domainIdRecursiveListProject,
|
||||
_accountMgr.buildACLSearchParameters(caller, id, accountName, projectId, permittedAccounts, domainIdRecursiveListProject,
|
||||
listAll, false);
|
||||
domainId = domainIdRecursiveListProject.first();
|
||||
isRecursive = domainIdRecursiveListProject.second();
|
||||
|
|
|
|||
Loading…
Reference in New Issue