Sha256: fdb014d48235082b43972582214a49975189ddfc8b73d48d2db9fc45fa3af6a1
Contents?: true
Size: 1.08 KB
Versions: 11
Compression:
Stored size: 1.08 KB
Contents
# coding: utf-8 module Fog module Network class SakuraCloud class Real def collect_monitor_router( id ,start_time = nil, end_time = nil) filter = {} filter['Start'] = start_time if start_time filter['End'] = end_time if end_time request( :headers => { 'Authorization' => "Basic #{@auth_encode}" }, :expects => [200], :method => 'GET', :path => "#{Fog::SakuraCloud.build_endpoint(@api_zone)}/internet/#{id}/monitor", :query => URI.encode(Fog::JSON.encode(filter)) ) end end # Real class Mock def collect_monitor_router( id ) response = Excon::Response.new response.status = 200 response.body = { "Data"=>{ "2015-12-16T18:00:00+09:00"=>{ "In"=>500000, "Out"=>70000000 } }, "is_ok"=>true } response end end # Mock end # SakuraCloud end # Network end # Fog
Version data entries
11 entries across 9 versions & 2 rubygems