Project

General

Profile

Actions

Bug #11345

closed

API Get available_clusters send empty hash

Added by Michael Alves Lobo over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - VMware
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When i request /api/compute_resources/:id/available_clusters , list of clusters is empty ..
When i look in app/models/compute_resources/foreman/model/vmware.rb the method clusters return an array of string , but the view of API needs an array of cluster objet
I've modify the method :

def clusters
      if dc.clusters.nil?
        Rails.logger.info "Datacenter #{dc.try(:name)} returned zero clusters" 
        return []
      end
      #dc.clusters.map(&:full_path).sort
      name_sort(dc.clusters)
end

and now it's ok...

It's a bug or a i use so bad the API ?

Michael


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #8581: Can't provision a new host if vmware cluster is under folderClosedShlomi Zadok12/04/2014Actions
Actions

Also available in: Atom PDF