Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix provider service model inheritance
Discovered ConfigurationManager and ProvisioningManager service models were not properly converted to pluggable provider name-spacing.

https://bugzilla.redhat.com/show_bug.cgi?id=1280350
  • Loading branch information
gmcculloug committed Nov 16, 2015
1 parent 92ff2c3 commit e2b18ef
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
@@ -1,5 +1,5 @@
module MiqAeMethodService
class MiqAeServiceConfigurationManager < MiqAeServiceModelBase
class MiqAeServiceManageIQ_Providers_ConfigurationManager < MiqAeServiceExtManagementSystem
expose :provider, :association => true
expose :configuration_profiles, :association => true
expose :configured_systems, :association => true
Expand Down
@@ -1,5 +1,5 @@
module MiqAeMethodService
class MiqAeServiceProvisioningManager < MiqAeServiceModelBase
class MiqAeServiceManageIQ_Providers_ProvisioningManager < MiqAeServiceExtManagementSystem
expose :provider, :association => true
expose :operating_system_flavors, :association => true
expose :customization_scripts, :association => true
Expand Down
6 changes: 6 additions & 0 deletions spec/lib/miq_automation_engine/miq_ae_service_spec.rb
Expand Up @@ -78,6 +78,12 @@ module MiqAeServiceSpec
it "raises error on invalid service_model name" do
expect { miq_ae_service.service_model(:invalid_model) }.to raise_error(NameError)
end

it "loads all mapped models" do
MiqAeMethodService::MiqAeService::LEGACY_MODEL_NAMES.values.each do |model_name|
expect { "MiqAeMethodService::MiqAeService#{model_name}".constantize }.to_not raise_error
end
end
end
end
end

0 comments on commit e2b18ef

Please sign in to comment.