ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 24114: Add Cluster Privilege Resource
Date Wed, 30 Jul 2014 21:35:03 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/24114/#review49169
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
<https://reviews.apache.org/r/24114/#comment86022>

    CascadeType.MERGE desired?  May not matter in this case.



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/24114/#comment86024>

    Database change requires UpgradeCatalog170 changes as well.



ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql
<https://reviews.apache.org/r/24114/#comment86025>

    upgrade changes


- Nate Cole


On July 30, 2014, 5:07 p.m., Tom Beerbower wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/24114/
> -----------------------------------------------------------
> 
> (Updated July 30, 2014, 5:07 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Nate Cole.
> 
> 
> Bugs: AMBARI-6679
>     https://issues.apache.org/jira/browse/AMBARI-6679
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Add a cluster privilege resource provider so that privileges may be assigned to cluster
instances.  See BUG-18967 for view instance privileges.
> TODO :
> #  Add resource_id column to clusters
> #  Add resource entity relationship to ClusterEntity
> #  Insert associated resource row in DB  when cluster is created.
> #  Update existing cluster rows in DB with associated resource relationship.
> #  Add cluster privilege service for API framework.
> #  Add cluster privilege resource provider.
> #  Adjust unit tests.
> 
> API:
> 
> To grant privileges to access the cluster we can create a privilege sub-resource for
the cluster instance.  The following API will grant CLUSTER.READ permission to the user 'bob'
for the cluster instance 'c1'.
> 
> {code}
> 
>     POST http://<server>/api/v1/clusters/c1
>    
>     [
>       {
>         "PrivilegeInfo" : {
>           "permission_name" : "CLUSTER.READ",
>           "principal_name" : "bob",
>           "principal_type" : "USER"
>         }
>       }
>     ]
> {code}
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ClusterResourceDefinition.java
644e8d2 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterPrivilegeService.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/ClusterService.java
b7da169 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java eb34a77

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProvider.java
PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/DefaultProviderModule.java
88e4296 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
d04345b 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ResourceDAO.java 99c3f92

>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ResourceTypeDAO.java a0373c6

>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterEntity.java
6fb9b5a 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ResourceEntity.java
7a8eab4 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ViewInstanceEntity.java
efb3815 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClustersImpl.java
f858264 
>   ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java 7b7d9a4

>   ambari-server/src/main/resources/Ambari-DDL-MySQL-CREATE.sql cf51a49 
>   ambari-server/src/main/resources/Ambari-DDL-Oracle-CREATE.sql c05affd 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-CREATE.sql 82335e3 
>   ambari-server/src/main/resources/Ambari-DDL-Postgres-EMBEDDED-CREATE.sql b5fcd94 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ClusterResourceDefinitionTest.java
6a48134 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/ClusterPrivilegeServiceTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProviderTest.java
PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProviderTest.java
33adbf8 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/OrmTestHelper.java f3a0b0f

>   ambari-server/src/test/java/org/apache/ambari/server/orm/TestOrmImpl.java 35ed02c 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ConfigGroupDAOTest.java
2dc1385 
>   ambari-server/src/test/java/org/apache/ambari/server/orm/dao/RequestScheduleDAOTest.java
50b4086 
>   ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog150Test.java
92e580b 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.2.3.sql 6c2c44d 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.2.4.sql 23001f1 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.2.5.sql 17a917e 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.4.0.sql a29578f 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.4.1.sql d60ba1f 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.4.2.sql 3c630c8 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.4.3.sql 7fbaebe 
>   ambari-server/src/test/resources/ddl-scripts/Ambari-DDL-Derby-1.4.4.sql 012f7be 
> 
> Diff: https://reviews.apache.org/r/24114/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> Added new unit tests.  All existing tests pass.
> 
> Results :
> 
> Tests run: 1850, Failures: 0, Errors: 0, Skipped: 13
> ...
> 
> INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 39:50.407s
> [INFO] Finished at: Wed Jul 30 17:05:51 EDT 2014
> [INFO] Final Memory: 30M/123M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Tom Beerbower
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message