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

Missing embedded ansible persisters dependencies #17574

Merged
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::AutomationManager < ManagerRefresh::Inventory::Persister
include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Persister::AutomationManager
class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::AutomationManager < ManageIQ::Providers::AnsibleTower::Inventory::Persister::AutomationManager
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::ConfigurationScriptSource < ManagerRefresh::Inventory::Persister
include ManageIQ::Providers::AnsibleTower::Shared::Inventory::Persister::ConfigurationScriptSource
class ManageIQ::Providers::EmbeddedAnsible::Inventory::Persister::ConfigurationScriptSource < ManageIQ::Providers::AnsibleTower::Inventory::Persister::ConfigurationScriptSource
end
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,13 @@ def auto_model_class
manager_module = self.class.name.split('::').last

class_name = "#{provider_module}::#{manager_module}::#{@name.to_s.classify}"
class_name.safe_constantize

inferred_class = class_name.safe_constantize

# safe_constantize can return different similar class ( some Rails auto-magic :/ )
if inferred_class.to_s == class_name
inferred_class
end
rescue ::ManageIQ::Providers::Inflector::ObjectNotNamespacedError
nil
end
Expand Down