From 8752a0fb689c7c8febca7660b2433e936e39078d Mon Sep 17 00:00:00 2001 From: Karel Hala Date: Wed, 1 Nov 2017 17:36:11 +0100 Subject: [PATCH 1/2] Enable compliance check for middleware server --- app/models/middleware_server.rb | 2 ++ db/fixtures/miq_event_definitions.csv | 3 +++ db/fixtures/miq_product_features.yml | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/app/models/middleware_server.rb b/app/models/middleware_server.rb index 45a07f2fee1..a731e8f612f 100644 --- a/app/models/middleware_server.rb +++ b/app/models/middleware_server.rb @@ -1,4 +1,6 @@ class MiddlewareServer < ApplicationRecord + include MiqPolicyMixin + include ComplianceMixin include NewWithTypeStiMixin include LiveMetricsMixin diff --git a/db/fixtures/miq_event_definitions.csv b/db/fixtures/miq_event_definitions.csv index 3a8a3fa0866..0e8e6fc8bda 100644 --- a/db/fixtures/miq_event_definitions.csv +++ b/db/fixtures/miq_event_definitions.csv @@ -86,6 +86,9 @@ middleware_jdbc_ok,EAP JDBC Driver Deploy Succeeded,Default,middleware_operation middleware_jdbc_error,EAP JDBC Driver Deploy Failed,Default,middleware_operations middleware_jdbc_remove_ok,EAP JDBC Driver Undeploy Succeeded,Default,middleware_operations middleware_jdbc_remove_error,EAP JDBC Driver Undeploy Failed,Default,middleware_operations +middlewareserver_compliance_check,Middleware Server Compliance Check,Default,compliance +middlewareserver_compliance_passed,Middleware Server Compliance Passed,Default,compliance +middlewareserver_compliance_failed,Middleware Server Compliance Failed,Default,compliance # # Company tags diff --git a/db/fixtures/miq_product_features.yml b/db/fixtures/miq_product_features.yml index 4051f3b1575..72c71a55fe8 100644 --- a/db/fixtures/miq_product_features.yml +++ b/db/fixtures/miq_product_features.yml @@ -3832,6 +3832,10 @@ :description: Edit Tags of Middleware Servers :feature_type: control :identifier: middleware_server_tag + - :name: Check Compliance + :description: Check Compliance of Last Known Configuration + :feature_type: control + :identifier: middleware_server_check_compliance - :name: Reload middleware server :description: Trigger reload operation for Middleware Server :feature_type: admin From e189b2f225fb4d3c4c02fc63b374df9cfcdc1234 Mon Sep 17 00:00:00 2001 From: Karel Hala Date: Thu, 2 Nov 2017 15:33:59 +0100 Subject: [PATCH 2/2] Add MW server check compliance to allowed roles --- db/fixtures/miq_user_roles.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/db/fixtures/miq_user_roles.yml b/db/fixtures/miq_user_roles.yml index 7fe72552bf4..5beb4d452fe 100644 --- a/db/fixtures/miq_user_roles.yml +++ b/db/fixtures/miq_user_roles.yml @@ -123,6 +123,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -213,6 +214,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -374,6 +376,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -474,6 +477,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -559,6 +563,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -642,6 +647,7 @@ - my_settings_default_views - my_settings_time_profiles - my_settings_visuals + - middleware_server_check_compliance - miq_report_run - miq_report_saved_reports - miq_report_schedules @@ -809,6 +815,7 @@ - automation_manager - embedded_automation_manager - compute + - middleware_server_check_compliance - miq_request_admin - miq_request_view - miq_template_analyze