mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 8704: listNetworks with account/domainId parameter - return account specific and shared networks
status 8704: resolved fixed
This commit is contained in:
parent
1dbd012fdc
commit
fdbdba7a78
@ -1746,13 +1746,20 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
|
||||
sc.addAnd("guestType", SearchCriteria.Op.EQ, type);
|
||||
}
|
||||
|
||||
if (!isSystem && (isShared == null || !isShared) && accountName != null && domainId != null) {
|
||||
sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
sc.addAnd("isShared", SearchCriteria.Op.EQ, false);
|
||||
}
|
||||
|
||||
if (isShared != null) {
|
||||
sc.addAnd("isShared", SearchCriteria.Op.EQ, isShared);
|
||||
if (!isSystem) {
|
||||
|
||||
if (accountName != null && domainId != null) {
|
||||
if (isShared == null) {
|
||||
sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
sc.addOr("isShared", SearchCriteria.Op.EQ, true);
|
||||
} else if (!isShared) {
|
||||
sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
|
||||
} else {
|
||||
sc.addAnd("isShared", SearchCriteria.Op.EQ, true);
|
||||
}
|
||||
} else if (isShared != null) {
|
||||
sc.addAnd("isShared", SearchCriteria.Op.EQ, isShared);
|
||||
}
|
||||
}
|
||||
|
||||
if (isDefault != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user