Sha256: 1c468365b3064de7a08587f7ef336b89616b2d5a9b1c7942eb8dd7586ac331a3

Contents?: true

Size: 1.01 KB

Versions: 39

Compression:

Stored size: 1.01 KB

Contents

module Fog
  module Compute
    class OpenStack
      class Real
        def get_server_group(group_id)
          request(
            :expects => 200,
            :method  => 'GET',
            :path    => "/os-server-groups/#{group_id}"
          )
        end
      end

      class Mock
        def get_server_group(group_id)
          grp = data[:server_groups][group_id]
          response = Excon::Response.new
          response.status = 200
          response.headers = {
            "Content-Type"   => "text/html; charset=UTF-8",
            "Content-Length" => "0",
            "Date"           => Date.new
          }
          response.body = {'server_group' => {
            'id'         => group_id,
            'name'       => grp[:name],
            'policies'   => grp[:policies],
            'members'    => grp[:members],
            'metadata'   => {},
            'project_id' => 'test-project',
            'user_id'    => 'test-user'
          }}
          response
        end
      end
    end
  end
end

Version data entries

39 entries across 37 versions & 3 rubygems

Version Path
fog-openstack-0.1.31 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.10 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.1.30 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.1.29 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.9 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.1.28 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.8 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.7 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.6 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.5 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.4 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.3 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.2 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.3.0 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.2.4 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.2.3 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.2.2 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.2.1 lib/fog/compute/openstack/requests/get_server_group.rb
fog-openstack-0.2.0 lib/fog/compute/openstack/requests/get_server_group.rb
fog-zj-0.1.28 lib/fog/compute/openstack/requests/get_server_group.rb