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

[WIP] Rename datawarehouse manager to monitoring manager #15295

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion .rubocop_local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GlobalVars:
- $api_log
- $aws_log
- $azure_log
- $datawarehouse_log
- $monitoring_log
- $fog_log
- $lenovo_log
- $log
Expand Down
4 changes: 2 additions & 2 deletions app/models/ems_event.rb
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def self.first_chained_event(ems_id, chain_id)
def parse_event_metadata
data = full_data || {}
[
event_type == "datawarehouse_alert" ? message : nil,
event_type == "monitoring_alert" ? message : nil,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overloading event_type then switching it to message feels pretty hacky, this means the event_type won't be persisted to the EventStreams table which makes it harder to diagnose from a database.

I know that is how it is currently done but there has to be a better way

data[:severity],
data[:url],
data[:ems_ref],
Expand Down Expand Up @@ -216,7 +216,7 @@ def get_target(target_type)
target_type = "src_vm_or_template" if target_type == "src_vm"
target_type = "dest_vm_or_template" if target_type == "dest_vm"
target_type = "middleware_server" if event.event_type == "hawkular_alert"
target_type = "container_node" if event.event_type == "datawarehouse_alert"
target_type = "container_node" if event.event_type == "monitoring_alert"

event.send(target_type)
end
Expand Down
2 changes: 1 addition & 1 deletion app/models/ems_refresh.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module EmsRefresh
extend EmsRefresh::SaveInventoryInfra
extend EmsRefresh::SaveInventoryPhysicalInfra
extend EmsRefresh::SaveInventoryContainer
extend EmsRefresh::SaveInventoryDatawarehouse
extend EmsRefresh::SaveInventoryMonitoring
extend EmsRefresh::SaveInventoryNetwork
extend EmsRefresh::SaveInventoryObjectStorage
extend EmsRefresh::SaveInventoryHelper
Expand Down
2 changes: 1 addition & 1 deletion app/models/ems_refresh/save_inventory.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def save_ems_inventory(ems, hashes, target = nil)
when ManageIQ::Providers::ContainerManager then save_ems_container_inventory(ems, hashes, target)
when ManageIQ::Providers::NetworkManager then save_ems_network_inventory(ems, hashes, target)
when ManageIQ::Providers::StorageManager then save_ems_storage_inventory(ems, hashes, target)
when ManageIQ::Providers::DatawarehouseManager then save_ems_datawarehouse_inventory(ems, hashes, target)
when ManageIQ::Providers::MonitoringManager then save_ems_monitoring_inventory(ems, hashes, target)
end
end

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module EmsRefresh::SaveInventoryDatawarehouse
def save_ems_datawarehouse_inventory(ems, hashes, target = nil)
module EmsRefresh::SaveInventoryMonitoring
def save_ems_monitoring_inventory(ems, hashes, target = nil)
target = ems if target.nil?

child_keys = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module ManageIQ::Providers
class DatawarehouseManager < BaseManager
class MonitoringManager < BaseManager
class << model_name
def route_key
"ems_datawarehouse"
"ems_monitoring"
end

def singular_route_key
"ems_datawarehouse"
"ems_monitoring"
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions app/models/miq_alert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def validate_automate_expressions
next_frequency = (options || {}).fetch_path(:notifications, :delay_next_evaluation)
if automate_expression[:always_evaluate] && next_frequency != 0
valid = false
errors.add(:notifications, "Datawarehouse alerts must have a 0 notification frequency")
errors.add(:notifications, "External alerts must have a 0 notification frequency")
end
valid
end
Expand Down Expand Up @@ -457,7 +457,7 @@ def self.automate_expressions
{:name => :mw_operator, :description => _("Operator"), :values => [">", ">=", "<", "<=", "="]},
{:name => :value_mw_garbage_collector, :description => _("Duration Per Minute (ms)"), :numeric => true}
]},
{:name => "dwh_generic", :description => _("All Datawarehouse alerts"), :db => ["ContainerNode"], :responds_to_events => "datawarehouse_alert",
{:name => "dwh_generic", :description => _("All External alerts"), :db => ["ContainerNode"], :responds_to_events => "external_alert",
:options => [], :always_evaluate => true}
]
end
Expand Down Expand Up @@ -520,7 +520,7 @@ def self.expression_by_name(name)

def self.raw_events
@raw_events ||= expression_by_name("event_threshold")[:options].find { |h| h[:name] == :event_types }[:values] +
%w(hawkular_alert datawarehouse_alert)
%w(hawkular_alert external_alert)
end

def self.event_alertable?(event)
Expand Down
4 changes: 2 additions & 2 deletions app/models/miq_region.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ def ems_middlewares
ext_management_systems.select { |e| e.kind_of? ManageIQ::Providers::MiddlewareManager }
end

def ems_datawarehouses
ext_management_systems.select { |e| e.kind_of? ManageIQ::Providers::DatawarehouseManager }
def ems_monitors
ext_management_systems.select { |e| e.kind_of? ManageIQ::Providers::MonitoringManager }
end

def ems_configproviders
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module MiqServer::WorkerManagement::Monitor::ClassNames
ManageIQ::Providers::Foreman::ConfigurationManager::RefreshWorker
ManageIQ::Providers::Foreman::ProvisioningManager::RefreshWorker
ManageIQ::Providers::Hawkular::MiddlewareManager::RefreshWorker
ManageIQ::Providers::Hawkular::DatawarehouseManager::RefreshWorker
ManageIQ::Providers::Hawkular::MonitoringManager::RefreshWorker
ManageIQ::Providers::Kubernetes::ContainerManager::RefreshWorker
ManageIQ::Providers::Openshift::ContainerManager::RefreshWorker
ManageIQ::Providers::Microsoft::InfraManager::RefreshWorker
Expand All @@ -47,7 +47,7 @@ module MiqServer::WorkerManagement::Monitor::ClassNames
ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher
ManageIQ::Providers::Azure::CloudManager::EventCatcher
ManageIQ::Providers::Hawkular::MiddlewareManager::EventCatcher
ManageIQ::Providers::Hawkular::DatawarehouseManager::EventCatcher
ManageIQ::Providers::Hawkular::MonitoringManager::EventCatcher
ManageIQ::Providers::Google::CloudManager::EventCatcher
ManageIQ::Providers::Kubernetes::ContainerManager::EventCatcher
ManageIQ::Providers::Openshift::ContainerManager::EventCatcher
Expand Down Expand Up @@ -103,7 +103,7 @@ module MiqServer::WorkerManagement::Monitor::ClassNames
ManageIQ::Providers::Foreman::ConfigurationManager::RefreshWorker
ManageIQ::Providers::Foreman::ProvisioningManager::RefreshWorker
ManageIQ::Providers::Hawkular::MiddlewareManager::RefreshWorker
ManageIQ::Providers::Hawkular::DatawarehouseManager::RefreshWorker
ManageIQ::Providers::Hawkular::MonitoringManager::RefreshWorker
ManageIQ::Providers::Kubernetes::ContainerManager::RefreshWorker
ManageIQ::Providers::Lenovo::PhysicalInfraManager::RefreshWorker
ManageIQ::Providers::Openshift::ContainerManager::RefreshWorker
Expand Down Expand Up @@ -135,7 +135,7 @@ module MiqServer::WorkerManagement::Monitor::ClassNames
ManageIQ::Providers::AnsibleTower::AutomationManager::EventCatcher
ManageIQ::Providers::EmbeddedAnsible::AutomationManager::EventCatcher
ManageIQ::Providers::Hawkular::MiddlewareManager::EventCatcher
ManageIQ::Providers::Hawkular::DatawarehouseManager::EventCatcher
ManageIQ::Providers::Hawkular::MonitoringManager::EventCatcher
ManageIQ::Providers::Google::CloudManager::EventCatcher
ManageIQ::Providers::Kubernetes::ContainerManager::EventCatcher
ManageIQ::Providers::Openshift::ContainerManager::EventCatcher
Expand Down
4 changes: 2 additions & 2 deletions app/models/zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def middleware_servers
ems_middlewares.flat_map(&:middleware_servers)
end

def ems_datawarehouses
ext_management_systems.select { |e| e.kind_of? ManageIQ::Providers::DatawarehouseManager }
def ems_monitors
ext_management_systems.select { |e| e.kind_of? ManageIQ::Providers::MonitoringManager }
end

def ems_configproviders
Expand Down
4 changes: 0 additions & 4 deletions config/dictionary_strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2348,10 +2348,6 @@
_("Containers Providers")
# TRANSLATORS: en.yml key: dictionary.table.ems_containers
_("Containers Providers")
# TRANSLATORS: en.yml key: dictionary.table.ems_datawarehouse
_("Datawarehouse Provider")
# TRANSLATORS: en.yml key: dictionary.table.ems_datawarehouse (plural form)
_("Datawarehouse Providers")
# TRANSLATORS: en.yml key: dictionary.table.ems_middleware
_("Middleware Provider")
# TRANSLATORS: en.yml key: dictionary.table.ems_middleware (plural form)
Expand Down
50 changes: 0 additions & 50 deletions config/permissions.tmpl.yml

This file was deleted.

35 changes: 0 additions & 35 deletions config/yaml_strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2215,32 +2215,6 @@
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Edit Tags of Middleware Messaging")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Everything under Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("View Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Display Lists of Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Display Individual Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Display Timelines for Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Perform Operations on Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Refresh Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Re-check Authentication Status of Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Edit Tags of Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Modify Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Remove Datawarehouse Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Edit a Datawarehouse Provider")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
_("Add a Datawarehouse Provider")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
# TRANSLATORS: file: product/views/ManageIQ_Providers_NetworkManager.yaml
_("Network Providers")
# TRANSLATORS: file: db/fixtures/miq_product_features.yml
Expand Down Expand Up @@ -3918,7 +3892,6 @@
# TRANSLATORS: file: product/views/ManageIQ_Providers_CloudManager_Vm-vms.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_CloudManager_Vm.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ContainerManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_EmbeddedAnsible_AutomationManager_Playbook.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_EmbeddedAutomationManager_Authentication.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_EmbeddedAutomationManager_ConfigurationScriptSource.yaml
Expand Down Expand Up @@ -4273,7 +4246,6 @@
# TRANSLATORS: file: product/views/ManageIQ_Providers_CloudManager_Template.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ConfigurationManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ContainerManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_EmbeddedAutomationManager_Authentication.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_Foreman_ConfigurationManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfiguredSystem.yaml
Expand Down Expand Up @@ -4634,7 +4606,6 @@
# TRANSLATORS: file: product/views/ConfiguredSystem.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_AnsibleTower_AutomationManager_ConfiguredSystem.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ContainerManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_Foreman_ConfigurationManager_ConfiguredSystem.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_InfraManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_MiddlewareManager.yaml
Expand Down Expand Up @@ -4667,7 +4638,6 @@
# TRANSLATORS: file: product/views/Host-hosts.yaml
# TRANSLATORS: file: product/views/Host.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ContainerManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_MiddlewareManager.yaml
# TRANSLATORS: file: product/views/MiqServer.yaml
_("IP Address")
Expand Down Expand Up @@ -6676,7 +6646,6 @@
# TRANSLATORS: file: product/views/ContainerImageRegistry.yaml
# TRANSLATORS: file: product/views/FirewallRule.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_ContainerManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
# TRANSLATORS: file: product/views/ManageIQ_Providers_MiddlewareManager.yaml
_("Port")
# TRANSLATORS: file: product/views/ManageIQ_Providers_CloudManager_Vm-all_vms_and_templates.yaml
Expand Down Expand Up @@ -6719,10 +6688,6 @@
# TRANSLATORS: file: product/views/MiqGroup.yaml
# TRANSLATORS: file: product/views/User.yaml
_("Role")
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
_("Datawarehouse Providers")
# TRANSLATORS: file: product/views/ManageIQ_Providers_DatawarehouseManager.yaml
_("EmsDatawarehouse")
# TRANSLATORS: file: product/views/ServiceCatalog.yaml
# TRANSLATORS: file: product/views/ServiceTemplate.yaml
# TRANSLATORS: file: product/views/ServiceTemplateCatalog.yaml
Expand Down
58 changes: 0 additions & 58 deletions db/fixtures/miq_product_features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3976,64 +3976,6 @@
:feature_type: control
:identifier: middleware_messaging_tag

# EmsDatawarehouse
- :name: Providers
:description: Everything under Datawarehouse Providers
:feature_type: node
:identifier: ems_datawarehouse
:children:
- :name: View
:description: View Datawarehouse Providers
:feature_type: view
:identifier: ems_datawarehouse_view
:children:
- :name: List
:description: Display Lists of Datawarehouse Providers
:feature_type: view
:identifier: ems_datawarehouse_show_list
- :name: Show
:description: Display Individual Datawarehouse Providers
:feature_type: view
:identifier: ems_datawarehouse _show
- :name: Timeline
:description: Display Timelines for Datawarehouse Providers
:feature_type: view
:identifier: ems_datawarehouse_timeline
- :name: Operate
:description: Perform Operations on Datawarehouse Providers
:feature_type: control
:identifier: ems_datawarehouse_control
:children:
- :name: Refresh
:description: Refresh Datawarehouse Providers
:feature_type: control
:identifier: ems_datawarehouse_refresh
- :name: Re-check Authentication Status
:description: Re-check Authentication Status of Datawarehouse Providers
:feature_type: control
:identifier: ems_datawarehouse_recheck_auth_status
- :name: Edit Tags
:description: Edit Tags of Datawarehouse Providers
:feature_type: control
:identifier: ems_datawarehouse_tag
- :name: Modify
:description: Modify Datawarehouse Providers
:feature_type: admin
:identifier: ems_datawarehouse_admin
:children:
- :name: Remove
:description: Remove Datawarehouse Providers
:feature_type: admin
:identifier: ems_datawarehouse_delete
- :name: Edit
:description: Edit a Datawarehouse Provider
:feature_type: admin
:identifier: ems_datawarehouse_edit
- :name: Add
:description: Add a Datawarehouse Provider
:feature_type: admin
:identifier: ems_datawarehouse_new

# EmsNetwork
- :name: Network Providers
:description: Everything under Network Providers
Expand Down
5 changes: 0 additions & 5 deletions db/fixtures/miq_shortcuts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -339,11 +339,6 @@
:url: /middleware_topology
:rbac_feature_name: middleware_topology_view
:startup: true
- :name: ems_datawarehouse
:description: Datawarehouse / Providers
:url: /ems_datawarehouse
:rbac_feature_name: ems_datawarehouse_show_list
:startup: true
- :name: ems_block_storage
:description: Storage / Block Storage / Managers
:url: /ems_block_storage/show_list
Expand Down
4 changes: 2 additions & 2 deletions lib/vmdb/loggers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def self.apply_config(config)
apply_config_value(config, $aws_log, :level_aws, :level_aws_in_evm)
apply_config_value(config, $kube_log, :level_kube, :level_kube_in_evm)
apply_config_value(config, $mw_log, :level_mw, :level_mw_in_evm)
apply_config_value(config, $datawarehouse_log, :level_datawarehouse, :level_datawarehouse_in_evm)
apply_config_value(config, $monitoring_log, :level_monitoring, :level_monitoring_in_evm)
apply_config_value(config, $scvmm_log, :level_scvmm, :level_scvmm_in_evm)
apply_config_value(config, $api_log, :level_api, :level_api_in_evm)
apply_config_value(config, $fog_log, :level_fog, :level_fog_in_evm)
Expand All @@ -51,7 +51,7 @@ def self.create_loggers
$lenovo_log = MirroredLogger.new(path_dir.join("lenovo.log"), "<LENOVO> ")
$kube_log = MirroredLogger.new(path_dir.join("kubernetes.log"), "<KUBERNETES> ")
$mw_log = MirroredLogger.new(path_dir.join("middleware.log"), "<MIDDLEWARE> ")
$datawarehouse_log = MirroredLogger.new(path_dir.join("datawarehouse.log"), "<DATAWAREHOUSE> ")
$monitorng_log = MirroredLogger.new(path_dir.join("monitorng.log"), "<MONITORNG> ")
$scvmm_log = MirroredLogger.new(path_dir.join("scvmm.log"), "<SCVMM> ")
$azure_log = MirroredLogger.new(path_dir.join("azure.log"), "<AZURE> ")
$api_log = MirroredLogger.new(path_dir.join("api.log"), "<API> ")
Expand Down
Loading