OnApp specific supply functions
Create new instance
api - The api which manages this resource
# File lib/onapp_market/onapp/search.rb, line 14 def initialize(api) super(api) end
Find hypervisor zones which match the specified query.
resource_query - OnappMarket::API::Query::Operator or
OnappMarket::API::Query::Comparator
pricing_query - OnappMarket::API::Query::Operator or
OnappMarket::API::Query::Comparator
offset - Offest into data set for pagination
limit - Limit into data set for pagination
# Find zones in London, irrespective of price search.find_zone(:location_city.eq "London")
OnappMarket::API::Response - data will contain Array of matching resources and prices if is_ok?
trader, admin
# File lib/onapp_market/onapp/search.rb, line 31 def find_zone(resource_query = nil, pricing_query = nil, offset = 0, limit = -1) resource_query = OnappMarket::API::Query::And.new(:type.eq(OnappMarket::OnApp::HypervisorZone::TYPE), resource_query) unless resource_query == nil resource_query = OnappMarket::API::Query::And.new(:type.eq(OnappMarket::OnApp::HypervisorZone::TYPE)) if resource_query == nil pricing_query = OnappMarket::API::Query::And.new(:type.eq(OnappMarket::OnApp::HypervisorZonePricing::TYPE), pricing_query) unless pricing_query == nil pricing_query = OnappMarket::API::Query::And.new(:type.eq(OnappMarket::OnApp::HypervisorZonePricing::TYPE)) if pricing_query == nil find(resource_query, pricing_query, offset, limit) end