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

Allow Openstack provider Volumes and Snapshots to be eligible for provisioning. #16066

Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion app/models/manageiq/providers/cloud_manager/template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def self.eligible_for_provisioning
super.where(:type => %w(ManageIQ::Providers::Amazon::CloudManager::Template
ManageIQ::Providers::Openstack::CloudManager::Template
ManageIQ::Providers::Azure::CloudManager::Template
ManageIQ::Providers::Google::CloudManager::Template))
ManageIQ::Providers::Google::CloudManager::Template
ManageIQ::Providers::Openstack::CloudManager::VolumeTemplate
ManageIQ::Providers::Openstack::CloudManager::VolumeSnapshotTemplate))
end

private
Expand Down
5 changes: 5 additions & 0 deletions app/models/miq_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ def self.eligible_for_provisioning
where(arel_table[:ems_id].not_eq(nil))
end

def self.without_volume_templates
where.not(:type => ["ManageIQ::Providers::Openstack::CloudManager::VolumeTemplate",
"ManageIQ::Providers::Openstack::CloudManager::VolumeSnapshotTemplate"])
end

def active?; false; end
end