Skip to content

Commit

Permalink
Add methods that can be overridden easily to ContainerTemplate
Browse files Browse the repository at this point in the history
Add methods that can be easily overridden by an initializer to the
container templates supports :instantiation check.
  • Loading branch information
agrare committed Jul 1, 2020
1 parent ce5378f commit c7213d3
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@
class ManageIQ::Providers::Openshift::ContainerManager::ContainerTemplate < ManageIQ::Providers::ContainerManager::ContainerTemplate
include ManageIQ::Providers::Kubernetes::ContainerManager::EntitiesMapping

supports :instantiate
def instantiate_supported?
true
end

def instantiate_unsupported_reason
nil
end

supports :instantiate do
unsupported_reason_add(:instantiate, instantiate_unsupported_reason) unless instantiate_supported?
end

def instantiate(params, project = nil, labels = nil)
project ||= container_project.name
Expand Down

0 comments on commit c7213d3

Please # to comment.