On Wed, Feb 18, 2015 at 7:54 PM, Imesh Gunaratne <im...@apache.org> wrote:
> Great effort Raj! Validations look good! > > I think we could introduce a new API method to query network partition > references in a given application. This would allow the UI to generate the > application deployment page with a set of checkboxes to select "active by > default" property in each network partition reference. > A good suggestion Imesh. I will introduce this API in CC. Thanks > > Thanks > > On Wed, Feb 18, 2015 at 7:11 PM, Rajkumar Rajaratnam <rajkum...@wso2.com> > wrote: > >> Hi Devs, >> >> I am almost done with application policy validation logic and would like >> to give an update on the implementation. This is the sample application >> policy. >> >> { >> "networkPartition":[ >> { >> "id":"network-partition-1", >> "activeByDefault":"true" >> }, >> { >> "id":"network-partition-2", >> "activeByDefault":"false" >> } >> ] >> } >> >> I have now implemented the following validations. >> >> - application policy should contain at least one network partition >> reference >> - validating all network partition references >> - network-partition-id can't be null or empty >> - network partition should be already added/deployed >> - there should be at least one network partition reference which >> is active by default >> >> There is one more thing needs to be validated here. >> >> - validating application policy against the application >> >> Here, we need to validate whether all the cartridges are available in all >> the network partitions defined in the application policy. In other words, >> each cartridge should be available in each network partitions defined in >> the application policy. Availability of a cartridge in a network partition >> will be decided based on the deployment policy it refers. >> >> I am currently implementing this validation. >> >> Please let me know if I missed any other validation. >> >> Thanks. >> >> -- >> Rajkumar Rajaratnam >> Committer & PMC Member, Apache Stratos >> Software Engineer, WSO2 >> >> Mobile : +94777568639 >> Blog : rajkumarr.com >> > > > > -- > Imesh Gunaratne > > Technical Lead, WSO2 > Committer & PMC Member, Apache Stratos > -- Rajkumar Rajaratnam Committer & PMC Member, Apache Stratos Software Engineer, WSO2 Mobile : +94777568639 Blog : rajkumarr.com