Skip to content

Commit

Permalink
Added functionality so that flavors are available for catalog bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtluong committed May 17, 2019
1 parent 896d733 commit 1d6e395
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ def main

private

def orchestration_manager_from_bundle(service)
service.service_templates.detect(&:orchestration_manager).try(:orchestration_manager) if service.respond_to?(:service_templates)
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

Expand Down

0 comments on commit 1d6e395

Please sign in to comment.