Search in sources :

Example 1 with OpenStackTenantListParam

use of com.emc.storageos.model.keystone.OpenStackTenantListParam in project coprhd-controller by CoprHD.

the class LDAPsources method addTenants.

public static void addTenants(String ldadSourceId, @As(",") String[] ids) {
    List<OpenStackTenantParam> tenants = OpenStackTenantsUtils.getOpenStackTenants();
    if (ids != null) {
        List<String> idList = Arrays.asList(ids);
        for (OpenStackTenantParam tenant : tenants) {
            if (!idList.contains(tenant.getOsId())) {
                tenant.setExcluded(true);
            }
        }
    }
    OpenStackTenantListParam params = new OpenStackTenantListParam();
    params.setOpenstackTenants(tenants);
    OpenStackTenantsUtils.addOpenStackTenants(params);
    flash.success(MessagesUtils.get(SAVED, authProviderName));
    list();
}
Also used : OpenStackTenantParam(com.emc.storageos.model.keystone.OpenStackTenantParam) OpenStackTenantListParam(com.emc.storageos.model.keystone.OpenStackTenantListParam)

Aggregations

OpenStackTenantListParam (com.emc.storageos.model.keystone.OpenStackTenantListParam)1 OpenStackTenantParam (com.emc.storageos.model.keystone.OpenStackTenantParam)1