Sha256: 1fa9f6cdf2f9ba965eb80bb41b1df8153d726878a8ba766c9863bb6faf7a0d53

Contents?: true

Size: 952 Bytes

Versions: 14

Compression:

Stored size: 952 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 Real

      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 # def create_plans
      end # class Mock
    end # class Planning
  end # module Openstack
end # module Fog

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-openstack-0.1.25 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.24 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.23 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.22 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.21 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.20 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.19 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.18 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.17 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.15 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.14 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.13 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.12 lib/fog/planning/openstack/requests/create_plan.rb
fog-openstack-0.1.11 lib/fog/planning/openstack/requests/create_plan.rb