return vmResponse;
}
@Override
public PhysicalNetworkResponse createPhysicalNetworkResponse(PhysicalNetwork result) {
PhysicalNetworkResponse response = new PhysicalNetworkResponse();
DataCenter zone = ApiDBUtils.findZoneById(result.getDataCenterId());
if (zone != null) {
response.setZoneId(zone.getUuid());
}
response.setNetworkSpeed(result.getSpeed());
response.setVlan(result.getVnetString());
if (result.getDomainId() != null) {
Domain domain = ApiDBUtils.findDomainById(result.getDomainId());
if (domain != null) {
response.setDomainId(domain.getUuid());
}
}
response.setId(result.getUuid());
if (result.getBroadcastDomainRange() != null) {
response.setBroadcastDomainRange(result.getBroadcastDomainRange().toString());
}
response.setIsolationMethods(result.getIsolationMethods());
response.setTags(result.getTags());
if (result.getState() != null) {
response.setState(result.getState().toString());
}
response.setName(result.getName());
response.setObjectName("physicalnetwork");
return response;
}