1 Commits

Author SHA1 Message Date
Chris Friesen
5e7b840e48 Flavor extra spec and image properties validation from API
Validate the combination of the flavor extra-specs and image properties
as early as possible once they're both known (since you can specify
mutually-incompatible changes in the two places). If validation failed
then synchronously return error to user. We need to do this anywhere
the flavor or image changes, so basically instance creation, rebuild,
and resize.

- Rename _check_requested_image() to _validate_flavor_image() and add
  a call from the resize code path.  (It's already called for create
  and rebuild.)
- In _validate_flavor_image() add new checks to validate numa related
  options from flavor and image including CPU policy, CPU thread
  policy, CPU topology, memory topology, hugepages, CPU pinning,
  serial ports, realtime mask, etc.
- Added new 400 exceptions in Server API correspondent to added
  validations.

blueprint: flavor-extra-spec-image-property-validation
Change-Id: I06fad233006c7bab14749a51ffa226c3801f951b
Signed-off-by: Jack Ding <jack.ding@windriver.com>
Signed-off-by: Chris Friesen <chris.friesen@windriver.com>
2019-03-05 12:05:06 -06:00