/** * Limits user access ONLY to the virtual datacenters in the list. If the list is empty, user will * get access to all virtual datacenters. * * @param vdc List of virtual datacenters from the user's enterprise. */ public void setPermittedVirtualDatacenters(final List<VirtualDatacenter> vdcs) { List<Integer> ids = Lists.newArrayList(); for (VirtualDatacenter vdc : vdcs) { checkNotNull( vdc.getId(), ValidationErrors.MISSING_REQUIRED_FIELD + " id in " + VirtualDatacenter.class); ids.add(vdc.getId()); } setAvailableVirtualDatacenters(ids); }
/** Give access to all virtualdatacenters in the enterprise (requires update). */ public void permitAllVirtualDatacenters() { setAvailableVirtualDatacenters(null); }