public static void itemDetails(String id) { VcenterRestRep vcenter = VCenterUtils.getVCenter(uri(id)); List<VcenterDataCenterRestRep> dataCenters = VCenterUtils.getDataCentersInVCenter( vcenter, TenantUtils.getTenantFilter(Models.currentAdminTenantForVcenter())); render(vcenter, dataCenters); }
public static void listJson() { URI tenantId = TenantUtils.getTenantFilter(Models.currentAdminTenantForVcenter()); List<VcenterRestRep> vcenters = VCenterUtils.getVCenters(tenantId); List<VCenterInfo> vcenterInfos = Lists.newArrayList(); for (VcenterRestRep vcenter : vcenters) { vcenterInfos.add(new VCenterInfo(vcenter)); } renderJSON(DataTablesSupport.createJSON(vcenterInfos, params)); }
protected Task<VcenterRestRep> createVCenter(boolean validateConnection) { VcenterCreateParam vcenterCreateParam = new VcenterCreateParam(); doWriteTo(vcenterCreateParam); if (Security.isSystemAdmin()) { return VCenterUtils.createVCenter( vcenterCreateParam, validateConnection, getAclAssignmentChanges()); } return VCenterUtils.createVCenter( TenantUtils.getTenantFilter(Models.currentAdminTenantForVcenter()), vcenterCreateParam, validateConnection); }