Skip to content

Commit

Permalink
Ability to retire a service from service dialog
Browse files Browse the repository at this point in the history
As per[1] we can retire a service but including 'service_retire_on' in
service dialog still needs customization in Automate. This is
discussed in [1].

I think ManageIQ Domain should handle 'service_retire_on' dialog
option by default. This will save creating a custom domain just to
fetch 'service_retire_on' value from service catalog.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1300428
[2] http://talk.manageiq.org/t/services-retirement-date/786/2

Closes-Bug: BZ#1506712
  • Loading branch information
Sachin Patil committed Oct 26, 2017
1 parent 10d61e1 commit 9544164
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ def parsed_dialog_information
return merged_options_hash, merged_tags_hash
end

def service_retires_on_date(dialog_options_hash)
service_retires_on_date = dialog_options_hash.fetch(:service_retires_on, nil)
unless service_retires_on_date.nil?
@service.retires_on = service_retires_on_date unless service_retires_on_date.nil?
log_and_update_message(:info, "Service retires on: #{service_retires_on_date}")
end
end

begin

@task = $evm.root['service_template_provision_task']
Expand All @@ -247,6 +255,7 @@ def parsed_dialog_information
unless dialog_options_hash.blank?
override_service_name(dialog_options_hash)
override_service_description(dialog_options_hash)
service_retires_on_date(dialog_options_hash)
end

unless dialog_tags_hash.blank?
Expand Down

0 comments on commit 9544164

Please sign in to comment.