Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create filter_properties earlier in boot request
In order to prep for cellsv2 and its need to call the scheduler earlier in the boot process this creates the filter_properties dict earlier. A request_spec object will need to be created and persisted before the instance is written to the db and the request_spec depends on having filter_properties. In _create_instance() a check was removed that set instance_type to the default flavor if instance_type was passed in as None. There is no place currently in the code that passes in None for instance_type, except the test that I fixed, so this is safe to remove. And since instance_type is set on filter_properties earlier than this check if instance_type was set to the default flavor at this point that would mean that filter_properties and instance would have different values for instance_type. With the check removed if somehow a None instance_type was passed in it would fail later in the method when it is accessed as a dict. Change-Id: I42afda9643e4c24c9a12ace8e88dd1a9c13aa121
- Loading branch information
Showing
4 changed files
with
58 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters