mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CS-6840: List all objects without require parameter
This commit is contained in:
parent
3995dc9cb1
commit
d9688f74ba
@ -37,7 +37,7 @@ public class ListVpnConnectionsCmd extends BaseListProjectAndAccountResourcesCmd
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="s2s_vpn_connection")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="id of the vpn connection")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="id of the vpn connection")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -37,7 +37,7 @@ public class ListVpnCustomerGatewaysCmd extends BaseListProjectAndAccountResourc
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="s2s_customer_gateway")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="id of the customer gateway")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="id of the customer gateway")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -37,7 +37,7 @@ public class ListVpnGatewaysCmd extends BaseListProjectAndAccountResourcesCmd {
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@IdentityMapper(entityTableName="s2s_vpn_gateway")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="id of the vpn gateway")
|
||||
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="id of the vpn gateway")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -306,6 +306,8 @@ public class Site2SiteVpnManagerImpl implements Site2SiteVpnService, Manager {
|
||||
List<Site2SiteCustomerGateway> results = new ArrayList<Site2SiteCustomerGateway>();
|
||||
if (id != null) {
|
||||
results.add(_customerGatewayDao.findById(cmd.getId()));
|
||||
} else {
|
||||
results.addAll(_customerGatewayDao.listAll());
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@ -316,6 +318,8 @@ public class Site2SiteVpnManagerImpl implements Site2SiteVpnService, Manager {
|
||||
List<Site2SiteVpnGateway> results = new ArrayList<Site2SiteVpnGateway>();
|
||||
if (id != null) {
|
||||
results.add(_vpnGatewayDao.findById(cmd.getId()));
|
||||
} else {
|
||||
results.addAll(_vpnGatewayDao.listAll());
|
||||
}
|
||||
return results;
|
||||
}
|
||||
@ -326,6 +330,8 @@ public class Site2SiteVpnManagerImpl implements Site2SiteVpnService, Manager {
|
||||
List<Site2SiteVpnConnection> results = new ArrayList<Site2SiteVpnConnection>();
|
||||
if (id != null) {
|
||||
results.add(_vpnConnectionDao.findById(cmd.getId()));
|
||||
} else {
|
||||
results.addAll(_vpnConnectionDao.listAll());
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user