ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [03/10] git commit: AMBARI-7649 - Admin : Clean up controllers/ldap API
Date Mon, 06 Oct 2014 20:27:34 GMT
AMBARI-7649 - Admin : Clean up controllers/ldap API


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/1b06b935
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/1b06b935
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/1b06b935

Branch: refs/heads/branch-alerts-dev
Commit: 1b06b93506beb732a6f1380e457f1d1aa1ee2595
Parents: 0e869ff
Author: tbeerbower <tbeerbower@hortonworks.com>
Authored: Mon Oct 6 13:06:36 2014 -0400
Committer: tbeerbower <tbeerbower@hortonworks.com>
Committed: Mon Oct 6 13:07:00 2014 -0400

----------------------------------------------------------------------
 .../resources/ControllerResourceDefinition.java |  60 ----
 .../resources/ResourceInstanceFactoryImpl.java  |   6 -
 .../server/api/services/ControllerService.java  |  98 -------
 .../AbstractControllerResourceProvider.java     |   2 -
 .../internal/ControllerResourceProvider.java    | 282 -------------------
 .../controller/internal/ControllerType.java     |  65 -----
 .../ambari/server/controller/spi/Resource.java  |   2 -
 .../src/main/resources/key_properties.json      |   3 -
 .../src/main/resources/properties.json          |   9 -
 9 files changed, 527 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java
deleted file mode 100644
index 55e6502..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ControllerResourceDefinition.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.api.resources;
-
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.ambari.server.controller.internal.ControllerType;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- * Controller Resource Definition
- */
-public class ControllerResourceDefinition extends BaseResourceDefinition {
-
-  private final ControllerType type;
-
-  public ControllerResourceDefinition(ControllerType type) {
-    super(Resource.Type.Controller);
-    this.type = type;
-  }
-
-  @Override
-  public String getPluralName() {
-    return "controllers";
-  }
-
-  @Override
-  public String getSingularName() {
-    return "controller";
-  }
-
-  @Override
-  public Set<SubResourceDefinition> getSubResourceDefinitions() {
-    final Set<SubResourceDefinition> subResourceDefinitions = new HashSet<SubResourceDefinition>();
-    if (type != null) {
-      switch (type) {
-      case LDAP:
-        break;
-      }
-    }
-    return subResourceDefinitions;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index 2676fd3..5bd3710 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -24,7 +24,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ambari.server.api.query.QueryImpl;
-import org.apache.ambari.server.controller.internal.ControllerType;
 import org.apache.ambari.server.controller.spi.Resource;
 import org.apache.ambari.server.controller.utilities.ClusterControllerHelper;
 import org.apache.ambari.server.view.ViewRegistry;
@@ -271,11 +270,6 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory
{
         resourceDefinition = new ViewPermissionResourceDefinition();
         break;
 
-      case Controller:
-        resourceDefinition = new ControllerResourceDefinition(
-            ControllerType.getByName(mapIds.get(Resource.Type.Controller)));
-        break;
-
       case ClientConfig:
         resourceDefinition = new ClientConfigResourceDefinition();
         break;

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/api/services/ControllerService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ControllerService.java
b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ControllerService.java
deleted file mode 100644
index 6d20a93..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ControllerService.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ambari.server.api.services;
-
-import java.util.Collections;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.HttpHeaders;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.UriInfo;
-
-import org.apache.ambari.server.api.resources.ResourceInstance;
-import org.apache.ambari.server.controller.spi.Resource;
-
-/**
- * Service responsible for controllers.
- */
-@Path("/controllers/")
-public class ControllerService extends BaseService {
-  /**
-   * Handles: GET  /controllers
-   * Get all controllers.
-   *
-   * @param headers http headers
-   * @param ui      uri info
-   * @return controller collection resource representation
-   */
-  @GET
-  @Produces("text/plain")
-  public Response getControllers(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createControllerResource(null));
-  }
-
-  /**
-   * Handles: GET  /controllers/{controllerName}
-   * Get single controller.
-   *
-   * @param headers http headers
-   * @param ui      uri info
-   * @return controller resource representation
-   */
-  @GET
-  @Path("{controllerName}")
-  @Produces("text/plain")
-  public Response getController(@Context HttpHeaders headers, @Context UriInfo ui,
-      @PathParam("controllerName") String controllerName) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createControllerResource(controllerName));
-  }
-
-  /**
-   * Handles: PUT  /controllers/{controllerName}
-   * Update data of a single controller.
-   *
-   * @param headers http headers
-   * @param ui      uri info
-   * @return controller resource representation
-   */
-  @PUT
-  @Path("{controllerName}")
-  @Produces("text/plain")
-  public Response updateController(String body, @Context HttpHeaders headers, @Context UriInfo
ui,
-      @PathParam("controllerName") String controllerName) {
-    return handleRequest(headers, body, ui, Request.Type.PUT, createControllerResource(controllerName));
-  }
-
-  /**
-   * Create a controller resource instance.
-   *
-   * @param controllerName controller name
-   *
-   * @return a cluster resource instance
-   */
-  ResourceInstance createControllerResource(String controllerName) {
-    return createResource(Resource.Type.Controller,
-        Collections.singletonMap(Resource.Type.Controller, controllerName));
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
index 2fa38c5..17df861 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java
@@ -151,8 +151,6 @@ public abstract class AbstractControllerResourceProvider extends AbstractResourc
         return new ValidationResourceProvider(propertyIds, keyPropertyIds, managementController);
       case AlertDefinition:
         return new AlertDefinitionResourceProvider(propertyIds, keyPropertyIds, managementController);
-      case Controller:
-        return new ControllerResourceProvider(propertyIds, keyPropertyIds, managementController);
       case ClientConfig:
         return new ClientConfigResourceProvider(propertyIds, keyPropertyIds, managementController);
       default:

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerResourceProvider.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerResourceProvider.java
deleted file mode 100644
index afb9ae9..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerResourceProvider.java
+++ /dev/null
@@ -1,282 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.controller.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.ambari.server.AmbariException;
-import org.apache.ambari.server.controller.AmbariManagementController;
-import org.apache.ambari.server.controller.ControllerRequest;
-import org.apache.ambari.server.controller.ControllerResponse;
-import org.apache.ambari.server.controller.LdapSyncRequest;
-import org.apache.ambari.server.controller.spi.NoSuchParentResourceException;
-import org.apache.ambari.server.controller.spi.NoSuchResourceException;
-import org.apache.ambari.server.controller.spi.Predicate;
-import org.apache.ambari.server.controller.spi.Request;
-import org.apache.ambari.server.controller.spi.RequestStatus;
-import org.apache.ambari.server.controller.spi.Resource;
-import org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException;
-import org.apache.ambari.server.controller.spi.SystemException;
-import org.apache.ambari.server.controller.spi.UnsupportedPropertyException;
-import org.apache.ambari.server.controller.utilities.PropertyHelper;
-import org.apache.ambari.server.orm.entities.LdapSyncSpecEntity;
-import org.apache.ambari.server.security.ldap.LdapBatchDto;
-import org.apache.ambari.server.security.ldap.LdapGroupDto;
-import org.apache.ambari.server.security.ldap.LdapSyncDto;
-import org.apache.ambari.server.security.ldap.LdapUserDto;
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Resource provider for controller resource.
- */
-class ControllerResourceProvider extends AbstractControllerResourceProvider {
-
-  // ----- Property ID constants ---------------------------------------------
-
-  protected static final String CONTROLLER_NAME_PROPERTY_ID               = PropertyHelper.getPropertyId("Controllers",
"name");
-  protected static final String CONTROLLER_LDAP_CONFIGURED_PROPERTY_ID    = PropertyHelper.getPropertyId("LDAP",
"configured");
-  protected static final String CONTROLLER_LDAP_USERS_PROPERTY_ID         = PropertyHelper.getPropertyId("LDAP",
"users");
-  protected static final String CONTROLLER_LDAP_GROUPS_PROPERTY_ID        = PropertyHelper.getPropertyId("LDAP",
"groups");
-  protected static final String CONTROLLER_LDAP_SYNCED_USERS_PROPERTY_ID  = PropertyHelper.getPropertyId("LDAP",
"synced_users");
-  protected static final String CONTROLLER_LDAP_SYNCED_GROUPS_PROPERTY_ID = PropertyHelper.getPropertyId("LDAP",
"synced_groups");
-
-  protected static final String ALL_ENTRIES = "*";
-
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { CONTROLLER_NAME_PROPERTY_ID }));
-
-  private static Map<String, ControllerResponse> controllers = new HashMap<String,
ControllerResponse>() {
-    {
-      for (ControllerType type: ControllerType.values()) {
-        put(type.getName(), new ControllerResponse(type.getName()));
-      }
-    }
-  };
-
-  /**
-   * Create a new resource provider for the given management controller.
-   *
-   * @param propertyIds           the property ids
-   * @param keyPropertyIds        the key property ids
-   * @param managementController  the management controller
-   */
-  ControllerResourceProvider(Set<String> propertyIds,
-                       Map<Resource.Type, String> keyPropertyIds,
-                       AmbariManagementController managementController) {
-    super(propertyIds, keyPropertyIds, managementController);
-  }
-
-  @Override
-  public RequestStatus createResources(Request request)
-      throws SystemException,
-      UnsupportedPropertyException,
-      ResourceAlreadyExistsException,
-      NoSuchParentResourceException {
-    // controllers can't be dynamically created
-    return getRequestStatus(null);
-  }
-
-  @Override
-  public Set<Resource> getResources(Request request, Predicate predicate)
-      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
{
-
-    final Set<ControllerRequest> requests = new HashSet<ControllerRequest>();
-
-    if (predicate == null) {
-      requests.add(getRequest(null));
-    } else {
-      for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
-        requests.add(getRequest(propertyMap));
-      }
-    }
-
-    Set<ControllerResponse> responses = getResources(new Command<Set<ControllerResponse>>()
{
-      @Override
-      public Set<ControllerResponse> invoke() throws AmbariException {
-        final Set<ControllerResponse> responses = new HashSet<ControllerResponse>();
-        for (ControllerRequest request: requests) {
-          if (request.getName() == null) {
-            responses.addAll(controllers.values());
-          } else {
-            if (controllers.containsKey(request.getName())) {
-              responses.add(controllers.get(request.getName()));
-            }
-          }
-        }
-        return responses;
-      }
-    });
-
-    Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
-    Set<Resource> resources    = new HashSet<Resource>();
-
-    for (ControllerResponse controllerResponse : responses) {
-      ResourceImpl resource = new ResourceImpl(Resource.Type.Controller);
-
-      setResourceProperty(resource, CONTROLLER_NAME_PROPERTY_ID,
-          controllerResponse.getName(), requestedIds);
-
-      switch (ControllerType.getByName(controllerResponse.getName())) {
-      case LDAP:
-        final boolean ldapConfigured = getManagementController().checkLdapConfigured();
-        setResourceProperty(resource, CONTROLLER_LDAP_CONFIGURED_PROPERTY_ID,
-            ldapConfigured, requestedIds);
-        if (ldapConfigured) {
-          try {
-            final LdapSyncDto syncInfo = getManagementController().getLdapSyncInfo();
-
-            final List<String> allUsers = new ArrayList<String>();
-            final List<String> syncedUsers = new ArrayList<String>();
-            for (LdapUserDto user : syncInfo.getUsers()) {
-              allUsers.add(user.getUserName());
-              if (user.isSynced()) {
-                syncedUsers.add(user.getUserName());
-              }
-            }
-            setResourceProperty(resource, CONTROLLER_LDAP_USERS_PROPERTY_ID,
-                allUsers, requestedIds);
-            setResourceProperty(resource, CONTROLLER_LDAP_SYNCED_USERS_PROPERTY_ID,
-                syncedUsers, requestedIds);
-            final List<String> allGroups = new ArrayList<String>();
-            final List<String> syncedGroups = new ArrayList<String>();
-            for (LdapGroupDto group : syncInfo.getGroups()) {
-              allGroups.add(group.getGroupName());
-              if (group.isSynced()) {
-                syncedGroups.add(group.getGroupName());
-              }
-            }
-            setResourceProperty(resource, CONTROLLER_LDAP_GROUPS_PROPERTY_ID,
-                allGroups, requestedIds);
-            setResourceProperty(resource, CONTROLLER_LDAP_SYNCED_GROUPS_PROPERTY_ID,
-                syncedGroups, requestedIds);
-          } catch (AmbariException ex) {
-            throw new SystemException("Can't retrieve data from external LDAP server", ex);
-          }
-        }
-        break;
-      }
-
-      resources.add(resource);
-    }
-
-    return resources;
-  }
-
-  @Override
-  public RequestStatus updateResources(Request request, Predicate predicate)
-    throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
{
-
-    final Set<ControllerRequest> requests = new HashSet<ControllerRequest>();
-
-    for (Map<String, Object> propertyMap : getPropertyMaps(request.getProperties().iterator().next(),
predicate)) {
-      final ControllerRequest req = getRequest(propertyMap);
-      requests.add(req);
-    }
-
-    // one request per each controller
-    Set<Resource> resources = new HashSet<Resource>();
-    for (final ControllerRequest controllerRequest: requests) {
-      Resource resource = modifyResources(new Command<Resource>() {
-        @Override
-        public Resource invoke() throws AmbariException {
-          Resource resource = null;
-          switch (ControllerType.getByName(controllerRequest.getName())) {
-          case LDAP:
-            resource = new ResourceImpl(Resource.Type.Controller);
-            Set<String> users = null;
-            if (controllerRequest.getPropertyMap().containsKey(CONTROLLER_LDAP_SYNCED_USERS_PROPERTY_ID))
{
-              final String userCsv = (String) controllerRequest.getPropertyMap().get(CONTROLLER_LDAP_SYNCED_USERS_PROPERTY_ID);
-              if (!userCsv.trim().equals(ALL_ENTRIES)) {
-                users = new HashSet<String>();
-                for (String user: userCsv.split(",")) {
-                  if (StringUtils.isNotEmpty(user)) {
-                    users.add(user.toLowerCase());
-                  }
-                }
-              }
-            }
-            Set<String> groups = null;
-            if (controllerRequest.getPropertyMap().containsKey(CONTROLLER_LDAP_SYNCED_GROUPS_PROPERTY_ID))
{
-              final String groupCsv = (String) controllerRequest.getPropertyMap().get(CONTROLLER_LDAP_SYNCED_GROUPS_PROPERTY_ID);
-              if (!groupCsv.trim().equals(ALL_ENTRIES)) {
-                groups = new HashSet<String>();
-                for (String group : groupCsv.split(",")) {
-                  if (StringUtils.isNotEmpty(group)) {
-                    groups.add(group.toLowerCase());
-                  }
-                }
-              }
-            }
-            if (!getManagementController().isLdapSyncInProgress()) {
-
-              LdapSyncRequest userRequest = users == null ? new LdapSyncRequest(LdapSyncSpecEntity.SyncType.ALL)
:
-                  new LdapSyncRequest(LdapSyncSpecEntity.SyncType.SPECIFIC, users);
-
-              LdapSyncRequest groupRequest = groups == null ? new LdapSyncRequest(LdapSyncSpecEntity.SyncType.ALL)
:
-                  new LdapSyncRequest(LdapSyncSpecEntity.SyncType.SPECIFIC, groups);
-
-              LdapBatchDto syncInfo = getManagementController().synchronizeLdapUsersAndGroups(userRequest,
groupRequest);
-              resource.setProperty("Sync/status", "successful");
-              resource.setProperty("Sync/summary/Users/created", syncInfo.getUsersToBeCreated().size());
-              resource.setProperty("Sync/summary/Users/updated", syncInfo.getUsersToBecomeLdap().size());
-              resource.setProperty("Sync/summary/Users/removed", syncInfo.getUsersToBeRemoved().size());
-              resource.setProperty("Sync/summary/Groups/created", syncInfo.getGroupsToBeCreated().size());
-              resource.setProperty("Sync/summary/Groups/updated", syncInfo.getGroupsToBecomeLdap().size());
-              resource.setProperty("Sync/summary/Groups/removed", syncInfo.getGroupsToBeRemoved().size());
-              resource.setProperty("Sync/summary/Memberships/created", syncInfo.getMembershipToAdd().size());
-              resource.setProperty("Sync/summary/Memberships/removed", syncInfo.getMembershipToRemove().size());
-            } else {
-              resource.setProperty("Sync/status", "not started");
-              resource.setProperty("Sync/summary", "Another sync is already running");
-            }
-            break;
-          }
-          return resource;
-        }
-      });
-      resources.add(resource);
-    }
-
-    return getRequestStatus(null, resources);
-  }
-
-  @Override
-  public RequestStatus deleteResources(Predicate predicate)
-      throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException
{
-    // controllers can't be removed
-    return getRequestStatus(null);
-  }
-
-  @Override
-  protected Set<String> getPKPropertyIds() {
-    return pkPropertyIds;
-  }
-
-  private ControllerRequest getRequest(Map<String, Object> properties) {
-    if (properties == null) {
-      return new ControllerRequest(null, properties);
-    }
-    return new ControllerRequest((String) properties.get(CONTROLLER_NAME_PROPERTY_ID), properties);
-  }
-}

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerType.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerType.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerType.java
deleted file mode 100644
index 82b6eac..0000000
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ControllerType.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.ambari.server.controller.internal;
-
-import org.apache.commons.lang.StringUtils;
-
-/**
- * Enumeration of internal controllers used via API.
- */
-public enum ControllerType {
-  LDAP("ldap");
-
-  /**
-   * Controller name.
-   */
-  private String name;
-
-  /**
-   * Constructor.
-   *
-   * @param name controller name
-   */
-  private ControllerType(String name) {
-    this.name = name;
-  }
-
-  /**
-   * Getter.
-   *
-   * @return controller name
-   */
-  public String getName() {
-    return name;
-  }
-
-  /**
-   * Returns corresponding controller type to given name.
-   *
-   * @param name controller name
-   * @return null if controller type was not found
-   */
-  public static ControllerType getByName(String name) {
-    for (ControllerType type : ControllerType.values()) {
-      if (StringUtils.equals(type.getName(), name)) {
-        return type;
-      }
-    }
-    return null;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
index 6cf34ca..f4dacea 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java
@@ -119,7 +119,6 @@ public interface Resource {
     ClusterPrivilege,
     ViewPrivilege,
     ViewPermission,
-    Controller,
     ClientConfig,
     StackLevelConfiguration,
     LdapSyncEvent;
@@ -202,7 +201,6 @@ public interface Resource {
     public static final Type ClusterPrivilege = InternalType.ClusterPrivilege.getType();
     public static final Type ViewPrivilege = InternalType.ViewPrivilege.getType();
     public static final Type ViewPermission = InternalType.ViewPermission.getType();
-    public static final Type Controller = InternalType.Controller.getType();
     public static final Type ClientConfig = InternalType.ClientConfig.getType();
     public static final Type StackLevelConfiguration = InternalType.StackLevelConfiguration.getType();
     public static final Type LdapSyncEvent = InternalType.LdapSyncEvent.getType();

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/resources/key_properties.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/key_properties.json b/ambari-server/src/main/resources/key_properties.json
index ef698c5..b4dfbf7 100644
--- a/ambari-server/src/main/resources/key_properties.json
+++ b/ambari-server/src/main/resources/key_properties.json
@@ -149,9 +149,6 @@
     "Cluster": "AlertDefinition/cluster_name",
     "AlertDefinition": "AlertDefinition/id"
   },
-  "Controller": {
-    "Controller": "Controllers/name"
-  },
   "ClientConfig": {
     "Cluster": "ServiceComponentInfo/cluster_name",
     "Service": "ServiceComponentInfo/service_name",

http://git-wip-us.apache.org/repos/asf/ambari/blob/1b06b935/ambari-server/src/main/resources/properties.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/properties.json b/ambari-server/src/main/resources/properties.json
index b99ede5..bff0c94 100644
--- a/ambari-server/src/main/resources/properties.json
+++ b/ambari-server/src/main/resources/properties.json
@@ -433,15 +433,6 @@
       "AlertDefinition/scope",
       "AlertDefinition/source"
     ],      
-    "Controller":[
-        "Controllers/name",
-        "LDAP/configured",
-        "LDAP/users",
-        "LDAP/groups",
-        "LDAP/synced_users",
-        "LDAP/synced_groups",
-        "_"
-    ],
     "ClientConfig":[
         "ServiceComponentInfo/service_name",
         "ServiceComponentInfo/component_name",


Mime
View raw message