Skip to content

Commit

Permalink
Fixed refresh & save for Physical Infra.
Browse files Browse the repository at this point in the history
Added Physical Infra to the required classes to be included in save
inventory.

Remove `enabled` from PhysicalServers as the field is not in the
model, so was causing an issue trying to save a value that wasn't
there.
  • Loading branch information
Julian Cheal committed Mar 15, 2017
1 parent b3574a3 commit 7186aa6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/models/ems_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module EmsRefresh
extend EmsRefresh::SaveInventoryBlockStorage
extend EmsRefresh::SaveInventoryCloud
extend EmsRefresh::SaveInventoryInfra
extend EmsRefresh::SaveInventoryPhysicalInfra
extend EmsRefresh::SaveInventoryContainer
extend EmsRefresh::SaveInventoryMiddleware
extend EmsRefresh::SaveInventoryDatawarehouse
Expand Down
1 change: 1 addition & 0 deletions app/models/ems_refresh/save_inventory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def save_ems_inventory(ems, hashes, target = nil)
case ems
when EmsCloud then save_ems_cloud_inventory(ems, hashes, target)
when EmsInfra then save_ems_infra_inventory(ems, hashes, target)
when EmsPhysicalInfra then save_ems_physical_infra_inventory(ems, hashes, target)
when ManageIQ::Providers::AutomationManager then save_automation_manager_inventory(ems, hashes, target)
when ManageIQ::Providers::ConfigurationManager then save_configuration_manager_inventory(ems, hashes, target)
when ManageIQ::Providers::ContainerManager then save_ems_container_inventory(ems, hashes, target)
Expand Down
2 changes: 0 additions & 2 deletions app/models/physical_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ class PhysicalServer < ApplicationRecord

belongs_to :ext_management_system, :foreign_key => :ems_id, :class_name => "ManageIQ::Providers::PhysicalInfraManager"

default_value_for :enabled, true

def name_with_details
details % {
:name => name,
Expand Down

0 comments on commit 7186aa6

Please sign in to comment.