use of com.emc.storageos.model.network.NetworkSystemList in project coprhd-controller by CoprHD.
the class NetworkSystemService method getNetworkSystemList.
/**
* Returns list of all network systems. Each item in the list contains
* an id, name, and link.
*
* @prereq none
* @brief List network systems
* @return NetworkSystemList for each NetworkSystem, each containing an id, name, and link.
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public NetworkSystemList getNetworkSystemList() {
NetworkSystem system;
List<URI> ids;
ids = _dbClient.queryByType(NetworkSystem.class, true);
NetworkSystemList list = new NetworkSystemList();
for (URI id : ids) {
system = _dbClient.queryObject(NetworkSystem.class, id);
if (system != null) {
list.getSystems().add(toNamedRelatedResource(system));
}
}
return list;
}
Aggregations