Sha256: b7f4dd3b90707cdd9c77d382c601f22001971706b3d97f527365798b06e18786
Contents?: true
Size: 1 KB
Versions: 13
Compression:
Stored size: 1 KB
Contents
# coding: utf-8 module Fog module Network class SakuraCloud class Real def create_router(options) bandwidthmbps = options[:bandwidthmbps] ? options[:bandwidthmbps].to_i : 100 body = { "Internet" => { "Name" => options[:name], "NetworkMaskLen"=> options[:networkmasklen].to_i, "BandWidthMbps"=> bandwidthmbps } } request( :headers => { 'Authorization' => "Basic #{@auth_encode}" }, :expects => 202, :method => 'POST', :path => "#{Fog::SakuraCloud.build_endpoint(@api_zone)}/internet", :body => Fog::JSON.encode(body) ) end end # Real class Mock def create_router(options) response = Excon::Response.new response.status = 202 response.body = { } response end end end # SakuraCloud end # Network end # Fog
Version data entries
13 entries across 11 versions & 2 rubygems