I tried multiple example but none of them returns something. I want to get the first SD
available, type=data and available > Required new disk size.
1)
storage_domain = instance.system_service.storage_domains_service.
list(search: "available >= #{(size * 2**30).to_i} AND
status=\"active\" AND type=\"data\"").first
2) Also tested:
storage_domain = instance.system_service.storage_domains_service.
list(search: "available >= #{(size * 2**30).to_i} AND
status=active AND type=data").first
3) Then, I decided to check with only 1 criteria
storage_domain = instance.system_service.storage_domains_service.
list(search: "type=data").first
But all of them returns nothing.
What I'm doing wrong?
Show replies by date
Resolved.
Found that the used columns in the query, where not supported by the search query on
storage domain. Only status it was available, then I use detect method to filter the
results.