Intel host select.get platform group #3868
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes are a pre-requisite to addressing #3827
To carry out intelligent host selection the code needs to have access not to platforms but to platform groups.
To this end this PR
platforms.get_platform
withplatforms.get_platform_group
andplatforms.get_platform_from_name
toget_platforms_from_name
, so that code calling it has information about the whole group of platforms. If regex only matches a single platform rather than a platform group then a dummy platform group dictionary containing that single platform is returned. Question: Should this have selection method set to "first" to save time?platforms.get_localhost_platform
- in many places in the codeget_platform()
is called. This function replaces that one, and makes it easier to differentiate cases where we just want info about the localhost platform with cases where something more complex is happening.platforms.get_host_from_platform_group
. As withplatforms.get_host_from_platform
this is a placeholder for more sophisticated logic. At the moment it simply picks a random platform from the platform_group and callsget_host_from_platform
.