> On Sept. 14, 2017, 8:40 a.m., Jonathan Hurley wrote:
> > That's a lot of validation! I'm curious though - did you happen to look at 
> > something like http://json-schema.org/ instead of doing it explicitely in 
> > each descriptor class?
> 
> Laszlo Puskas wrote:
>     +1
> 
> Robert Levas wrote:
>     I tried to do this with a JSON schema validtor, but I was not sure what 
> validator would be appropriate - liscense, schema version, etc...  Also, 
> testing with com.networknt:json-schema-validator:0.1.7 led to dependency 
> conflicts. Do you have a suggestion for a validator implemention?
> 
> Jonathan Hurley wrote:
>     I'm an XML-fanboy, so I've never used them either. But I was curious if 
> you had looked into it. You put a lot of code into this and I don't think the 
> commit should be held up. But it might be worth investigation for future 
> changes to the JSON...

@jhurley, you insprired me to look more into this.  JSON schema is really ugly 
and failed to provide some of the validation that I would like to do. Namely 
ensuring the list of objects contain objects with a unique name for the scope.  
This seems like something that would be provided, but is not.  Maybe I can 
ignore this dificency and do a one off check for this.


- Robert


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


On Sept. 13, 2017, 3:52 p.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/62290/
> -----------------------------------------------------------
> 
> (Updated Sept. 13, 2017, 3:52 p.m.)
> 
> 
> Review request for Ambari, Attila Magyar, Balázs Bence Sári, Eugene 
> Chekanskiy, Jonathan Hurley, Laszlo Puskas, Mugdha Varadkar, and Sebastian 
> Toader.
> 
> 
> Bugs: AMBARI-21938
>     https://issues.apache.org/jira/browse/AMBARI-21938
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Validate kerberos.json files to ensure they meet the expected schema.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java
>  0d1da9c743 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptorContainer.java
>  5658133c9b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptor.java
>  768a17e3b3 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptor.java
>  7930e38f39 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosDescriptor.java
>  0eb3733584 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptor.java
>  911723b80b 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptor.java
>  a17caadda0 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptor.java
>  74254e3fe3 
>   
> ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptor.java
>  5da33997ab 
>   ambari-server/src/main/resources/stacks/HDP/2.6/kerberos_preconfigure.json 
> c9d8c91372 
>   
> ambari-server/src/test/java/org/apache/ambari/server/stack/KerberosDescriptorTest.java
>  0f1dd55044 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java
>  09699c6fd6 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java
>  e891fdea4e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
>  7fb56248e5 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java
>  d11962b9a3 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java
>  8cdb39e02e 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java
>  b84223f421 
>   
> ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
>  e4d3c90767 
> 
> 
> Diff: https://reviews.apache.org/r/62290/diff/2/
> 
> 
> Testing
> -------
> 
> Ensured the following unit tests passed:
> 
> - org.apache.ambari.server.stack.KerberosDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosComponentDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosConfigurationDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosIdentityDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosKeytabDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosPrincipalDescriptorTest
> - org.apache.ambari.server.state.kerberos.KerberosServiceDescriptorTest
> 
> 
> Thanks,
> 
> Robert Levas
> 
>

Reply via email to