Sha256: eb0a694402a004bc0ecfbd23644e62971b68c6934b4180076e0250216e441ce4
Contents?: true
Size: 816 Bytes
Versions: 26
Compression:
Stored size: 816 Bytes
Contents
module Fog module Rackspace class Networking class Real def create_network(label, cidr) data = { 'network' => { 'label' => label, 'cidr' => cidr } } request( :method => 'POST', :body => Fog::JSON.encode(data), :path => "os-networksv2", :expects => 200 ) end end class Mock def create_network(label, cidr) network_id = Fog::Rackspace::MockData.uuid self.data[:networks][network_id] = { 'id' => network_id, 'label' => label, 'cidr' => cidr } response(:body => { 'network' => self.data[:networks][network_id] }) end end end end end
Version data entries
26 entries across 24 versions & 5 rubygems