Implementing a baymodel attributes validation restful api

Registered by vikas choudhary

This blueprint has been superseded. See the newer blueprint "Enhance API parameters validation when create Bay" for updated plans.

A new api should be written to validate existence of all the attributes of a baymodel including externel-network, image, keypair, dns-server. This api will be making rest calls to corresponding projects for resource existence validation. This api will be called both at baymodel creation time and bay creation time. Api can be implemented both, internal to magnum only or as a public lib(available for any project).Public lib is preferred approach considering reusability.

Baymodel is a resource which once created will be used to create bays for a longer time period. In the meantime , chances are there that users might delete few attributes and thus invalidating baymodel at bay creation time. Calling of mentioned baymodel-all-attributes-validation api will help picking up any missing resource at magnum side itself rather than failures in heat orchestration.

Blueprint information

Adrian Otto
vikas choudhary
HouMing Wang
Series goal:
Accepted for mitaka
Milestone target:
Completed by
Adrian Otto


It is worthy to do validation before send request to heat, we don't want create a Failed stack and leave it there then let user to delete it manually. What I am thinking about is we validate all resources
include(nova key-pair, glance image, neutron network-id etc...) before generate request to Heat.

Both baymodel and bay are all need to be validate, so a public lib(which could be named as validation) should be work out to provide interface can be called from m-api/m-cond to do validation for various kinds of resources. --Eli

Exactly Eli. This is what i have mentioned in summary. I did not mention "validation api" implementation should be magnum part or it should be implemented as an seperate public lib. Doing at independent public lib seems a good idea.A dict of resource-value pairs can be passed to this validation api. In future other projects can also use this.Lets discuss it here and others also share views.

Gerrit topic:,topic:bp/baymodel-all-attributes-validation,n,z

Addressed by:
    Validate baymodel's flavor when create a bay


Work Items

This blueprint contains Public information 
Everyone can see this information.