From 54edea7f0cadff66c46ea1041eeeb93b9b00d0de Mon Sep 17 00:00:00 2001 From: Yuri Rudman Date: Fri, 26 Oct 2018 12:33:05 -0400 Subject: [PATCH] allow set retirement date for service via Centralized Administration Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1579017 --- 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 f8fd6aa192f..df6934320f4 100644 --- a/app/models/service.rb +++ b/app/models/service.rb @@ -69,6 +69,9 @@ class Service < ApplicationRecord include CiFeatureMixin 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