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