Created
February 12, 2013 17:58
-
-
Save hub-cap/4771790 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class BackendFilter(filters.BaseHostFilter): | |
| """MultiBackendFilter for determining the backend to send to.""" | |
| def host_passes(self, host_state, filter_properties): | |
| """Return True if host has sufficient capacity.""" | |
| vol_type = host_state.volume_type | |
| return filter_properties['volume_type']['name'] == vol_type |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment