# File lib/fog/openstack.rb, line 623 def self.extract_version_from_body(body, supported_versions) return nil if body['versions'].empty? versions = body['versions'].kind_of?(Array) ? body['versions'] : body['versions']['values'] version = nil # order is important, preffered status should be first %w(CURRENT stable SUPPORTED DEPRECATED).each do |status| version = versions.find { |x| x['id'].match(supported_versions) && (x['status'] == status) } break if version end version end