Skip to content

Commit

Permalink
Merge pull request #258 from jrafanie/drop_require_nested_include_con…
Browse files Browse the repository at this point in the history
…cern

Drop require_nested and include_concern
  • Loading branch information
agrare authored Feb 6, 2024
2 parents 54e2deb + e8dc53e commit 84e7091
Show file tree
Hide file tree
Showing 18 changed files with 6 additions and 77 deletions.
18 changes: 0 additions & 18 deletions app/models/manageiq/providers/google/cloud_manager.rb
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
class ManageIQ::Providers::Google::CloudManager < ManageIQ::Providers::CloudManager
require_nested :AuthKeyPair
require_nested :AvailabilityZone
require_nested :CloudDatabase
require_nested :CloudDatabaseFlavor
require_nested :CloudVolume
require_nested :CloudVolumeSnapshot
require_nested :EventCatcher
require_nested :EventParser
require_nested :Flavor
require_nested :Provision
require_nested :ProvisionWorkflow
require_nested :MetricsCapture
require_nested :MetricsCollectorWorker
require_nested :RefreshWorker
require_nested :Refresher
require_nested :Template
require_nested :Vm

include ManageIQ::Providers::Google::ManagerMixin

supports :catalog
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Google::CloudManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher
require_nested :Runner

def self.all_valid_ems_in_zone
# Only valid to start an EventCatcher if the Pub/Sub service is enabled
# on the project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class ManageIQ::Providers::Google::CloudManager::MetricsCollectorWorker <
ManageIQ::Providers::BaseManager::MetricsCollectorWorker
require_nested :Runner

self.default_queue_name = "google"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ManageIQ::Providers::Google::CloudManager::Provision < ::MiqProvisionCloud
include_concern 'Cloning'
include_concern 'Disk'
include_concern 'StateMachine'
include Cloning
include Disk
include StateMachine
end
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Google::CloudManager::RefreshWorker < ManageIQ::Providers::BaseManager::RefreshWorker
require_nested :Runner
end
2 changes: 1 addition & 1 deletion app/models/manageiq/providers/google/cloud_manager/vm.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class ManageIQ::Providers::Google::CloudManager::Vm < ManageIQ::Providers::CloudManager::Vm
include_concern 'Operations'
include Operations

supports :capture

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module ManageIQ::Providers::Google::CloudManager::Vm::Operations
extend ActiveSupport::Concern

include_concern 'Guest'
include_concern 'Power'
include Guest
include Power

included do
supports :terminate do
Expand Down
12 changes: 0 additions & 12 deletions app/models/manageiq/providers/google/container_manager.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
ManageIQ::Providers::Kubernetes::ContainerManager.include(ActsAsStiLeafClass)

class ManageIQ::Providers::Google::ContainerManager < ManageIQ::Providers::Kubernetes::ContainerManager
require_nested :Container
require_nested :ContainerGroup
require_nested :ContainerNode
require_nested :ContainerTemplate
require_nested :EventCatcher
require_nested :EventParser
require_nested :Refresher
require_nested :RefreshWorker
require_nested :ServiceInstance
require_nested :ServiceOffering
require_nested :ServiceParametersSet

supports :create

def self.ems_type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class ManageIQ::Providers::Google::ContainerManager::EventCatcher < ManageIQ::Providers::BaseManager::EventCatcher
require_nested :Runner

def self.settings_name
:event_catcher_google_gke
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
class ManageIQ::Providers::Google::ContainerManager::RefreshWorker < ManageIQ::Providers::BaseManager::RefreshWorker
require_nested :Runner
require_nested :WatchThread

def self.settings_name
:ems_refresh_worker_google_gke
end
Expand Down
4 changes: 0 additions & 4 deletions app/models/manageiq/providers/google/inventory.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Google::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
4 changes: 0 additions & 4 deletions app/models/manageiq/providers/google/inventory/collector.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Google::Inventory::Collector < ManageIQ::Providers::Inventory::Collector
require_nested :CloudManager
require_nested :ContainerManager
require_nested :NetworkManager

def initialize(_manager, _target)
super
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Google::Inventory::Collector::ContainerManager < ManageIQ::Providers::Kubernetes::Inventory::Collector::ContainerManager
require_nested :WatchNotice
end
4 changes: 0 additions & 4 deletions app/models/manageiq/providers/google/inventory/parser.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Google::Inventory::Parser < ManageIQ::Providers::Inventory::Parser
require_nested :CloudManager
require_nested :ContainerManager
require_nested :NetworkManager

VENDOR_GOOGLE = "google".freeze
GCP_HEALTH_STATUS_MAP = {
"HEALTHY" => "InService",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Google::Inventory::Parser::ContainerManager < ManageIQ::Providers::Kubernetes::Inventory::Parser::ContainerManager
require_nested :WatchNotice
end
4 changes: 0 additions & 4 deletions app/models/manageiq/providers/google/inventory/persister.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
class ManageIQ::Providers::Google::Inventory::Persister < ManageIQ::Providers::Inventory::Persister
require_nested :CloudManager
require_nested :ContainerManager
require_nested :NetworkManager

def initialize_inventory_collections
initialize_cloud_inventory_collections
initialize_network_inventory_collections
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
class ManageIQ::Providers::Google::Inventory::Persister::ContainerManager < ManageIQ::Providers::Kubernetes::Inventory::Persister::ContainerManager
require_nested :WatchNotice
end
12 changes: 0 additions & 12 deletions app/models/manageiq/providers/google/network_manager.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,4 @@
class ManageIQ::Providers::Google::NetworkManager < ManageIQ::Providers::NetworkManager
require_nested :CloudNetwork
require_nested :CloudSubnet
require_nested :FloatingIp
require_nested :LoadBalancer
require_nested :LoadBalancerHealthCheck
require_nested :LoadBalancerListener
require_nested :LoadBalancerPool
require_nested :LoadBalancerPoolMember
require_nested :NetworkPort
require_nested :NetworkRouter
require_nested :SecurityGroup

include ManageIQ::Providers::Google::ManagerMixin

# Auth and endpoints delegations, editing of this type of manager must be disabled
Expand Down

0 comments on commit 84e7091

Please sign in to comment.