Sha256: edd903e60fd1289bbfcde9347410002a170bd3cbf04dd97541f2916ad4ca8464
Contents?: true
Size: 860 Bytes
Versions: 20
Compression:
Stored size: 860 Bytes
Contents
module Fog module OpenStack class Compute class Real def create_server_group(name, policy) Fog::OpenStack::Compute::ServerGroup.validate_server_group_policy policy body = {'server_group' => { 'name' => name, 'policies' => [policy] }} request( :body => Fog::JSON.encode(body), :expects => 200, :method => 'POST', :path => 'os-server-groups' ) end end class Mock def create_server_group(name, policy) Fog::OpenStack::Compute::ServerGroup.validate_server_group_policy policy id = SecureRandom.uuid data[:server_groups][id] = {:name => name, :policies => [policy], :members => []} get_server_group id end end end end end
Version data entries
20 entries across 20 versions & 3 rubygems