From 2129daf72ff0d6672b4348d20b3731f049480286 Mon Sep 17 00:00:00 2001 From: Nick Carboni Date: Thu, 1 Nov 2018 10:00:15 -0400 Subject: [PATCH] Merge pull request #18137 from yrudman/set-service-retierement-date-on-global-region Allow to set retirement date for service via Centralized Administration (cherry picked from commit f2016e8e08ad3ea49a953dbaad20ae774eb41965) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1648991 --- app/models/service.rb | 3 +++ app/models/service/operations.rb | 5 +++++ app/models/service/operations/lifecycle.rb | 9 +++++++++ 3 files changed, 17 insertions(+) create mode 100644 app/models/service/operations.rb create mode 100644 app/models/service/operations/lifecycle.rb diff --git a/app/models/service.rb b/app/models/service.rb index 2f6011e70ef..2eb16ff932b 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -69,6 +69,9 @@ class Service < ApplicationRecord include SupportsFeatureMixin include Metric::CiMixin + extend InterRegionApiMethodRelay + + include_concern 'Operations' include_concern 'RetirementManagement' include_concern 'Aggregation' include_concern 'ResourceLinking' diff --git a/app/models/service/operations.rb b/app/models/service/operations.rb new file mode 100644 index 00000000000..d269b0f303a --- /dev/null +++ b/app/models/service/operations.rb @@ -0,0 +1,5 @@ +module Service::Operations + extend ActiveSupport::Concern + + include_concern 'Lifecycle' +end diff --git a/app/models/service/operations/lifecycle.rb b/app/models/service/operations/lifecycle.rb new file mode 100644 index 00000000000..30610abcde1 --- /dev/null +++ b/app/models/service/operations/lifecycle.rb @@ -0,0 +1,9 @@ +module Service::Operations::Lifecycle + extend ActiveSupport::Concern + + included do + api_relay_method :retire do |options| + options + end + end +end