use of com.emc.storageos.model.network.Fabrics in project coprhd-controller by CoprHD.
the class NetworkSystemService method getFabrics.
/**
* Returns a list of the VSAN or fabric names configured on this network system.
* Note: This is a synchronous call to the device and may take a while to receive a response.
*
* @param id the URN of a ViPR network system.
* @prereq none
* @brief List network system VSANs and fabrics
* @return A list of fabric names configured on the Network System.
* @throws InternalException
*/
@GET
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Path("/{id}/san-fabrics")
@CheckPermission(roles = { Role.SYSTEM_ADMIN, Role.SYSTEM_MONITOR })
public Fabrics getFabrics(@PathParam("id") URI id) throws InternalException {
Fabrics fabrics = new Fabrics();
ArgValidator.checkFieldUriType(id, NetworkSystem.class, "id");
NetworkSystem device = queryResource(id);
NetworkController controller = getNetworkController(device.getSystemType());
List<String> fabricIds = controller.getFabricIds(device.getId());
fabrics.setFabricIds(fabricIds);
return fabrics;
}
Aggregations