I tweaked the service_advisor.py script of my custom services in order to automatically layout my services on the hosts of my cluster. I used the colocateService procedure to do that. This procedure adds or removes some components of services on some hosts.
Thanks to that, the Ambari "Assign masters" page initially reflects the expected layout defined in the colocateService procedure.
Unfortunately, when the "+" or "-" buttons are then used in that page, the displayed layout is updated (as expected) but the "service" parameter of service_advisor.getServiceComponentLayoutValidations procedure ignores the change.
So, defining some validations items based on a incorrect layout is quite impossible.
How can the layouts displayed in the UI and the one contained on the "service" parameter be sync'ed ?