OnApp specific supply functions.
Invoke a CP API call via the market. Note the call may not be supported or blacklisted for a specific market user.
resource_id - the resource (HypervisroZone) we wish to control
method - :post, :get, :put or :delete
url - CP Market URL e.g.
/virtual_machines/:virtual_machine_id/stop.xml
content - content as a string, for example XML or JSON
content_type
OnappMarket::API::Response - data will contain String of response (XML or JSON) if is_ok?
trader, admin
# File lib/onapp_market/onapp/trader.rb, line 33 def cp_control(resource_id, method, url, content = "", content_type = "") res = @api.post("/onapp/hypervisor_zone/#{resource_id.url_safe}/cp_control", {:method => method, :url => url, :content => content, :content_type => content_type}) return OnappMarket::API::Response.new(true, JSON.parse(res.data), res.errors, res.http_code) if res.is_ok? res end