From f4fcca04dcf602c3dab97a1afc319fff532c6007 Mon Sep 17 00:00:00 2001 From: dluong Date: Mon, 13 May 2019 22:28:30 -0400 Subject: [PATCH] Added functionality so that flavors are available for catalog bundles --- .../Methods.class/__methods__/available_flavors.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/content/automate/ManageIQ/Cloud/Orchestration/Operations/Methods.class/__methods__/available_flavors.rb b/content/automate/ManageIQ/Cloud/Orchestration/Operations/Methods.class/__methods__/available_flavors.rb index 459ddae8d..08ad6fc54 100644 --- a/content/automate/ManageIQ/Cloud/Orchestration/Operations/Methods.class/__methods__/available_flavors.rb +++ b/content/automate/ManageIQ/Cloud/Orchestration/Operations/Methods.class/__methods__/available_flavors.rb @@ -17,10 +17,15 @@ def main private + def orchestration_manager_from_bundle(service) + service.try(:service_templates).detect(&:orchestration_manager).try(:orchestration_manager) + end + def fetch_list_data service = @handle.root.attributes["service_template"] || @handle.root.attributes["service"] - flavors = service.try(:orchestration_manager).try(:flavors) + orch_mgr = service.try(:orchestration_manager) || orchestration_manager_from_bundle(service) + flavors = orch_mgr.try(:flavors) flavor_list = {} flavors.each { |f| flavor_list[f.name] = f.name } if flavors