Sha256: 751b4e7dae04f3924809ec2aa4b679585cd8d41f6a629e66e0fa19a3a180a5b2

Contents?: true

Size: 858 Bytes

Versions: 45

Compression:

Stored size: 858 Bytes

Contents

module Fog
  module OpenStack
    class Planning
      class Real
        def create_plan(parameters)
          request(
            :expects => [201],
            :method  => 'POST',
            :path    => "plans",
            :body    => Fog::JSON.encode(parameters)
          )
        end
      end

      class Mock
        def create_plan(_parameters)
          response = Excon::Response.new
          response.status = 201
          response.body = {
            "created_at"  => "2014-09-26T20:23:14.222815",
            "description" => "Development testing cloud",
            "name"        => "dev-cloud",
            "parameters"  => [],
            "roles"       => [],
            "updated_at"  => nil,
            "uuid"        => "53268a27-afc8-4b21-839f-90227dd7a001"
          }
          response
        end
      end
    end
  end
end

Version data entries

45 entries across 43 versions & 5 rubygems

Version Path
fog-openstack-1.1.3 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.1.2 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-fork-99 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.1.0 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.1.0.pre lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-apibank-1.0.102 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.0.11 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-apibank-1.0.101 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.0.10 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-1.0.9 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-0.1.31 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.3.10 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-1.0.8 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-0.1.30 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-1.0.7 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-0.1.29 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.3.9 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-1.0.6 lib/fog/openstack/planning/requests/create_plan.rb
fog-openstack-0.1.28 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-1.0.5 lib/fog/openstack/planning/requests/create_plan.rb