Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update provision requirements check to allow exact matches #72

Merged
merged 1 commit into from
Aug 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ def allowed_instance_types(_options = {})
minimum_disk_required = [source.hardware.size_on_disk.to_i, source.hardware.disk_size_minimum.to_i].max
minimum_memory_required = source.hardware.memory_mb_minimum.to_i * 1.megabyte
flavors.each_with_object({}) do |flavor, h|
next if flavor.root_disk_size <= minimum_disk_required
next if flavor.memory <= minimum_memory_required
next if flavor.root_disk_size < minimum_disk_required
next if flavor.memory < minimum_memory_required
h[flavor.id] = display_name_for_name_description(flavor)
end
end
Expand Down