You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by John Speidel <js...@hortonworks.com> on 2015/01/07 20:02:02 UTC

Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

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

Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.


Bugs: AMBARI-9028
    https://issues.apache.org/jira/browse/AMBARI-9028


Repository: ambari


Description
-------

Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
There will be at most 1 descriptor for both the stack and each stack service.
Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
Instead, a new "artifacts" endpoint is being introduced.
The kerberos descriptor will be an artifact instance.

See the associated Jira for more information.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
  ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
  ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
  ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
  ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
  ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 

Diff: https://reviews.apache.org/r/29664/diff/


Testing
-------

Manual Functional Testing:
  queried new resources including collection and instance resources, queries, partial response and bad requests

Unit Testing:
All Java unit tests pass
Results :

Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13

Many python test failures which seem unrelated to my patch.
I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.

Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
I have filed the following Jira to track this and ensure that the tests are written:
https://issues.apache.org/jira/browse/AMBARI-9026


Thanks,

John Speidel


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29664/#review67087
-----------------------------------------------------------

Ship it!


Ship It!

- Robert Levas


On Jan. 7, 2015, 2:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 2:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by John Speidel <js...@hortonworks.com>.

> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java, lines 346-356
> > <https://reviews.apache.org/r/29664/diff/1/?file=808789#file808789line346>
> >
> >     Would it be cleaner to use a SimpleResourceDefinition? ...
> >     
> >             resourceDefinition = new SimpleResourceDefinition(Resource.Type.StackArtifact, "artifact", "artifacts");

I originally had done that but then I realized that the resource definition needs to extend BaseStacksResourceDefinition which provides the "temporary" workaround for the stacks vs. stacks2 sub-resource names.


> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 58
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line58>
> >
> >     Could this be an AbstractResourceProvider?  Does it need access to the AmbariManagementController?

It uses the controller to get the AmbariMetaInfo instance.  I guess I could inject the meta info instance or get it some other way if we don't want new resource providers to extend AbstractControllerResourceProvider.  If you think that is best, I can make the necessary changes in another patch if that is ok.  Next time we talk, I would like to briefly discuss AbstractControllerResourceProvider vs. AbstractResourceProvider so that I know what your plans are in this area.


- John


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


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Tom Beerbower <tb...@hortonworks.com>.

> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java, lines 346-356
> > <https://reviews.apache.org/r/29664/diff/1/?file=808789#file808789line346>
> >
> >     Would it be cleaner to use a SimpleResourceDefinition? ...
> >     
> >             resourceDefinition = new SimpleResourceDefinition(Resource.Type.StackArtifact, "artifact", "artifacts");
> 
> John Speidel wrote:
>     I originally had done that but then I realized that the resource definition needs to extend BaseStacksResourceDefinition which provides the "temporary" workaround for the stacks vs. stacks2 sub-resource names.

I see.  No problem.


> On Jan. 7, 2015, 7:57 p.m., Tom Beerbower wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 58
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line58>
> >
> >     Could this be an AbstractResourceProvider?  Does it need access to the AmbariManagementController?
> 
> John Speidel wrote:
>     It uses the controller to get the AmbariMetaInfo instance.  I guess I could inject the meta info instance or get it some other way if we don't want new resource providers to extend AbstractControllerResourceProvider.  If you think that is best, I can make the necessary changes in another patch if that is ok.  Next time we talk, I would like to briefly discuss AbstractControllerResourceProvider vs. AbstractResourceProvider so that I know what your plans are in this area.

It's fine the way it is.  We are trying to get away from the AMC but if you have a legitimate use then no problem.


- Tom


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


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29664/#review67065
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
<https://reviews.apache.org/r/29664/#comment110891>

    Would it be cleaner to use a SimpleResourceDefinition? ...
    
            resourceDefinition = new SimpleResourceDefinition(Resource.Type.StackArtifact, "artifact", "artifacts");



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110893>

    Could this be an AbstractResourceProvider?  Does it need access to the AmbariManagementController?


- Tom Beerbower


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by John Speidel <js...@hortonworks.com>.

> On Jan. 7, 2015, 8:51 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, lines 58-62
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line58>
> >
> >     Seems like a good candidate to subclass ReadOnlyResourceProvider?

I had thought about it when first creating it but the class wasn't originally a AbstractResourceProvider not a AbstractControllerResourceProvider.  Then after I switched over to AbstractControllerResourceProvider I didn't utilize ReadOnlyResourceProvider as I didn't think of it then since I had already implemented the mutating methods.


- John


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


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29664/#review67083
-----------------------------------------------------------

Ship it!



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110910>

    Seems like a good candidate to subclass ReadOnlyResourceProvider?


- Nate Cole


On Jan. 7, 2015, 2:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 2:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Tom Beerbower <tb...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29664/#review67079
-----------------------------------------------------------

Ship it!


Ship It!

- Tom Beerbower


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Robert Levas <rl...@hortonworks.com>.

> On Jan. 7, 2015, 3:23 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 91
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line91>
> >
> >     It seems like this should be `private` especially since is it not an immutable set of string and there is a `protected` member method to get this data.
> 
> John Speidel wrote:
>     I absolutely agree that it should be private and it originally was but some existing unit tests broke because they needed access to these fields.
>     See ClusterControllerImplTest. These tests use a static test resource and since we don't have an instance of the actual resource provider, we can't use it's accessors. I realize that this is really ugly but drew a line on changing this mechanism and just followed along even though it did cause me some pain to make them public.
>     I could have copied the values but thought it more brittle to copy/paste the set.
>     The other resource providers that I looked at did the same thing, so I guess I just gave in.  Since I am not the only one that this bothers, and I am glad about this, I will make them private again and copy/paste the sets as appropriate for these tests or get the data another way.
>     
>     Would you be ok with me making this change in my next patch which is for the other artifact resource providers?

sure thing.


- Robert


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


On Jan. 7, 2015, 2:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 2:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by John Speidel <js...@hortonworks.com>.

> On Jan. 7, 2015, 8:23 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 91
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line91>
> >
> >     It seems like this should be `private` especially since is it not an immutable set of string and there is a `protected` member method to get this data.

I absolutely agree that it should be private and it originally was but some existing unit tests broke because they needed access to these fields.
See ClusterControllerImplTest. These tests use a static test resource and since we don't have an instance of the actual resource provider, we can't use it's accessors. I realize that this is really ugly but drew a line on changing this mechanism and just followed along even though it did cause me some pain to make them public.
I could have copied the values but thought it more brittle to copy/paste the set.
The other resource providers that I looked at did the same thing, so I guess I just gave in.  Since I am not the only one that this bothers, and I am glad about this, I will make them private again and copy/paste the sets as appropriate for these tests or get the data another way.

Would you be ok with me making this change in my next patch which is for the other artifact resource providers?


> On Jan. 7, 2015, 8:23 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 96
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line96>
> >
> >     It seems like this should be `private` especially since is it not an immutable map.
> >     
> >     If the set of key property ids are needed, they can be retrieved using `org.apache.ambari.server.controller.internal.AbstractResourceProvider#getKeyPropertyIds`

see above comment for pkPropertyIds (line 91)


> On Jan. 7, 2015, 8:23 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 102
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line102>
> >
> >     It seems like this should be `private` especially since is it not an immutable set of strings.  
> >     
> >     If the set of property ids are needed, they can be retrieved using `org.apache.ambari.server.controller.internal.BaseProvider#getPropertyIds`

see above comment for pkPropertyIds (line 91)


> On Jan. 7, 2015, 8:23 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java, line 196
> > <https://reviews.apache.org/r/29664/diff/1/?file=808794#file808794line196>
> >
> >     Get all stack and stack service **Kerberos** descriptor resources?

thanks


- John


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


On Jan. 7, 2015, 7:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 7:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>


Re: Review Request 29664: Create new API endpoints to obtain the stack and stack service kerberos descriptors

Posted by Robert Levas <rl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/29664/#review67071
-----------------------------------------------------------



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110900>

    It seems like this should be `private` especially since is it not an immutable set of string and there is a `protected` member method to get this data.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110896>

    It seems like this should be `private` especially since is it not an immutable map.
    
    If the set of key property ids are needed, they can be retrieved using `org.apache.ambari.server.controller.internal.AbstractResourceProvider#getKeyPropertyIds`



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110897>

    It seems like this should be `private` especially since is it not an immutable set of strings.  
    
    If the set of property ids are needed, they can be retrieved using `org.apache.ambari.server.controller.internal.BaseProvider#getPropertyIds`



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
<https://reviews.apache.org/r/29664/#comment110903>

    Get all stack and stack service **Kerberos** descriptor resources?


- Robert Levas


On Jan. 7, 2015, 2:02 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/29664/
> -----------------------------------------------------------
> 
> (Updated Jan. 7, 2015, 2:02 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Robert Levas, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-9028
>     https://issues.apache.org/jira/browse/AMBARI-9028
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Create new API endpoints for exposing stack and stack service kerberos descriptors. These endpoints will provide the static descriptors which are defined in the stack definition and will be immutable.
> There will be at most 1 descriptor for both the stack and each stack service.
> Therefore, it doesn't make sense to add a kerberos_descriptor sub-resource since there will be at most one instance.
> Instead, a new "artifacts" endpoint is being introduced.
> The kerberos descriptor will be an artifact instance.
> 
> See the associated Jira for more information.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java e55b2cb 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinition.java cb1dfb1 
>   ambari-server/src/main/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinition.java e8d4bd5 
>   ambari-server/src/main/java/org/apache/ambari/server/api/services/StacksService.java cdadfd9 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProvider.java 11b0411 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/spi/Resource.java 89d6837 
>   ambari-server/src/test/java/org/apache/ambari/server/api/query/QueryImplTest.java 57aea49 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImplTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackServiceResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/resources/StackVersionResourceDefinitionTest.java PRE-CREATION 
>   ambari-server/src/test/java/org/apache/ambari/server/api/services/StacksServiceTest.java 212eaa0 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/AbstractControllerResourceProviderTest.java 5414b52 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterControllerImplTest.java 3ef0ade 
> 
> Diff: https://reviews.apache.org/r/29664/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Testing:
>   queried new resources including collection and instance resources, queries, partial response and bad requests
> 
> Unit Testing:
> All Java unit tests pass
> Results :
> 
> Tests run: 2492, Failures: 0, Errors: 0, Skipped: 13
> 
> Many python test failures which seem unrelated to my patch.
> I have sent an email to dev@ambari to determine if these are known issues or if I need to investigate.
> 
> Also, no unit test was written for the new StackArtifactResourceProvider due to time constraints.
> I have filed the following Jira to track this and ensure that the tests are written:
> https://issues.apache.org/jira/browse/AMBARI-9026
> 
> 
> Thanks,
> 
> John Speidel
> 
>