ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Speidel" <jspei...@hortonworks.com>
Subject Re: Review Request 20949: Provide basic validation of fields for blueprint create api
Date Thu, 01 May 2014 15:48:05 GMT


> On May 1, 2014, 3:22 p.m., Nate Cole wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java,
line 382
> > <https://reviews.apache.org/r/20949/diff/1/?file=572653#file572653line382>
> >
> >     Assuming it's ok to have a null cardinality (ie no validation check)?

Thanks Nate, good catch!  The DB cardinality field is marked as NOT NULL which results in
a 500 error if cardinality is not provided in the blueprint.  I will fix this now.


- John


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


On May 1, 2014, 2:52 p.m., John Speidel wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20949/
> -----------------------------------------------------------
> 
> (Updated May 1, 2014, 2:52 p.m.)
> 
> 
> Review request for Ambari, Nate Cole, Sid Wagle, and Tom Beerbower.
> 
> 
> Bugs: AMBARI-5648
>     https://issues.apache.org/jira/browse/AMBARI-5648
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> This task is for non topology related validation of blueprint create api calls.
> The following validations are included:
> no blueprint name
> no host groups
> no host group name
> no host group components
> component specified with no name
> invalid component name for stack
> no/invalid stack name
> no/invalid stack version
> Validation failures result in a 400 response with a descriptive message of the problem.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java cdb7fea

>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
ea2fdec 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/BlueprintResourceProviderTest.java
9e12c63 
> 
> Diff: https://reviews.apache.org/r/20949/diff/
> 
> 
> Testing
> -------
> 
> Manual Functional Tests:
> Tested that appropriate responses were returned for invalid requests.
> 
> Unit Tests:
> - Added new tests
> - All unit tests pass
> 
> Results :
> 
> Tests run: 1581, Failures: 0, Errors: 0, Skipped: 9
> ...
> Total run:548
> Total errors:0
> Total failures:0
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 17:35.082s
> [INFO] Finished at: Wed Apr 30 20:53:29 EDT 2014
> [INFO] Final Memory: 20M/123M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> John Speidel
> 
>


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