Skip to content

Commit

Permalink
require_nested is no longer needed with zeitwerk
Browse files Browse the repository at this point in the history
  • Loading branch information
jrafanie committed Jan 26, 2024
1 parent 0a0ea72 commit e185fd1
Show file tree
Hide file tree
Showing 24 changed files with 0 additions and 106 deletions.
24 changes: 0 additions & 24 deletions app/models/manageiq/providers/openstack/cloud_manager.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
class ManageIQ::Providers::Openstack::CloudManager < ManageIQ::Providers::CloudManager
require_nested :AuthKeyPair
require_nested :AvailabilityZone
require_nested :AvailabilityZoneNull
require_nested :CloudResourceQuota
require_nested :CloudTenant
require_nested :EventCatcher
require_nested :EventParser
require_nested :Flavor
require_nested :HostAggregate
require_nested :MetricsCapture
require_nested :MetricsCollectorWorker
require_nested :OrchestrationServiceOptionConverter
require_nested :OrchestrationStack
require_nested :OrchestrationTemplate
require_nested :VnfdTemplate
require_nested :PlacementGroup
require_nested :Provision
require_nested :ProvisionWorkflow
require_nested :Refresher
require_nested :RefreshWorker
require_nested :Snapshot
require_nested :Template
require_nested :Vm

has_one :network_manager,
:foreign_key => :parent_ems_id,
:class_name => "ManageIQ::Providers::Openstack::NetworkManager",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
class ManageIQ::Providers::Openstack::CloudManager::EventCatcher < ::MiqEventCatcher
include ManageIQ::Providers::Openstack::EventCatcherMixin

require_nested :Runner
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Openstack::CloudManager::MetricsCollectorWorker < ::MiqEmsMetricsCollectorWorker
require_nested :Runner

self.default_queue_name = "openstack"

def friendly_name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class ManageIQ::Providers::Openstack::CloudManager::OrchestrationStack < ManageIQ::Providers::CloudManager::OrchestrationStack
include ManageIQ::Providers::Openstack::HelperMethods
require_nested :Status

def self.raw_create_stack(orchestration_manager, stack_name, template, options = {})
create_options = {:stack_name => stack_name, :template => template.content}.merge(options).except(:tenant_name)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Openstack::CloudManager::RefreshWorker < ::MiqEmsRefreshWorker
require_nested :Runner
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Openstack::CloudManager::Scanning
require_nested :Job
end
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class ManageIQ::Providers::Openstack::CloudManager::Vnf < ManageIQ::Providers::CloudManager::OrchestrationStack
include ManageIQ::Providers::Openstack::HelperMethods
require_nested :Status

def self.raw_create_stack(orchestration_manager, stack_name, template, options = {})
create_options = {:vnf => {:name => stack_name, :vnfd_id => template.ems_ref}}
Expand Down
13 changes: 0 additions & 13 deletions app/models/manageiq/providers/openstack/infra_manager.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
class ManageIQ::Providers::Openstack::InfraManager < ManageIQ::Providers::InfraManager
require_nested :AuthKeyPair
require_nested :Cluster
require_nested :EventCatcher
require_nested :EventParser
require_nested :Host
require_nested :HostServiceGroup
require_nested :MetricsCapture
require_nested :MetricsCollectorWorker
require_nested :OrchestrationStack
require_nested :Refresher
require_nested :RefreshWorker
require_nested :Template

include ManageIQ::Providers::Openstack::ManagerMixin
include HasManyOrchestrationStackMixin
include HasNetworkManagerMixin
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class ManageIQ::Providers::Openstack::InfraManager::EventCatcher < ::MiqEventCatcher
include ManageIQ::Providers::Openstack::EventCatcherMixin

require_nested :Runner

def self.settings_name
:event_catcher_openstack_infra
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Openstack::InfraManager::MetricsCollectorWorker < ::MiqEmsMetricsCollectorWorker
require_nested :Runner

self.default_queue_name = "openstack_infra"

def friendly_name
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Openstack::InfraManager::RefreshWorker < ::MiqEmsRefreshWorker
require_nested :Runner

def self.settings_name
:ems_refresh_worker_openstack_infra
end
Expand Down
4 changes: 0 additions & 4 deletions app/models/manageiq/providers/openstack/inventory.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Openstack::Inventory < ManageIQ::Providers::Inventory
require_nested :Collector
require_nested :Parser
require_nested :Persister

# Default manager for building collector/parser/persister classes
# when failed to get class name from refresh target automatically
def self.default_manager_name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ class ManageIQ::Providers::Openstack::Inventory::Collector < ManageIQ::Providers
include ManageIQ::Providers::Openstack::RefreshParserCommon::HelperMethods
include Vmdb::Logging

require_nested :CloudManager
require_nested :NetworkManager
require_nested :StorageManager
require_nested :TargetCollection

attr_reader :availability_zones
attr_reader :cloud_services
attr_reader :tenants
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
module ManageIQ::Providers::Openstack::Inventory::Collector::StorageManager
require_nested :CinderManager
require_nested :SwiftManager
end
5 changes: 0 additions & 5 deletions app/models/manageiq/providers/openstack/inventory/parser.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
class ManageIQ::Providers::Openstack::Inventory::Parser < ManageIQ::Providers::Inventory::Parser
require_nested :CloudManager
require_nested :InfraManager
require_nested :NetworkManager
require_nested :StorageManager

def orchestration_stack_parameters(stack, stack_inventory_object)
collector.orchestration_parameters(stack).each do |param_key, param_val|
uid = compose_ems_ref(stack.id, param_key)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
module ManageIQ::Providers::Openstack::Inventory::Parser::StorageManager
require_nested :CinderManager
require_nested :SwiftManager
end
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
class ManageIQ::Providers::Openstack::Inventory::Persister < ManageIQ::Providers::Inventory::Persister
require_nested :CloudManager
require_nested :InfraManager
require_nested :NetworkManager
require_nested :StorageManager
require_nested :TargetCollection

# TODO(lsmola) figure out a way to pass collector info, probably via target, then remove the below
attr_reader :collector

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
module ManageIQ::Providers::Openstack::Inventory::Persister::StorageManager
require_nested :CinderManager
require_nested :SwiftManager
end
10 changes: 0 additions & 10 deletions app/models/manageiq/providers/openstack/network_manager.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
class ManageIQ::Providers::Openstack::NetworkManager < ManageIQ::Providers::NetworkManager
require_nested :CloudNetwork
require_nested :CloudSubnet
require_nested :EventCatcher
require_nested :EventParser
require_nested :FloatingIp
require_nested :NetworkPort
require_nested :NetworkRouter
require_nested :Refresher
require_nested :SecurityGroup

include ManageIQ::Providers::Openstack::ManagerMixin
include SupportsFeatureMixin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,9 +456,6 @@ def params_for_update
}
end

require_nested :Private
require_nested :Public

def self.class_by_ems(ext_management_system, external = false)
external ? super::Public : super::Private
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class ManageIQ::Providers::Openstack::NetworkManager::EventCatcher < ::MiqEventCatcher
include ManageIQ::Providers::Openstack::EventCatcherMixin

require_nested :Runner

def self.settings_name
:event_catcher_openstack_network
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
class ManageIQ::Providers::Openstack::StorageManager::CinderManager < ManageIQ::Providers::StorageManager
require_nested :CloudVolume
require_nested :CloudVolumeBackup
require_nested :CloudVolumeSnapshot
require_nested :CloudVolumeType
require_nested :Refresher
require_nested :EventCatcher
require_nested :EventParser

include ManageIQ::Providers::StorageManager::BlockMixin
include ManageIQ::Providers::Openstack::ManagerMixin

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class ManageIQ::Providers::Openstack::StorageManager::CinderManager::EventCatcher < ::MiqEventCatcher
include ManageIQ::Providers::Openstack::EventCatcherMixin

require_nested :Runner

def self.settings_name
:event_catcher_openstack_cinder
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Openstack::StorageManager::SwiftManager < ManageIQ::Providers::StorageManager
require_nested :CloudObjectStoreContainer
require_nested :CloudObjectStoreObject
require_nested :Refresher

include ManageIQ::Providers::StorageManager::ObjectMixin

delegate :authentication_check,
Expand Down

0 comments on commit e185fd1

Please sign in to comment.